#125
Permutari2
Se citeşte un număr natural nenul n
, apoi n
numere naturale distincte. Să se afişeze, în ordine lexicografică, permutările mulţimii formate din cele n
numere citite.
Problema | Permutari2 | Operații I/O |
permutari2.in /permutari2.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52490376 | Utilizator | |
Fișier | permutari2.cpp | Dimensiune | 679 B |
Data încărcării | 01 Octombrie 2024, 16:16 | Scor / rezultat | Eroare de compilare |
permutari2.cpp:4:1: error: stray '\342' in program ifstream f(“permutari2.in”); ^ permutari2.cpp:4:1: error: stray '\200' in program permutari2.cpp:4:1: error: stray '\234' in program permutari2.cpp:4:1: error: stray '\342' in program permutari2.cpp:4:1: error: stray '\200' in program permutari2.cpp:4:1: error: stray '\235' in program permutari2.cpp:5:1: error: stray '\342' in program ofstream g(“permutari2.out”); ^ permutari2.cpp:5:1: error: stray '\200' in program permutari2.cpp:5:1: error: stray '\234' in program permutari2.cpp:5:1: error: stray '\342' in program permutari2.cpp:5:1: error: stray '\200' in program permutari2.cpp:5:1: error: stray '\235' in program permutari2.cpp:19:1: error: stray '\342' in program g<<v[x[i]]<<” “; ^ permutari2.cpp:19:1: error: stray '\200' in program permutari2.cpp:19:1: error: stray '\235' in program permutari2.cpp:19:1: error: stray '\342' in program permutari2.cpp:19:1: error: stray '\200' in program permutari2.cpp:19:1: error: stray '\234' in program permutari2.cpp:4:15: error: 'permutari2' was not declared in this scope ifstream f(“permutari2.in”); ^ permutari2.cpp:5:15: error: 'permutari2' was not declared in this scope ofstream g(“permutari2.out”); ^ permutari2.cpp: In function 'int OK(int)': permutari2.cpp:13:5: error: 'x' was not declared in this scope if (x[k]==x[i]) return 0; ^ permutari2.cpp: In function 'void Afisare(int)': permutari2.cpp:19:4: error: 'v' was not declared in this scope g<<v[x[i]]<<” “; ^ permutari2.cpp:19:6: error: 'x' was not declared in this scope g<<v[x[i]]<<” “; ^ permutari2.cpp:19:20: error: expected primary-expression before ';' token g<<v[x[i]]<<” “; ^ permutari2.cpp: In function 'void Back(int)': permutari2.cpp:24:1: error: 'x' was not declared in this scope x[k]=i; ^ permutari2.cpp:25:3: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if( OK(k) ) ^ permutari2.cpp: In function 'int main()': permutari2.cpp:35:4: error: 'v' was not declared in this scope f>>v[i]; for(int i=1;i<n;i++) ^ permutari2.cpp:36:32: error: 'v' was not declared in this scope for(int j=i+1;j<=n;j++) if(v[i]> v[j]) { int aux= v[i]; v[i]=v[j]; v[j]=aux; } Back(1); return 0; } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Permutari2 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ă.