#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 | #63405078 | Utilizator | |
| Fișier | aranjamente.cpp | Dimensiune | 563 B |
| Data încărcării | 02 Martie 2026, 10:24 | Scor/rezultat | Eroare de compilare |
aranjamente.cpp: In function 'int bkt()': aranjamente.cpp:30:18: error: invalid conversion from 'int (*)()' to 'int' [-fpermissive] do{}while((as=succesor)||!valid); ^ aranjamente.cpp:30:31: warning: the address of 'int valid()' will always evaluate as 'true' [-Waddress] do{}while((as=succesor)||!valid); ^ aranjamente.cpp:32:11: warning: the address of 'int sol()' will always evaluate as 'true' [-Waddress] if(sol)tipar(); ^ aranjamente.cpp:36:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ aranjamente.cpp: In function 'int main()': aranjamente.cpp:39:5: warning: statement is a reference, not call, to function 'bkt' [-Waddress] bkt; ^ aranjamente.cpp:38:6: warning: unused variable 'n' [-Wunused-variable] int n,k; ^ aranjamente.cpp:38:8: warning: unused variable 'k' [-Wunused-variable] int n,k; ^
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ă.