#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 | #53783571 | Utilizator | |
Fișier | permpf.cpp | Dimensiune | 479 B |
Data încărcării | 11 Noiembrie 2024, 17:57 | Scor / rezultat | Eroare de compilare |
permpf.cpp:4:1: error: 'ifstream' does not name a type ifstream f("permpf.in"); ^ permpf.cpp:5:1: error: 'ofstream' does not name a type ofstream g("permpf.out"); ^ permpf.cpp: In function 'bool valid(int)': permpf.cpp:11:10: error: 'i' was not declared in this scope if(T[i]==T[k]) ^ permpf.cpp: In function 'void afisare()': permpf.cpp:18:9: error: 'cout' was not declared in this scope cout<<T[i]<<' '; ^ permpf.cpp:18:9: note: suggested alternative: In file included from permpf.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ permpf.cpp:19:5: error: 'cout' was not declared in this scope cout<<endl; ^ permpf.cpp:19:5: note: suggested alternative: In file included from permpf.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ permpf.cpp:19:11: error: 'endl' was not declared in this scope cout<<endl; ^ permpf.cpp:19:11: 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: In function 'void BT(int)': permpf.cpp:25:22: error: 'validare' was not declared in this scope if(validare(k)) ^
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ă.