| Problem | bookshelf |
|---|---|
| User | xyzidk9 |
| Submission Time | 2026-04-25 09:30:03 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
bookshelf.cpp: In function ‘int main()’:
bookshelf.cpp:11:5: error: ‘unordered_map’ was not declared in this scope
11 | unordered_map<int, int> position;
| ^~~~~~~~~~~~~
bookshelf.cpp:2:1: note: ‘std::unordered_map’ is defined in header ‘<unordered_map>’; did you forget to ‘#include <unordered_map>’?
1 | #include <iostream>
+++ |+#include <unordered_map>
2 | using namespace std;
bookshelf.cpp:11:19: error: expected primary-expression before ‘int’
11 | unordered_map<int, int> position;
| ^~~
bookshelf.cpp:21:13: error: ‘position’ was not declared in this scope
21 | position[k] = --L;
| ^~~~~~~~
bookshelf.cpp:25:13: error: ‘position’ was not declared in this scope
25 | position[k] = ++R;
| ^~~~~~~~
bookshelf.cpp:35:21: error: ‘position’ was not declared in this scope
35 |