#202
PermPF
Se citeşte un număr natural nenul n
. Să se afişeze, în ordine lexicografică, permutările fără puncte fixe ale mulţimii {1,2,..,n}
.
Problema | PermPF | Operații I/O |
permpf.in /permpf.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #42936830 | Utilizator | |
Fișier | permpf.cpp | Dimensiune | 553 B |
Data încărcării | 23 Martie 2023, 10:46 | Scor / rezultat | Eroare de compilare |
permpf.cpp:3:1: error: 'ifstream' does not name a type ifstream f("permpf.in"); ^ permpf.cpp:4:1: error: 'ofstream' does not name a type ofstream g("permpf.out"); ^ permpf.cpp: In function 'void tipar(int)': permpf.cpp:11:9: error: 'g' was not declared in this scope g<<x[i]<<" "; ^ permpf.cpp:12:5: error: 'g' was not declared in this scope g<<endl; ^ permpf.cpp: In function 'void bkt(int)': permpf.cpp:27:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(valid(k)) if(k==n) tipar(k); ^ permpf.cpp: In function 'int main()': permpf.cpp:33:3: error: 'f' was not declared in this scope f>>n; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PermPF 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ă.