#124
Permutari1
Se citeşte un număr natural nenul n
. Să se afişeze, în ordine invers lexicografică, permutările mulţimii {1,2,..,n}
.
Problema | Permutari1 | Operații I/O |
permutari1.in /permutari1.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #15860966 | Utilizator | |
Fișier | permutari1.cpp | Dimensiune | 671 B |
Data încărcării | 16 Mai 2019, 17:48 | Scor / rezultat | Eroare de compilare |
permutari1.cpp:3:1: error: stray '\302' in program using namespace std;ifstream f("permutari1.in");ofstream g("permutari1.out");int n, v[9];void citire(){ f>>n;}void scrie(){ for(int i=1;i<=n;++i) g<<v[i]<<' '; g<<'\n';}int verificare(int k){ for(int i=1;i<k;++i) if(v[i]==v[k]) return 0; return 1;}void backtracking(int k){ if(k==n+1) scrie(); else for(int i=n;i>=1;--i) { v[k]=i; if(verificare(k)==1) backtracking(k+1); }}int main(){ citire(); backtracking(1); g.close(); return 0;} ^ permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program permutari1.cpp:3:1: error: stray '\302' in program permutari1.cpp:3:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Permutari1 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ă.