#135
Sablon
Să se scrie un program care determină cel mai bun șablon comun a două șiruri de caractere.
Variante Bacalaureat 2009
Problema | Sablon | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53391396 | Utilizator | |
Fișier | sablon.cpp | Dimensiune | 688 B |
Data încărcării | 27 Octombrie 2024, 20:54 | Scor / rezultat | 40 puncte |
sablon.cpp: In function 'int main()': sablon.cpp:8:16: warning: array subscript has type 'char' [-Wchar-subscripts] for(i=0;s[i]!=' ';i++) ^ sablon.cpp:12:16: warning: array subscript has type 'char' [-Wchar-subscripts] for(i=0;s[i]!=' ';i++) ^ sablon.cpp:14:14: warning: array subscript has type 'char' [-Wchar-subscripts] if(s[i]!='a' && s[i]!='e' && s[i]!='i' && s[i]!='o' && s[i]!='u' && s[i+c]!='a' && s[i+c]!='e' && s[i+c]!='i' && s[i+c]!='o' && s[i+c]!='u' ) ^ sablon.cpp:14:27: warning: array subscript has type 'char' [-Wchar-subscripts] if(s[i]!='a' && s[i]!='e' && s[i]!='i' && s[i]!='o' && s[i]!='u' && s[i+c]!='a' && s[i+c]!='e' && s[i+c]!='i' && s[i+c]!='o' && s[i+c]!='u' ) ^ sablon.cpp:14:40: warning: array subscript has type 'char' [-Wchar-subscripts] if(s[i]!='a' && s[i]!='e' && s[i]!='i' && s[i]!='o' && s[i]!='u' && s[i+c]!='a' && s[i+c]!='e' && s[i+c]!='i' && s[i+c]!='o' && s[i+c]!='u' ) ^ sablon.cpp:14:53: warning: array subscript has type 'char' [-Wchar-subscripts] if(s[i]!='a' && s[i]!='e' && s[i]!='i' && s[i]!='o' && s[i]!='u' && s[i+c]!='a' && s[i+c]!='e' && s[i+c]!='i' && s[i+c]!='o' && s[i+c]!='u' ) ^ sablon.cpp:14:66: warning: array subscript has type 'char' [-Wchar-subscripts] if(s[i]!='a' && s[i]!='e' && s[i]!='i' && s[i]!='o' && s[i]!='u' && s[i+c]!='a' && s[i+c]!='e' && s[i+c]!='i' && s[i+c]!='o' && s[i+c]!='u' ) ^ sablon.cpp:20:17: warning: array subscript has type 'char' [-Wchar-subscripts] if((s[i]=='a' || s[i]=='e' || s[i]=='i' || s[i]=='o' || s[i]=='u')&& (s[i+c]=='a' || s[i+c]=='e' || s[i+c]=='i' || s[i+c]=='o' || s[i+c]=='u' )) ^ sablon.cpp:20:30: warning: array subscript has type 'char' [-Wchar-subscripts] if((s[i]=='a' || s[i]=='e' || s[i]=='i' || s[i]=='o' || s[i]=='u')&& (s[i+c]=='a' || s[i+c]=='e' || s[i+c]=='i' || s[i+c]=='o' || s[i+c]=='u' )) ^ sablon.cpp:20:43: warning: array subscript has type 'char' [-Wchar-subscripts] if((s[i]=='a' || s[i]=='e' || s[i]=='i' || s[i]=='o' || s[i]=='u')&& (s[i+c]=='a' || s[i+c]=='e' || s[i+c]=='i' || s[i+c]=='o' || s[i+c]=='u' )) ^ sablon.cpp:20:56: warning: array subscript has type 'char' [-Wchar-subscripts] if((s[i]=='a' || s[i]=='e' || s[i]=='i' || s[i]=='o' || s[i]=='u')&& (s[i+c]=='a' || s[i+c]=='e' || s[i+c]=='i' || s[i+c]=='o' || s[i+c]=='u' )) ^ sablon.cpp:20:69: warning: array subscript has type 'char' [-Wchar-subscripts] if((s[i]=='a' || s[i]=='e' || s[i]=='i' || s[i]=='o' || s[i]=='u')&& (s[i+c]=='a' || s[i+c]=='e' || s[i+c]=='i' || s[i+c]=='o' || s[i+c]=='u' )) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 30 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 30 | 0 | ||
4 | 0 secunde | OK. | 30 | 30 | ||
Punctaj total | 40 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Sablon 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ă.