#3549
eval_exp2
C++
Se consideră o expresie corectă formată din numere naturale, paranteze rotunde și operatorii +
, -
, *
. Să se evalueze expresia.
Problema | eval_exp2 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.01 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58536141 | Utilizator | |
Fișier | eval_exp2.cpp | Dimensiune | 3.29 KB |
Data încărcării | 15 Iunie 2025, 19:02 | Scor / rezultat | 20 puncte |
eval_exp2.cpp: In function 'std::vector<Token> tokenize(std::string&)': eval_exp2.cpp:67:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (next < buf.size()) { ^ eval_exp2.cpp: In function 'long long int eval(std::vector<Token>&, int, int)': eval_exp2.cpp:100:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (i < tokens.size()) { ^ eval_exp2.cpp:102:16: warning: enumeration value 'INT' not handled in switch [-Wswitch] switch (tokens[i].type) { ^ eval_exp2.cpp:102:16: warning: enumeration value 'OPEN_PAR' not handled in switch [-Wswitch] eval_exp2.cpp:102:16: warning: enumeration value 'CLOSE_PAR' not handled in switch [-Wswitch] eval_exp2.cpp:122:9: warning: 'op' may be used uninitialized in this function [-Wmaybe-uninitialized] switch (op) { ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | Depășit | Limita de timp depășită | 10 | 0 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | Depășit | Limita de timp depășită | 10 | 0 | ||
9 | Depășit | Limita de timp depășită | 10 | 0 | ||
10 | Depășit | Limita de timp depășită | 10 | 0 | ||
Punctaj total | 20 |
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ă.