#848
Se dau n șiruri de paranteze rotunde. Să se stabilească, despre fiecare șir, dacă este corect parantezat.
| Problema | Paranteze1 | Operații I/O |
paranteze1.in/paranteze1.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64331310 | Utilizator | |
| Fișier | paranteze1.cpp | Dimensiune | 861 B |
| Data încărcării | 30 Aprilie 2026, 09:09 | Scor/rezultat | 20 puncte |
paranteze1.cpp: In function ‘int coad(char*)’: paranteze1.cpp:11:14: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 11 | while (i < strlen(s)){ | ~~^~~~~~~~~~~ paranteze1.cpp:12:29: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 12 | while (s[i] == '(' && i < strlen(s)) | ~~^~~~~~~~~~~ paranteze1.cpp:14:29: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 14 | while (s[i] == ')' && i < strlen(s)){ | ~~^~~~~~~~~~~ paranteze1.cpp:16:36: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 16 | for (int j = i-1; j< strlen(s)-2; j++) | ~^~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.003 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 20 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Paranteze1 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ă.