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_33614988_21479.cpp:3:9: error: 'pair' does not name a type
 typedef pair<char, int> pii;
         ^
0_0_33614988_21479.cpp:8:7: error: 'pii' was not declared in this scope
 stack<pii> q;
       ^
0_0_33614988_21479.cpp:8:10: error: template argument 1 is invalid
 stack<pii> q;
          ^
0_0_33614988_21479.cpp:8:10: error: template argument 2 is invalid
0_0_33614988_21479.cpp:8:13: error: invalid type in declaration before ';' token
 stack<pii> q;
             ^
0_0_33614988_21479.cpp: In function 'int main()':
0_0_33614988_21479.cpp:26:19: error: request for member 'push' in 'q', which is of non-class type 'int'
                 q.push(pii(s[i],i));
                   ^
0_0_33614988_21479.cpp:26:34: error: 'pii' was not declared in this scope
                 q.push(pii(s[i],i));
                                  ^
0_0_33614988_21479.cpp:29:24: error: request for member 'empty' in 'q', which is of non-class type 'int'
                 if (!q.empty())
                        ^
0_0_33614988_21479.cpp:31:25: error: request for member 'top' in 'q', which is of non-class type 'int'
                     t[q.top().second] = c[i] = 0;
                         ^
0_0_33614988_21479.cpp:32:23: error: request for member 'pop' in 'q', which is of non-class type 'int'
                     q.pop();
                       ^
0_0_33614988_21479.cpp:36:19: error: request for member 'empty' in 'q', which is of non-class type 'int'
         while (!q.empty())
                   ^
0_0_33614988_21479.cpp:38:15: error: request for member 'pop' in 'q', which is of non-class type 'int'
             q.pop();
               ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-02-26 18:37:28, Gzip enabled