#194
Să se genereze toate anagramele unui cuvânt citit.
| Problema | Anagrame1 | Operații I/O |
anagrame1.in/anagrame1.out
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64229030 | Utilizator | |
| Fișier | anagrame1.cpp | Dimensiune | 1.61 KB |
| Data încărcării | 24 Aprilie 2026, 08:41 | Scor/rezultat | Eroare de compilare |
anagrame1.cpp:45:2: error: stray ‘#’ in program 45 | }#include <fstream> | ^ anagrame1.cpp: In function ‘void back(int)’: anagrame1.cpp:27:21: error: expected ‘;’ before ‘}’ token 27 | p[i] = 0 | ^ | ; 28 | } | ~ anagrame1.cpp: At global scope: anagrame1.cpp:45:3: error: ‘include’ does not name a type 45 | }#include <fstream> | ^~~~~~~ anagrame1.cpp:49:10: error: redefinition of ‘std::ifstream cin’ 49 | ifstream cin("anagrame1.in"); | ^~~ anagrame1.cpp:5:10: note: ‘std::ifstream cin’ previously declared here 5 | ifstream cin("anagrame1.in"); | ^~~ anagrame1.cpp:50:10: error: redefinition of ‘std::ofstream cout’ 50 | ofstream cout("anagrame1.out"); | ^~~~ anagrame1.cpp:6:10: note: ‘std::ofstream cout’ previously declared here 6 | ofstream cout("anagrame1.out"); | ^~~~ anagrame1.cpp:52:5: error: redefinition of ‘int n’ 52 | int n , x[10] , p[10] , a[10]; | ^ anagrame1.cpp:8:5: note: ‘int n’ previously declared here 8 | int n , x[10] , p[10] , a[10]; | ^ anagrame1.cpp:52:9: error: redefinition of ‘int x [10]’ 52 | int n , x[10] , p[10] , a[10]; | ^ anagrame1.cpp:8:9: note: ‘int x [10]’ previously declared here 8 | int n , x[10] , p[10] , a[10]; | ^ anagrame1.cpp:52:17: error: redefinition of ‘int p [10]’ 52 | int n , x[10] , p[10] , a[10]; | ^ anagrame1.cpp:8:17: note: ‘int p [10]’ previously declared here 8 | int n , x[10] , p[10] , a[10]; | ^ anagrame1.cpp:52:25: error: redefinition of ‘int a [10]’ 52 | int n , x[10] , p[10] , a[10]; | ^ anagrame1.cpp:8:25: note: ‘int a [10]’ previously declared here 8 | int n , x[10] , p[10] , a[10]; | ^ anagrame1.cpp:53:6: error: redefinition of ‘char s [10]’ 53 | char s[10]; | ^ anagrame1.cpp:9:6: note: ‘char s [10]’ previously declared here 9 | char s[10]; | ^ anagrame1.cpp:55:6: error: redefinition of ‘void afisare()’ 55 | void afisare() | ^~~~~~~ anagrame1.cpp:11:6: note: ‘void afisare()’ previously defined here 11 | void afisare() | ^~~~~~~ anagrame1.cpp:62:6: error: redefinition of ‘void back(int)’ 62 | void back(int k) | ^~~~ anagrame1.cpp:18:6: note: ‘void back(int)’ previously defined here 18 | void back(int k) | ^~~~ anagrame1.cpp:75:5: error: redefinition of ‘int main()’ 75 | int main() | ^~~~ anagrame1.cpp:31:5: note: ‘int main()’ previously defined here 31 | int main() | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Anagrame1 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ă.