#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 | #61057319 | Utilizator | |
| Fișier | anagrame1.cpp | Dimensiune | 581 B |
| Data încărcării | 18 Noiembrie 2025, 10:44 | Scor/rezultat | Eroare de compilare |
anagrame1.cpp:2:1: error: 'ifstream' does not name a type ifstream fin("anagrame1.in"); ^ anagrame1.cpp:3:1: error: 'ofstream' does not name a type ofstream fout("anagrame1.out") ^ anagrame1.cpp:6:11: error: conflicting declaration 'int v [10]' int n,v[10]; ^ anagrame1.cpp:5:6: error: 'v' has a previous declaration as 'char v [10]' char v[10]; ^ anagrame1.cpp: In function 'void afis()': anagrame1.cpp:11:9: error: 'fout' was not declared in this scope fout<<v[i]<<" "; ^ anagrame1.cpp:12:5: error: 'fout' was not declared in this scope fout<<endl; ^ anagrame1.cpp:12:11: error: 'endl' was not declared in this scope fout<<endl; ^ anagrame1.cpp:12:11: note: suggested alternative: In file included from /usr/include/c++/4.8/istream:39:0, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from anagrame1.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ anagrame1.cpp: In function 'void backk(int)': anagrame1.cpp:23:36: error: 'afisare' was not declared in this scope if(valid(k)) if(k==n) afisare(k); ^ anagrame1.cpp:23:7: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(valid(k)) if(k==n) afisare(k); ^ anagrame1.cpp: In function 'int main()': anagrame1.cpp:30:5: error: 'fin' was not declared in this scope fin.getline(x, 256); ^ anagrame1.cpp:30:17: error: 'x' was not declared in this scope fin.getline(x, 256); ^ anagrame1.cpp:31:15: error: 'sort' was not declared in this scope sort(x,x+8) ^ anagrame1.cpp:31:15: note: suggested alternative: In file included from /usr/include/c++/4.8/algorithm:62:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from anagrame1.cpp:1: /usr/include/c++/4.8/bits/stl_algo.h:5483:5: note: 'std::sort' sort(_RandomAccessIterator __first, _RandomAccessIterator __last, ^ anagrame1.cpp:32:5: error: expected ';' before 'n' n=strlen(x); ^ anagrame1.cpp:33:11: error: 'back' was not declared in this scope back(1); ^
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ă.