Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
102428 | 罗迎甲 | 19选班长 | C++ | Accepted | 1 MS | 316 KB | 550 | 2024-12-21 16:08:40 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int x=0,c=0,b=0,n=0; cin>>n; int a[10086]={}; for(int z=1;z<=3*n;z++) { cin>>x; a[x]++; } for(int z=1;z<=n;z++) { if(a[z]>b) { b=a[z]; c=z; } } cout<<c; return 0; }