| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 75670 | 廖元方 | 选班长 | C++ | 通过 | 100 | 0 MS | 244 KB | 485 | 2026-07-04 16:56:15 |
#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; }