Run ID:131809
提交时间:2025-10-01 16:26:36
#include<bits/stdc++.h> using namespace std; int x[100]; int main(){ int a,tot=0; while(true){ cin>>a; if(a==-1) break; if(a>0 && a<4) x[a]++; tot++; } cout<<"A="<<x[1]<<endl; cout<<"B="<<x[2]<<endl; cout<<"C="<<x[3]<<endl; cout<<"Tot="<<tot<<endl; if(x[1]>tot/2) cout<<"A-yes"; else if(x[2]>tot/2) cout<<"B-yes"; else if(x[3]>tot/2) cout<<"C-yes"; else cout<<"all-NO"; }