提交时间:2026-07-04 16:56:15

运行 ID: 75670

#include<bits/stdc++.h> using namespace std; int A,B,C; int mx; int main(){ int n;cin>>n; for(int i=0;i<n;i++){ int x;cin>>x; if(x==1)A++; else if(x==2)B++; else C++; } if(A>B and A>C){ cout<<"A"; mx=A; }if(B>A and B>C){ cout<<"B"; mx=B; }if(C>A and C>B){ cout<<"C"; mx=C; }else{ if(A==B and mx!=C)cout<<"NONE"; if(A==C and mx!=B)cout<<"NONE"; if(B==C and mx!=A)cout<<"NONE"; if(A==B and A==C)cout<<"NONE"; } return 0; }