#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 | #64916073 | Utilizator | |
| Fișier | aranjamente.cpp | Dimensiune | 845 B |
| Data încărcării | 12 Iunie 2026, 16:47 | Scor/rezultat | 0 puncte |
aranjamente.cpp: In function ‘void init()’: aranjamente.cpp:10:9: warning: unused variable ‘i’ [-Wunused-variable] 10 | int i; | ^ aranjamente.cpp: In function ‘void tipar(int)’: aranjamente.cpp:20:9: warning: unused variable ‘j’ [-Wunused-variable] 20 | int j; | ^ aranjamente.cpp: In function ‘int valid(int)’: aranjamente.cpp:27:9: warning: unused variable ‘i’ [-Wunused-variable] 27 | int i,ok; | ^ aranjamente.cpp: In function ‘void bkt(int)’: aranjamente.cpp:44:11: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else] 44 | if(valid(p)) | ^ aranjamente.cpp:40:9: warning: unused variable ‘val’ [-Wunused-variable] 40 | int val; | ^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.002 secunde | Raspuns gresit. | 30 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 30 | 0 | ||
| Punctaj total | 0 | |||||
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ă.