#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 | #53272198 | Utilizator | |
Fișier | anagrame.cpp | Dimensiune | 572 B |
Data încărcării | 23 Octombrie 2024, 07:55 | Scor / rezultat | 50 puncte |
anagrame.cpp: In function 'int main()': anagrame.cpp:15:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=1;i<=strlen(a);i++) ^ anagrame.cpp:16:29: warning: NULL used in arithmetic [-Wpointer-arith] if(strcmp(a,b)!=NULL) ^ anagrame.cpp:19:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(strlen(b)==q) ^ anagrame.cpp:8:25: warning: unused variable 'p' [-Wunused-variable] { char a[256],b[256],*p,voc[]="aeiouAEIOU",sep[]=" ,.;!?;:"; ^ anagrame.cpp:8:27: warning: unused variable 'voc' [-Wunused-variable] { char a[256],b[256],*p,voc[]="aeiouAEIOU",sep[]=" ,.;!?;:"; ^ anagrame.cpp:8:46: warning: unused variable 'sep' [-Wunused-variable] { char a[256],b[256],*p,voc[]="aeiouAEIOU",sep[]=" ,.;!?;:"; ^ anagrame.cpp:9:9: warning: unused variable 'nr' [-Wunused-variable] int nr=0,n,nr1=0,f[10]={0},max=0,val=0,i,ct=0,iv,ic,j,in=0,cnt,q=0; ^ anagrame.cpp:9:14: warning: unused variable 'n' [-Wunused-variable] int nr=0,n,nr1=0,f[10]={0},max=0,val=0,i,ct=0,iv,ic,j,in=0,cnt,q=0; ^ anagrame.cpp:9:16: warning: unused variable 'nr1' [-Wunused-variable] int nr=0,n,nr1=0,f[10]={0},max=0,val=0,i,ct=0,iv,ic,j,in=0,cnt,q=0; ^ anagrame.cpp:9:22: warning: unused variable 'f' [-Wunused-variable] int nr=0,n,nr1=0,f[10]={0},max=0,val=0,i,ct=0,iv,ic,j,in=0,cnt,q=0; ^ anagrame.cpp:9:32: warning: unused variable 'max' [-Wunused-variable] int nr=0,n,nr1=0,f[10]={0},max=0,val=0,i,ct=0,iv,ic,j,in=0,cnt,q=0; ^ anagrame.cpp:9:38: warning: unused variable 'val' [-Wunused-variable] int nr=0,n,nr1=0,f[10]={0},max=0,val=0,i,ct=0,iv,ic,j,in=0,cnt,q=0; ^ anagrame.cpp:9:46: warning: unused variable 'ct' [-Wunused-variable] int nr=0,n,nr1=0,f[10]={0},max=0,val=0,i,ct=0,iv,ic,j,in=0,cnt,q=0; ^ anagrame.cpp:9:51: warning: unused variable 'iv' [-Wunused-variable] int nr=0,n,nr1=0,f[10]={0},max=0,val=0,i,ct=0,iv,ic,j,in=0,cnt,q=0; ^ anagrame.cpp:9:54: warning: unused variable 'ic' [-Wunused-variable] int nr=0,n,nr1=0,f[10]={0},max=0,val=0,i,ct=0,iv,ic,j,in=0,cnt,q=0; ^ anagrame.cpp:9:57: warning: unused variable 'j' [-Wunused-variable] int nr=0,n,nr1=0,f[10]={0},max=0,val=0,i,ct=0,iv,ic,j,in=0,cnt,q=0; ^ anagrame.cpp:9:59: warning: unused variable 'in' [-Wunused-variable] int nr=0,n,nr1=0,f[10]={0},max=0,val=0,i,ct=0,iv,ic,j,in=0,cnt,q=0; ^ anagrame.cpp:9:64: warning: unused variable 'cnt' [-Wunused-variable] int nr=0,n,nr1=0,f[10]={0},max=0,val=0,i,ct=0,iv,ic,j,in=0,cnt,q=0; ^ anagrame.cpp:10:10: warning: unused variable 'ok' [-Wunused-variable] bool ok=false,ok1=false; ^ anagrame.cpp:10:19: warning: unused variable 'ok1' [-Wunused-variable] bool ok=false,ok1=false; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | Exemplu | |
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
5 | 0 secunde | OK. | 20 | 20 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
7 | 0 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ă.