#202
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 | #63707220 | Utilizator | |
| Fișier | permpf.cpp | Dimensiune | 787 B |
| Data încărcării | 16 Martie 2026, 10:20 | Scor/rezultat | Eroare de compilare |
permpf.cpp:3:1: error: stray '\310' in program folosind spațiul de nume std ; ^ permpf.cpp:3:1: error: stray '\233' in program permpf.cpp:13:1: error: stray '\310' in program void bk ( int poziție ) { ^ permpf.cpp:13:1: error: stray '\233' in program permpf.cpp:16:9: error: stray '\304' in program dacă ( p [ i ] == 0 ) ^ permpf.cpp:16:9: error: stray '\203' in program permpf.cpp:20:13: error: stray '\304' in program dacă ( x [ poz ] != poz ) ^ permpf.cpp:20:13: error: stray '\203' in program permpf.cpp:21:17: error: stray '\304' in program dacă ( poz == n ) ^ permpf.cpp:21:17: error: stray '\203' in program permpf.cpp:35:5: error: stray '\304' in program returnează 0 ; ^ permpf.cpp:35:5: error: stray '\203' in program permpf.cpp:3:1: error: 'folosind' does not name a type folosind spațiul de nume std ; ^ permpf.cpp:4:1: error: 'ifstream' does not name a type ifstream fin ( " permpf.in " ); ^ permpf.cpp:5:1: error: 'ofstream' does not name a type ofstream fout ( "permpf.out" ); ^ permpf.cpp: In function 'void afisare()': permpf.cpp:8:14: error: expected primary-expression before 'int' pentru ( int i = 1 ; i <= n ; i ++ ){ ^ permpf.cpp:8:26: error: 'i' was not declared in this scope pentru ( int i = 1 ; i <= n ; i ++ ){ ^ permpf.cpp:8:40: error: expected ';' before ')' token pentru ( int i = 1 ; i <= n ; i ++ ){ ^ permpf.cpp:11:5: error: 'fout' was not declared in this scope fout << endl ; ^ permpf.cpp:11:13: error: 'endl' was not declared in this scope fout << endl ; ^ permpf.cpp:11:13: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from permpf.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ permpf.cpp: At global scope: permpf.cpp:13:21: error: expected ',' or '...' before 'ie' void bk ( int poziție ) { ^ permpf.cpp: In function 'void bk(int)': permpf.cpp:14:14: error: expected primary-expression before 'int' pentru ( int i = 1 ; i <= n ; i ++ ) ^ permpf.cpp:14:26: error: 'i' was not declared in this scope pentru ( int i = 1 ; i <= n ; i ++ ) ^ permpf.cpp:14:40: error: expected ';' before ')' token pentru ( int i = 1 ; i <= n ; i ++ ) ^ permpf.cpp:36:1: error: expected '}' at end of input } ^
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ă.