#889
CuvinteComune
Se dau două propoziții formate din litere mari și mici ale alfabetului englez și spații. Să se afișeze în ordine alfabetică cuvintele care apar în ambele șiruri.
Problema | CuvinteComune | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #47280230 | Utilizator | |
Fișier | cuvintecomune.cpp | Dimensiune | 1.94 KB |
Data încărcării | 08 Decembrie 2023, 10:40 | Scor / rezultat | 100 puncte |
cuvintecomune.cpp: In function 'bool egale(int, int)': cuvintecomune.cpp:11:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int k = 0 ; k < max(strlen(a[i]) , strlen(b[j])) ; ++k) ^ cuvintecomune.cpp: In function 'int main()': cuvintecomune.cpp:22:17: warning: NULL used in arithmetic [-Wpointer-arith] while(s[i]!=NULL) ^ cuvintecomune.cpp:25:11: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null] s[i+1]=NULL; ^ cuvintecomune.cpp:27:17: warning: NULL used in arithmetic [-Wpointer-arith] while(s[i]!=NULL) ^ cuvintecomune.cpp:45:17: warning: NULL used in arithmetic [-Wpointer-arith] while(s[i]!=NULL) ^ cuvintecomune.cpp:48:11: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null] s[i+1]=NULL; ^ cuvintecomune.cpp:50:17: warning: NULL used in arithmetic [-Wpointer-arith] while(s[i]!=NULL) ^ cuvintecomune.cpp:70:32: warning: NULL used in arithmetic [-Wpointer-arith] while(a[i][q]!=NULL) ^ cuvintecomune.cpp:72:24: warning: array subscript has type 'char' [-Wchar-subscripts] r[p][q]=tolower(a[i][q]); ^ cuvintecomune.cpp:92:24: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null] r[j][0]=NULL; ^ cuvintecomune.cpp:97:21: warning: NULL used in arithmetic [-Wpointer-arith] if(r[i][0]!=NULL) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
2 | 0 secunde | OK. | 40 | 40 | ||
3 | 0 secunde | OK. | 40 | 40 | ||
Punctaj total | 100 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CuvinteComune 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ă.