#123
Permutari
Se citeşte un număr natural nenul n
. Să se afişeze, în ordine lexicografică, permutările mulţimii {1,2,..,n}
.
Problema | Permutari | Operații I/O |
permutari.in /permutari.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54584793 | Utilizator | |
Fișier | permutari.cpp | Dimensiune | 676 B |
Data încărcării | 03 Decembrie 2024, 09:02 | Scor / rezultat | Eroare de compilare |
permutari.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> #include using namespace std;<fstream> ^ permutari.cpp:3:1: error: 'ifstream' does not name a type ifstream cin("permutari.in") ^ permutari.cpp: In function 'void scrie()': permutari.cpp:10:24: error: 'n' was not declared in this scope for(int i=1; i<=n; i++) ^ permutari.cpp:11:9: error: 'cout' was not declared in this scope cout<<sol[i]<<" "; ^ permutari.cpp:11:15: error: 'sol' was not declared in this scope cout<<sol[i]<<" "; ^ permutari.cpp:12:8: error: 'cout' was not declared in this scope cout<<endl; ^ permutari.cpp:12:14: error: 'endl' was not declared in this scope cout<<endl; ^ permutari.cpp: In function 'int ok(int)': permutari.cpp:17:12: error: 'sol' was not declared in this scope if(sol[k]==sol[i]) ^ permutari.cpp: In function 'void backk(int)': permutari.cpp:23:14: error: 'n' was not declared in this scope if(k==n+1) scrie(); ^ permutari.cpp:27:12: error: 'sol' was not declared in this scope sol[k]=i; ^ permutari.cpp: In function 'int main()': permutari.cpp:33:17: error: 'cin' was not declared in this scope cin>>n; ^ permutari.cpp:33:22: error: 'n' was not declared in this scope cin>>n; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Permutari 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ă.