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_31907815_28010.cpp: In function 'int main()':
0_0_31907815_28010.cpp:3:71: error: expected '}' at end of input
 using namespace std;int main(){ int n,sum; int flag; cin>>n; getchar();  //消除换行符\n对cin.getline的影响  while(n--){  char ch[51];    cin.getline(ch,51);  flag=0;  sum=0;  int ch_len=strlen(ch);  if(!(ch[0]=='_'||(ch[0]>='a'&&ch[0]<='z')||(ch[0]>='A'&&ch[0]<='Z'))){      cout<<"no"<<endl;       continue;  }      for(int i=0;i<ch_len;i++)     if(ch[i]=='_'||(ch[i]>='a'&&ch[i]<='z')||(ch[i]>='A'&&ch[i]<='Z')||(ch[i]<='9'&&ch[i]>='0'))      sum++;    if(sum==ch_len)      cout<<"yes"<<endl;    else cout<<"no"<<endl; } return 0;}
                                                                       ^


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:46:46, Gzip enabled