F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

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();
      |                                                                        ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-29 21:12:28, Gzip enabled