#197
Se citesc două numere naturale nenule n și k. Să se afişeze, în ordine lexicografică, submulțimile de câte k elemente ale mulţimii {1,2,..,n}.
| Problema | Combinari | Operații I/O |
combinari.in/combinari.out
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64153210 | Utilizator | |
| Fișier | combinari.cpp | Dimensiune | 593 B |
| Data încărcării | 20 Aprilie 2026, 18:31 | Scor/rezultat | 0 puncte |
combinari.cpp: In function ‘void scrie()’: combinari.cpp:10:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 10 | for (int i=1;i<=p;i++) | ^~~ combinari.cpp:12:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | cout<<"\n"; | ^~~~ combinari.cpp: In function ‘int ok(int)’: combinari.cpp:17:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 17 | for(int i=1;i<k;i++) | ^~~ combinari.cpp:19:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 19 | return 1; | ^~~~~~
| 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.001 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 Combinari 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ă.