| Problem | minstack |
|---|---|
| User | shenshiqi |
| Submission Time | 2025-12-11 09:10:57 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
minstack.cpp:8:1: error: ‘unordered_map’ does not name a type
8 | unordered_map <int, int> occurrences;
| ^~~~~~~~~~~~~
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:13:2: error: ‘occurrences’ was not declared in this scope
13 | occurrences[X]++;
| ^~~~~~~~~~~
minstack.cpp: In function ‘void pop()’:
minstack.cpp:18:2: error: ‘occurrences’ was not declared in this scope
18 | occurrences[curTop]--;
| ^~~~~~~~~~~
minstack.cpp: In function ‘int getMin()’:
minstack.cpp:28:12: error: ‘occurrences’ was not declared in this scope
28 | auto it = occurrences.begin();
| ^~~~~~~~~~~