#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 | #52772607 | Utilizator | |
Fișier | permpf.cpp | Dimensiune | 755 B |
Data încărcării | 09 Octombrie 2024, 08:51 | Scor / rezultat | Eroare de compilare |
permpf.cpp:9:1: error: stray '\302' in program if(st[k] == k) ^ permpf.cpp:9:1: error: stray '\240' in program permpf.cpp:9:1: error: stray '\302' in program permpf.cpp:9:1: error: stray '\240' in program permpf.cpp:10:1: error: stray '\302' in program return 0; ^ permpf.cpp:10:1: error: stray '\240' in program permpf.cpp:10:1: error: stray '\302' in program permpf.cpp:10:1: error: stray '\240' in program permpf.cpp:10:1: error: stray '\302' in program permpf.cpp:10:1: error: stray '\240' in program permpf.cpp:10:1: error: stray '\302' in program permpf.cpp:10:1: error: stray '\240' in program permpf.cpp:11:1: error: stray '\302' in program for(int i = 1; i < k; ++i) ^ permpf.cpp:11:1: error: stray '\240' in program permpf.cpp:11:1: error: stray '\302' in program permpf.cpp:11:1: error: stray '\240' in program permpf.cpp:12:1: error: stray '\302' in program if(st[k] == st[i]) ^ permpf.cpp:12:1: error: stray '\240' in program permpf.cpp:12:1: error: stray '\302' in program permpf.cpp:12:1: error: stray '\240' in program permpf.cpp:12:1: error: stray '\302' in program permpf.cpp:12:1: error: stray '\240' in program permpf.cpp:12:1: error: stray '\302' in program permpf.cpp:12:1: error: stray '\240' in program permpf.cpp:13:1: error: stray '\302' in program return 0; ^ permpf.cpp:13:1: error: stray '\240' in program permpf.cpp:13:1: error: stray '\302' in program permpf.cpp:13:1: error: stray '\240' in program permpf.cpp:13:1: error: stray '\302' in program permpf.cpp:13:1: error: stray '\240' in program permpf.cpp:13:1: error: stray '\302' in program permpf.cpp:13:1: error: stray '\240' in program permpf.cpp:13:1: error: stray '\302' in program permpf.cpp:13:1: error: stray '\240' in program permpf.cpp:13:1: error: stray '\302' in program permpf.cpp:13:1: error: stray '\240' in program permpf.cpp:14:1: error: stray '\302' in program return 1; ^ permpf.cpp:14:1: error: stray '\240' in program permpf.cpp:14:1: error: stray '\302' in program permpf.cpp:14:1: error: stray '\240' in program permpf.cpp:18:1: error: stray '\302' in program for(int i = 1; i <= k; ++i) ^ permpf.cpp:18:1: error: stray '\240' in program permpf.cpp:18:1: error: stray '\302' in program permpf.cpp:18:1: error: stray '\240' in program permpf.cpp:19:1: error: stray '\302' in program fout << st[i] << " "; ^ permpf.cpp:19:1: error: stray '\240' in program permpf.cpp:19:1: error: stray '\302' in program permpf.cpp:19:1: error: stray '\240' in program permpf.cpp:19:1: error: stray '\302' in program permpf.cpp:19:1: error: stray '\240' in program permpf.cpp:19:1: error: stray '\302' in program permpf.cpp:19:1: error: stray '\240' in program permpf.cpp:20:1: error: stray '\302' in program fout << endl; ^ permpf.cpp:20:1: error: stray '\240' in program permpf.cpp:20:1: error: stray '\302' in program permpf.cpp:20:1: error: stray '\240' in program permpf.cpp:24:1: error: stray '\302' in program for(int i = 1; i <= n; ++i) ^ permpf.cpp:24:1: error: stray '\240' in program permpf.cpp:24:1: error: stray '\302' in program permpf.cpp:24:1: error: stray '\240' in program permpf.cpp:25:1: error: stray '\302' in program { ^ permpf.cpp:25:1: error: stray '\240' in program permpf.cpp:25:1: error: stray '\302' in program permpf.cpp:25:1: error: stray '\240' in program permpf.cpp:26:1: error: stray '\302' in program st[k] = i; ^ permpf.cpp:26:1: error: stray '\240' in program permpf.cpp:26:1: error: stray '\302' in program permpf.cpp:26:1: error: stray '\240' in program permpf.cpp:26:1: error: stray '\302' in program permpf.cpp:26:1: error: stray '\240' in program permpf.cpp:26:1: error: stray '\302' in program permpf.cpp:26:1: error: stray '\240' in program permpf.cpp:27:1: error: stray '\302' in program if(valid(k)) ^ permpf.cpp:27:1: error: stray '\240' in program permpf.cpp:27:1: error: stray '\302' in program permpf.cpp:27:1: error: stray '\240' in program permpf.cpp:27:1: error: stray '\302' in program permpf.cpp:27:1: error: stray '\240' in program permpf.cpp:27:1: error: stray '\302' in program permpf.cpp:27:1: error: stray '\240' in program permpf.cpp:28:1: error: stray '\302' in program if(k == n) ^ permpf.cpp:28:1: error: stray '\240' in program permpf.cpp:28:1: error: stray '\302' in program permpf.cpp:28:1: error: stray '\240' in program permpf.cpp:28:1: error: stray '\302' in program permpf.cpp:28:1: error: stray '\240' in program permpf.cpp:28:1: error: stray '\302' in program permpf.cpp:28:1: error: stray '\240' in program permpf.cpp:28:1: error: stray '\302' in program permpf.cpp:28:1: error: stray '\240' in program permpf.cpp:28:1: error: stray '\302' in program permpf.cpp:28:1: error: stray '\240' in program permpf.cpp:29:1: error: stray '\302' in program afisare(k); ^ permpf.cpp:29:1: error: stray '\240' in program permpf.cpp:29:1: error: stray '\302' in program permpf.cpp:29:1: error: stray '\240' in program permpf.cpp:29:1: error: stray '\302' in program permpf.cpp:29:1: error: stray '\240' in program permpf.cpp:29:1: error: stray '\302' in program permpf.cpp:29:1: error: stray '\240' in program permpf.cpp:29:1: error: stray '\302' in program permpf.cpp:29:1: error: stray '\240' in program permpf.cpp:29:1: error: stray '\302' in program permpf.cpp:29:1: error: stray '\240' in program permpf.cpp:29:1: error: stray '\302' in program permpf.cpp:29:1: error: stray '\240' in program permpf.cpp:29:1: error: stray '\302' in program permpf.cpp:29:1: error: stray '\240' in program permpf.cpp:30:1: error: stray '\302' in program else ^ permpf.cpp:30:1: error: stray '\240' in program permpf.cpp:30:1: error: stray '\302' in program permpf.cpp:30:1: error: stray '\240' in program permpf.cpp:30:1: error: stray '\302' in program permpf.cpp:30:1: error: stray '\240' in program permpf.cpp:30:1: error: stray '\302' in program permpf.cpp:30:1: error: stray '\240' in program permpf.cpp:31:1: error: stray '\302' in program Back(k + 1); ^ permpf.cpp:31:1: error: stray '\240' in program permpf.cpp:31:1: error: stray '\302' in program permpf.cpp:31:1: error: stray '\240' in program permpf.cpp:31:1: error: stray '\302' in program permpf.cpp:31:1: error: stray '\240' in program permpf.cpp:31:1: error: stray '\302' in program permpf.cpp:31:1: error: stray '\240' in program permpf.cpp:31:1: error: stray '\302' in program permpf.cpp:31:1: error: stray '\240' in program permpf.cpp:31:1: error: stray '\302' in program permpf.cpp:31:1: error: stray '\240' in program permpf.cpp:32:1: error: stray '\302' in program } ^ permpf.cpp:32:1: error: stray '\240' in program permpf.cpp:32:1: error: stray '\302' in program permpf.cpp:32:1: error: stray '\240' in program permpf.cpp:37:1: error: stray '\302' in program fin >> n; ^ permpf.cpp:37:1: error: stray '\240' in program permpf.cpp:37:1: error: stray '\302' in program permpf.cpp:37:1: error: stray '\240' in program permpf.cpp:38:1: error: stray '\302' in program Back(1); ^ permpf.cpp:38:1: error: stray '\240' in program permpf.cpp:38:1: error: stray '\302' in program permpf.cpp:38:1: error: stray '\240' in program permpf.cpp:39:1: error: stray '\302' in program return 0; ^ permpf.cpp:39:1: error: stray '\240' in program permpf.cpp:39:1: error: stray '\302' in program permpf.cpp:39:1: error: stray '\240' in program permpf.cpp: In function 'void Back(int)': permpf.cpp:27:15: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(valid(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ă.