#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 | #64837640 | Utilizator | |
| Fișier | anagrame1.cpp | Dimensiune | 1023 B |
| Data încărcării | 05 Iunie 2026, 10:38 | Scor/rezultat | 100 puncte |
anagrame1.cpp: In function ‘int sol(int)’: anagrame1.cpp:12:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 12 | return (k == strlen(v)-1); | ~~^~~~~~~~~~~~~~ anagrame1.cpp: In function ‘int OK(int)’: anagrame1.cpp:17:19: warning: array subscript has type ‘char’ [-Wchar-subscripts] 17 | return (uz[x[k]] == 0); | ~~~^ anagrame1.cpp: In function ‘void afis()’: anagrame1.cpp:22:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 22 | for (int i = 0; i < strlen(v); i++) | ~~^~~~~~~~~~~ anagrame1.cpp: In function ‘void back(int)’: anagrame1.cpp:29:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 29 | for (int i = 0; i < strlen(v); i++) { | ~~^~~~~~~~~~~ anagrame1.cpp:32:19: warning: array subscript has type ‘char’ [-Wchar-subscripts] 32 | uz[v[i]] = 1; | ~~~^ anagrame1.cpp:37:19: warning: array subscript has type ‘char’ [-Wchar-subscripts] 37 | uz[v[i]] = 0; | ~~~^ anagrame1.cpp: In function ‘int main()’: anagrame1.cpp:49:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 49 | for (int i = 0; i < strlen(v)-1; i++) { | ~~^~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 40 | 40 | ||
| 3 | 0.007 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
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ă.