#196
Se citesc două numere naturale nenule n și k. Să se afişeze, în ordine lexicografică, aranjamentele de câte k elemente ale mulţimii {1,2,..,n}.
| Problema | Aranjamente | Operații I/O |
aranjamente.in/aranjamente.out
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64151870 | Utilizator | |
| Fișier | aranjamente.cpp | Dimensiune | 520 B |
| Data încărcării | 20 Aprilie 2026, 17:31 | Scor/rezultat | 100 puncte |
aranjamente.cpp: In function ‘void scrie()’: aranjamente.cpp:9:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 9 | for (int i=1;i<=p;i++) | ^~~ aranjamente.cpp:11:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | fout<<"\n"; | ^~~~ aranjamente.cpp: In function ‘int ok(int)’: aranjamente.cpp:16:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 16 | for(int i=1;i<k;i++) | ^~~ aranjamente.cpp:18:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 18 | return 1; | ^~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 30 | 30 | ||
| 4 | 0.028 secunde | OK. | 30 | 30 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Aranjamente face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.