0_0_39800967_28515.cpp: In function 'int main()':
0_0_39800967_28515.cpp:14:28: error: 'queue' was not declared in this scope
14 | unordered_map<int, queue<int>> posMap; // 存储每个模板出现的位置队列
| ^~~~~
0_0_39800967_28515.cpp:5:1: note: 'std::queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
4 | #include <set>
+++ |+#include <queue>
5 |
0_0_39800967_28515.cpp:14:37: error: template argument 2 is invalid
14 | unordered_map<int, queue<int>> posMap; // 存储每个模板出现的位置队列
| ^~
0_0_39800967_28515.cpp:14:37: error: template argument 5 is invalid
0_0_39800967_28515.cpp:17:19: error: invalid types 'int[__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}]' for array subscript
17 | posMap[T[i]].push(i);
| ^
0_0_39800967_28515.cpp:27:19: error: invalid types 'int[int]' for array subscript
27 | posMap[currTemplate].pop(); // 当前的位置已经处理
| ^
0_0_39800967_28515.cpp:30:33: error: invalid types 'int[int]' for array subscript
30 | int nextPos = posMap[currTemplate].empty() ? N + 1 : posMap[currTemplate].front();
| ^
0_0_39800967_28515.cpp:30:72: error: invalid types 'int[int]' for array subscript
30 | int nextPos = posMap[currTemplate].empty() ? N + 1 : posMap[currTemplate].front();
| ^
|