#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 | #56700953 | Utilizator | |
Fișier | aranjamente.cpp | Dimensiune | 651 B |
Data încărcării | 03 Martie 2025, 11:36 | Scor / rezultat | Eroare de compilare |
aranjamente.cpp:4:12: error: 'aranjamente' was not declared in this scope ifstream f(aranjamente.in) ^ aranjamente.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream g(aranjamente.out) ^ aranjamente.cpp:7:12: error: 'k' was not declared in this scope int valid(k) ^ aranjamente.cpp:8:1: error: expected ',' or ';' before '{' token { ^ aranjamente.cpp:14:19: error: two or more data types in declaration of 'solutie' int int solutie(k) ^ aranjamente.cpp:14:18: error: 'k' was not declared in this scope int int solutie(k) ^ aranjamente.cpp:18:16: error: variable or field 'afisare' declared void void afisare(k) ^ aranjamente.cpp:18:15: error: 'k' was not declared in this scope void afisare(k) ^ aranjamente.cpp:25:13: error: variable or field 'back' declared void void back(k) ^ aranjamente.cpp:25:12: error: 'k' was not declared in this scope void back(k) ^ aranjamente.cpp:26:14: error: 'i' does not name a type for(int i=1;i<=n;i++) ^ aranjamente.cpp:26:19: error: 'i' does not name a type for(int i=1;i<=n;i++) ^ aranjamente.cpp: In function 'int main()': aranjamente.cpp:36:17: error: 'n' was not declared in this scope cin>>n; ^ aranjamente.cpp:37:18: error: 'back' was not declared in this scope back(1); ^ aranjamente.cpp: At global scope: aranjamente.cpp:39:5: error: expected unqualified-id before 'return' return 0; ^ aranjamente.cpp:40:1: error: expected declaration before '}' token } ^
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ă.