| 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 | #64720823 | Utilizator | |
| Fișier | oop_3.cpp | Dimensiune | 668 B |
| Data încărcării | 26 Mai 2026, 08:12 | Scor/rezultat | Eroare de compilare |
oop_3.cpp: In function ‘void Push(int)’: oop_3.cpp:6:9: error: ‘st’ was not declared in this scope; did you mean ‘std’? 6 | st[++vf] = x; | ^~ | std oop_3.cpp:6:14: error: ‘vf’ was not declared in this scope 6 | st[++vf] = x; | ^~ oop_3.cpp: In function ‘void Pop()’: oop_3.cpp:11:9: error: ‘vf’ was not declared in this scope 11 | vf--; | ^~ oop_3.cpp: In function ‘int Top()’: oop_3.cpp:17:15: error: ‘st’ was not declared in this scope; did you mean ‘std’? 17 | return st[vf] ; | ^~ | std oop_3.cpp:17:18: error: ‘vf’ was not declared in this scope 17 | return st[vf] ; | ^~ oop_3.cpp: In function ‘int Max()’: oop_3.cpp:23:17: error: ‘vf’ was not declared in this scope 23 | while ( vf ) | ^~ oop_3.cpp:24:13: error: ‘maxi’ was not declared in this scope 24 | maxi = max(maxi,st[vf]), vf-- ; | ^~~~ oop_3.cpp:24:29: error: ‘st’ was not declared in this scope; did you mean ‘std’? 24 | maxi = max(maxi,st[vf]), vf-- ; | ^~ | std oop_3.cpp:26:5: warning: no return statement in function returning non-void [-Wreturn-type] 26 | } | ^ oop_3.cpp: In function ‘int Empty()’: oop_3.cpp:31:15: error: ‘vf’ was not declared in this scope 31 | if ( vf == 0 ) | ^~ oop_3.cpp: In function ‘int main()’: oop_3.cpp:41:5: error: ‘Stiva’ was not declared in this scope 41 | Stiva w; | ^~~~~ oop_3.cpp:49:13: error: ‘w’ was not declared in this scope 49 | w.Push(x); | ^ oop_3.cpp:52:13: error: ‘w’ was not declared in this scope 52 | w.Pop(); | ^ oop_3.cpp:54:21: error: ‘w’ was not declared in this scope 54 | fout << w.Top() << "\n"; | ^ oop_3.cpp:56:21: error: ‘w’ was not declared in this scope 56 | fout << w.Max() << "\n"; | ^
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ă.