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_31907799_31898.cpp: In function 'int main()':
0_0_31907799_31898.cpp:3:396: error: expected statement at end of input
 using namespace std;int main(){    int n,a,i;    string str; while(cin>>n) {  getchar();  while(n--)  {   getline(cin,str);   a=0;   if(str[0]=='_'||(str[0]>='A'&&str[0]<='Z')||(str[0]>='a'&&str[0]<='z'))   {    for(i=1;i<str.size();i++)    {     if(str[i]=='_'||(str[i]>='A'&&str[i]<='Z')||(str[i]>='a'&&str[i]<='z')||(str[i]>='0'&&str[i]<='9'))     {      a++;     }    }    if(a==str.size()-1)//i是从str[1]开始的    {     cout<<"yes"<<endl;    }    else    {     cout<<"no"<<endl;     }   }   else   {    cout<<"no"<<endl;   }  } } return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                            ^
0_0_31907799_31898.cpp:3:396: error: expected '}' at end of input
0_0_31907799_31898.cpp:3:396: error: expected '}' at end of input
0_0_31907799_31898.cpp:3:396: error: expected '}' at end of input
0_0_31907799_31898.cpp:3:396: 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-11-16 07:21:10, Gzip enabled