Run ID:122280

提交时间:2025-06-15 09:55:48

#include<bits/stdc++.h> using namespace std; int main(){ int a=0,b=0,c=0,tot=0,bh; for(int i=1;i<=10000;i++) { cin>>bh; if(bh==-1) break; if(bh==1) a++; if(bh==2) b++; if(bh==3) c++; tot++; } cout<<"A="<<a<<endl; cout<<"B="<<b<<endl; cout<<"C="<<c<<endl; cout<<"Tot="<<tot<<endl; if(a*2>=tot) cout<<"A-yes"; else if(b*2>=tot) cout<<"B-yes"; else if(c*2>=tot) cout<<"C-yes"; else cout<<"all-NO"; return 0; }