#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 | #8799242 | Utilizator | |
Fișier | aranjamente.cpp | Dimensiune | 616 B |
Data încărcării | 13 Martie 2018, 09:44 | Scor / rezultat | Eroare de compilare |
aranjamente.cpp:8:21: error: empty character constant fout<<s[i]<<''; ^ aranjamente.cpp:2:7: error: expected nested-name-specifier before 'namepsace' using namepsace std; ^ aranjamente.cpp:2:7: error: 'namepsace' has not been declared aranjamente.cpp:2:17: error: expected ';' before 'std' using namepsace std; ^ aranjamente.cpp:2:17: error: 'std' does not name a type aranjamente.cpp:3:1: error: 'ifstream' does not name a type ifstream fin("aranjamente.in") ^ aranjamente.cpp: In function 'void tipar()': aranjamente.cpp:7:22: error: 'm' was not declared in this scope for (int i=1; i<=m; i++) ^ aranjamente.cpp:8:9: error: 'fout' was not declared in this scope fout<<s[i]<<''; ^ aranjamente.cpp:8:15: error: 's' was not declared in this scope fout<<s[i]<<''; ^ aranjamente.cpp:9:5: error: 'fout' was not declared in this scope fout '\n'; ^ aranjamente.cpp:9:10: error: expected ';' before '\xa' fout '\n'; ^ aranjamente.cpp: In function 'int valid(int)': aranjamente.cpp:13:4: error: 's' was not declared in this scope if(s[i]==s[k]) return 0; ^ aranjamente.cpp: In function 'void bck()': aranjamente.cpp:20:25: error: 's' was not declared in this scope while(!up && s(k)<n){ ^ aranjamente.cpp:20:27: error: 'n' was not declared in this scope while(!up && s(k)<n){ ^ aranjamente.cpp:25:19: error: 'm' was not declared in this scope if(k==m)tipar; ^ aranjamente.cpp:25:26: warning: statement is a reference, not call, to function 'tipar' [-Waddress] if(k==m)tipar; ^ aranjamente.cpp:25:26: warning: statement has no effect [-Wunused-value] aranjamente.cpp:28:13: error: 's' was not declared in this scope s[k] ^ aranjamente.cpp:28:16: error: expected ';' at end of input s[k] ^ aranjamente.cpp:28:16: error: expected '}' at end of input aranjamente.cpp:24:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(up) ^ aranjamente.cpp:28:16: error: expected '}' at end of input s[k] ^ aranjamente.cpp:28:16: error: expected '}' at end of input
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ă.