Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
75958 邓嘉瑶 19选班长II C++ Wrong Answer 1 MS 272 KB 495 2024-06-01 11:27:35

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int t[4]= {0},tot=0; int p1; for(int i=1; i<=10001; i++) { cin>>p1; if(p1==-1) { break; } tot++; if(p1>=1&&p1<=3) { t[p1]++; } } cout<<"A="<<t[1]<<endl; cout<<"B="<<t[2]<<endl; cout<<"C="<<t[3]<<endl; cout<<tot<<endl; if(t[1]*2>tot) { cout<<"A-yes"; } else if(t[2]*2>tot) { cout<<"B-yes"; } else if(t[3]*2>tot) { cout<<"C-yes"; } else { cout<<"all-NO"; } return 0; }


Run Info:

------Input------
4 3 4 2 1 3 1 4 1 4 1 2 1 3 3 1 3 4 3 1 4 4 4 4 4 4 4 4 1 1 4 4 1 2 4 3 4 2 1 2 1 3 3 3 -1
------Answer-----
A=12 B=5 C=10 Tot=44 all-NO
------Your output-----
A=12 B=5 C=10 44 all-NO