Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
70065 夏梓瑞 19选班长II C++ Compile Error 0 MS 0 KB 1328 2024-04-13 15:32:47

Tests(0/0):


Code:

{ int tot=0,d[10000]={0},x; while(1){ cin>>x; if(x==-1){ break; } if(x==1){ d[x]++; tot++; } if(x==2){ d[x]++; tot++; } if(x==3){ d[x]++; tot++; } if(x==4){ tot++; } } cout<<"A="<<d[1]<<endl<<"B="<<d[2]<<endl<<"C="<<d[3]<<endl<<"Tot="<<tot<<endl; if(d[1]==tot/2){ cout<<"A-yes"; } else if(d[2]>=tot/2){ cout<<"B-yes";} else if(d[2]>=tot/2){ cout<<"C-yes";} else cout<<"all-NO"; return 0; }


Run Info:

Main.cc:1:1: error: expected unqualified-id before '{' token
 {
 ^