#3549
Se consideră o expresie corectă formată din numere naturale, paranteze rotunde și operatorii +, -, *. Să se evalueze expresia.
| Problema | eval_exp2 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.01 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64930542 | Utilizator | |
| Fișier | eval_exp2.cpp | Dimensiune | 2.70 KB |
| Data încărcării | 15 Iunie 2026, 20:03 | Scor/rezultat | 50 puncte |
eval_exp2.cpp: In function ‘int main()’: eval_exp2.cpp:70:36: warning: array subscript has type ‘char’ [-Wchar-subscripts] 70 | while (nop > 0 && prio[c] <= prio[stop[nop-1]]) { | ^ eval_exp2.cpp:70:57: warning: array subscript has type ‘char’ [-Wchar-subscripts] 70 | while (nop > 0 && prio[c] <= prio[stop[nop-1]]) { | ~~~~~~~~~~^ In file included from /usr/include/c++/13/iostream:41, from eval_exp2.cpp:1: In member function ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>]’, inlined from ‘int main()’ at eval_exp2.cpp:124:11: /usr/include/c++/13/ostream:204:25: warning: ‘rez’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ eval_exp2.cpp: In function ‘int main()’: eval_exp2.cpp:15:36: note: ‘rez’ was declared here 15 | long long nr, nval, nop, x, y, rez; // nval = nr de val din st de val; nop = nr de val din st de op | ^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | OK. | 10 | 10 | ||
| 3 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 4 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 7 | 0.001 secunde | OK. | 10 | 10 | ||
| 8 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 9 | 0.002 secunde | OK. | 10 | 10 | ||
| 10 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 50 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema eval_exp2 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ă.