Run ID:155502

提交时间:2026-06-07 14:07:13

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