#97
Să se scrie un program care verifică dacă două cuvinte date sunt anagrame.
| Problema | Anagrame | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64706531 | Utilizator | |
| Fișier | anagrame.cpp | Dimensiune | 372 B |
| Data încărcării | 25 Mai 2026, 10:56 | Scor/rezultat | 50 puncte |
anagrame.cpp: In function ‘int main()’: anagrame.cpp:8:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 8 | for(int i=0;i<strlen(a);i++) | ~^~~~~~~~~~ anagrame.cpp:10:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 10 | for(int j=0;j<strlen(b);j++) | ~^~~~~~~~~~ anagrame.cpp:16:13: warning: NULL used in arithmetic [-Wpointer-arith] 16 | if(b[0]!=NULL) | ^~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | OK. | 10 | 10 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.001 secunde | OK. | 20 | 20 | ||
| 6 | 0.001 secunde | OK. | 10 | 10 | ||
| 7 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 50 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Anagrame 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ă.