#196
Aranjamente
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 | #37771148 | Utilizator | |
Fișier | aranjamente.cpp | Dimensiune | 501 B |
Data încărcării | 20 Septembrie 2022, 10:46 | Scor / rezultat | Eroare de compilare |
aranjamente.cpp:10:9: warning: multi-character character constant [-Wmultichar] fout<<'/n'; ^ aranjamente.cpp:2:7: error: expected nested-name-specifier before 'namspace' using namspace std; ^ aranjamente.cpp:2:7: error: 'namspace' has not been declared aranjamente.cpp:2:16: error: expected ';' before 'std' using namspace std; ^ aranjamente.cpp:2:16: error: 'std' does not name a type aranjamente.cpp:3:1: error: 'ifstream' does not name a type ifstream fin("aranjamente.in"); ^ aranjamente.cpp:4:1: error: 'ofstream' does not name a type ofstream fout("aranjamente.out"); ^ aranjamente.cpp: In function 'void write()': aranjamente.cpp:8:18: error: 'm' was not declared in this scope for(int i=1;i<=m;i++) ^ aranjamente.cpp:9:5: error: 'fout' was not declared in this scope fout<<x[i]<<" "; ^ aranjamente.cpp:10:3: error: 'fout' was not declared in this scope fout<<'/n'; ^ aranjamente.cpp: In function 'void back(int)': aranjamente.cpp:26:15: error: 'm' was not declared in this scope if(k==m) ^ aranjamente.cpp:28:13: error: expected ';' before 'else' else back(k+1); ^ aranjamente.cpp: In function 'int main()': aranjamente.cpp:32:3: error: 'fin' was not declared in this scope fin>>n>>m; ^ aranjamente.cpp:32:11: error: 'm' was not declared in this scope fin>>n>>m; ^
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ă.