Problem | minstack |
---|---|
User | aj |
Submission Time | 2025-01-27 10:13:26 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
minstack.cpp: In function ‘int getMin(std::stack<long long int>&)’:
minstack.cpp:6:24: error: no match for ‘operator[]’ (operand types are ‘std::stack<long long int>’ and ‘int’)
6 | long long min=minStack[0];
| ^
minstack.cpp:8:15: error: no match for ‘operator[]’ (operand types are ‘std::stack<long long int>’ and ‘long long int’)
8 | if (minStack[i]<min){
| ^
minstack.cpp:9:16: error: no match for ‘operator[]’ (operand types are ‘std::stack<long long int>’ and ‘long long int’)
9 | min=minStack[i];
| ^
minstack.cpp: In function ‘int main()’:
minstack.cpp:40:30: error: ‘class std::stack<long long int>’ has no member named ‘getMin’
40 | cout << minStack.getMin() << '\n';
| ^~~~~~