| 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 | #64451945 | Utilizator | |
| Fișier | oop_3.cpp | Dimensiune | 970 B |
| Data încărcării | 07 Mai 2026, 16:38 | Scor/rezultat | Eroare de compilare |
oop_3.cpp:8:5: error: invalid use of template-name ‘std::stack’ without an argument list 8 | stack s; | ^~~~~ oop_3.cpp:8:5: note: class template argument deduction is only available with ‘-std=c++17’ or ‘-std=gnu++17’ In file included from /usr/include/c++/13/stack:63, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:160, from oop_3.cpp:1: /usr/include/c++/13/bits/stl_stack.h:99:11: note: ‘template<class _Tp, class _Sequence> class std::stack’ declared here 99 | class stack | ^~~~~ oop_3.cpp: In member function ‘void Stiva::Push(int)’: oop_3.cpp:13:9: error: ‘s’ was not declared in this scope 13 | s.push(x); | ^ oop_3.cpp: In member function ‘void Stiva::Pop()’: oop_3.cpp:18:13: error: ‘s’ was not declared in this scope 18 | if( !s.empty()) | ^ oop_3.cpp: In member function ‘int Stiva::Top()’: oop_3.cpp:25:14: error: ‘s’ was not declared in this scope 25 | if( !s.empty()) | ^ oop_3.cpp: In member function ‘int Stiva::Max()’: oop_3.cpp:33:13: error: ‘s’ was not declared in this scope 33 | if( s.empty()) return -1; | ^ oop_3.cpp:34:21: error: ‘s’ was not declared in this scope 34 | int maxim = s.top(); | ^ oop_3.cpp: In member function ‘int Stiva::Empty()’: oop_3.cpp:47:14: error: ‘s’ was not declared in this scope 47 | if( !s.empty()) return 0; | ^
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ă.