Problema | oop_3 | Operații I/O |
![]() oop_3.in /oop_3.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58012856 | Utilizator | |
Fișier | oop_3.cpp | Dimensiune | 492 B |
Data încărcării | 08 Mai 2025, 11:12 | Scor / rezultat | Eroare de compilare |
oop_3.cpp: In function 'void Push(int)': oop_3.cpp:6:5: error: 'stiva' was not declared in this scope stiva[++contor] = x; ^ oop_3.cpp:6:13: error: 'contor' was not declared in this scope stiva[++contor] = x; ^ oop_3.cpp:8:9: error: 'maxStiva' was not declared in this scope maxStiva[contor] = x; ^ oop_3.cpp:10:9: error: 'maxStiva' was not declared in this scope maxStiva[contor] = std::max(x, maxStiva[contor - 1]); ^ oop_3.cpp: In function 'void Pop()': oop_3.cpp:15:9: error: 'contor' was not declared in this scope if (contor >= 0) ^ oop_3.cpp: In function 'int Top()': oop_3.cpp:21:9: error: 'contor' was not declared in this scope if (contor < 0) ^ oop_3.cpp:23:12: error: 'stiva' was not declared in this scope return stiva[contor]; ^ oop_3.cpp:23:18: error: 'contor' was not declared in this scope return stiva[contor]; ^ oop_3.cpp: In function 'int Max()': oop_3.cpp:28:9: error: 'contor' was not declared in this scope if (contor < 0) ^ oop_3.cpp:30:12: error: 'maxStiva' was not declared in this scope return maxStiva[contor]; ^ oop_3.cpp:30:21: error: 'contor' was not declared in this scope return maxStiva[contor]; ^ oop_3.cpp: In function 'int Empty()': oop_3.cpp:35:4: error: 'contor' was not declared in this scope if(contor==0) ^ oop_3.cpp: In function 'int main()': oop_3.cpp:46:5: error: 'Stiva' was not declared in this scope Stiva w; ^ oop_3.cpp:46:11: error: expected ';' before 'w' Stiva w; ^ oop_3.cpp:54:13: error: 'w' was not declared in this scope w.Push(x); ^ oop_3.cpp:57:13: error: 'w' was not declared in this scope w.Pop(); ^ oop_3.cpp:59:21: error: 'w' was not declared in this scope fout << w.Top() << "\n"; ^ oop_3.cpp:61:21: error: 'w' was not declared in this scope fout << w.Max() << "\n"; ^ oop_3.cpp: In function 'int Top()': oop_3.cpp:24:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ oop_3.cpp: In function 'int Max()': oop_3.cpp:31:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema oop_3 face parte din a doua categorie. Pentru aceste probleme se folosește un program suport, furnizat de propunătorul problemei. 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ă.