#97
Anagrame
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 | #27268189 | Utilizator | |
Fișier | anagrame.cpp | Dimensiune | 784 B |
Data încărcării | 15 Ianuarie 2021, 23:44 | Scor / rezultat | 40 puncte |
anagrame.cpp: In function 'int VerificareLitera(int)': anagrame.cpp:8:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j=0;j<strlen(s2);j++) ^ anagrame.cpp: In function 'int main()': anagrame.cpp:20:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0;i<strlen(s1);i++) ^ anagrame.cpp:29:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0;i<strlen(s1);i++) ^ anagrame.cpp:24:21: warning: array subscript is above array bounds [-Warray-bounds] ok[2][VerificareLitera(i)]=1; ^ anagrame.cpp:32:21: warning: array subscript is above array bounds [-Warray-bounds] p2*=ok[2][i]; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
3 | 0 secunde | OK. | 20 | 20 | ||
4 | 0 secunde | OK. | 20 | 20 | ||
5 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
Punctaj total | 40 |
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ă.