Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
61340 张江鹏 19选班长II C++ Compile Error 0 MS 0 KB 531 2023-12-03 17:41:03

Tests(0/0):


Code:

#include <iostream> using namespace std; int main(){ int xz[4]={0},sum=0; int p; while(1){ cin>>p; if(p==-1){ break; } sum++; if(p>0&&p<4){ xz[p]++; } } cout<<"A="<<xz[1]<<endl; cout<<"B="<<xz[2]<<endl; cout<<"C="<<xz[3]<<endl; cout<<"Tot="<<sum<<endl; if(xz[1]>sum/2){ cout<<"A-yes"; return 0; } if(xz[2]>sum/2){ cout<<"B-yes"; return 0; } if(xz[3]>subm/2){ cout<<"C-yes"; return 0; } cout<<"all-NO"; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:28:12: error: 'subm' was not declared in this scope
   if(xz[3]>subm/2){
            ^