#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 | #20763350 | Utilizator | |
Fișier | aranjamente.cpp | Dimensiune | 722 B |
Data încărcării | 10 Februarie 2020, 09:58 | Scor / rezultat | Eroare de compilare |
aranjamente.cpp: In function 'int valid(int)': aranjamente.cpp:9:12: error: 'st' was not declared in this scope if(st[i]==st[k]) ^ aranjamente.cpp: In function 'int solutie()': aranjamente.cpp:15:8: error: 'k' was not declared in this scope if(k==m) ^ aranjamente.cpp:15:11: error: 'm' was not declared in this scope if(k==m) ^ aranjamente.cpp: In function 'void Back(int)': aranjamente.cpp:23:16: error: 'n' was not declared in this scope for(i=1;i<=n;i++) ^ aranjamente.cpp:25:9: error: 'st' was not declared in this scope st[k]=i; ^ aranjamente.cpp:27:22: error: too many arguments to function 'int solutie()' if(solutie(k)) ^ aranjamente.cpp:13:5: note: declared here int solutie() ^ aranjamente.cpp:28:18: error: 'tipar' was not declared in this scope tipar(k); ^ aranjamente.cpp:26:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(valid(k)) ^ aranjamente.cpp: In function 'void tipar(int)': aranjamente.cpp:37:20: error: 'm' was not declared in this scope for(int i=1;i<=m;i++) ^ aranjamente.cpp:38:15: error: 'st' was not declared in this scope fout<<st[i]<<' '; ^ aranjamente.cpp: At global scope: aranjamente.cpp:42:1: error: expected initializer before 'int' int main() ^ aranjamente.cpp: In function 'int solutie()': aranjamente.cpp:19:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
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ă.