Run ID:155194

提交时间:2026-06-05 18:46:11

#include<bits/stdc++.h> using namespace std; int d[10005]; int main(){ int a=0,b=0,c=0,tot=0,max=0; for(int i=1;i<=10000;i++){ cin>>d[i]; if(d[i]==-1){ break; } if(d[i]==1) a++; else if(d[i]==2) b++; else if(d[i]==3) c++; tot++; } printf("A=%d\nB=%d\nC=%d\nTot=%d\n",a,b,c,tot); tot=double(tot)/2; if(a>tot) cout<<"A-yes"; else if(b>tot) cout<<"B-yes"; else if(c>tot)cout<<"C-yes"; else cout<<"all-No"; return 0; }