Run ID:131789

提交时间:2025-10-01 16:19:57

#include<bits/stdc++.h> using namespace std; int x[10000]; int main(){ int a=0,b=0,c=0,top=0; while(true){ cin>>a; if(a==-1) break; if(a>0 && a<4) x[a]++; top++; } cout<<"A="<<x[1]<<endl; cout<<"B="<<x[2]<<endl; cout<<"C="<<x[3]<<endl; cout<<"Top="<<top<<endl; if(x[1]>top/2) cout<<"A-yes"; else if(x[2]>top/2) cout<<"B-yes"; else if(x[3]>top/2) cout<<"C-yes"; else cout<<"all-NO"; }