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_23217202_29517.cpp: In function 'int main()':
0_0_23217202_29517.cpp:20:32: error: expected statement at end of input
             if(ch=='('||ch=='[')  //遇到'(' ']'就push                s.push(ch);            if(ch==')'||ch==']')            {                if(s.empty())  //如果匹配时栈顶为空,说明绝对是不匹配的                    flag=0;                else if((s.top()=='('&&ch==')')||(s.top()=='['&&ch==']'))  //匹配成功                    s.pop();            }        }        if(flag==1&&s.empty())            cout<<"Yes"<<endl;        else cout<<"No"<<endl;    }}
                                ^
0_0_23217202_29517.cpp:20:32: error: expected '}' at end of input
0_0_23217202_29517.cpp:20:32: error: expected '}' at end of input
0_0_23217202_29517.cpp:20:32: error: expected '}' at end of input


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-06-17 12:23:09, Gzip enabled