#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 | #60689746 | Utilizator | |
| Fișier | permpf.cpp | Dimensiune | 1.61 KB |
| Data încărcării | 08 Noiembrie 2025, 18:34 | Scor/rezultat | Eroare de compilare |
permpf.cpp:50:2: error: stray '#' in program }#include <iostream> ^ permpf.cpp: In function 'int main()': permpf.cpp:27:9: error: 'ok' was not declared in this scope ok=0; ^ permpf.cpp: At global scope: permpf.cpp:50:3: error: 'include' does not name a type }#include <iostream> ^ permpf.cpp:53:12: error: redefinition of 'std::ifstream in' ifstream in("permpf.in"); ^ permpf.cpp:4:10: error: 'std::ifstream in' previously declared here ifstream in("permpf.in"); ^ permpf.cpp:54:13: error: redefinition of 'std::ofstream out' ofstream out("permpf.out"); ^ permpf.cpp:5:10: error: 'std::ofstream out' previously declared here ofstream out("permpf.out"); ^ permpf.cpp:55:10: error: redefinition of 'int st [50]' int st[50]; ^ permpf.cpp:6:5: error: 'int st [50]' previously declared here int st[50]; ^ permpf.cpp: In function 'int validare(int)': permpf.cpp:56:5: error: redefinition of 'int validare(int)' int validare (int k) ^ permpf.cpp:7:5: error: 'int validare(int)' previously defined here int validare (int k) ^ permpf.cpp: In function 'int main()': permpf.cpp:65:5: error: redefinition of 'int main()' int main() ^ permpf.cpp:16:5: error: 'int main()' previously defined here int main() ^
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ă.