Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
121065 | 翁思宸 | 19选班长 | C++ | Accepted | 1 MS | 272 KB | 523 | 2025-06-06 18:41:24 |
#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 a[11]={0},n,x=0,max=0,max_i=0; cin>>n; for(int i=1;i<=n*3;i++){ cin>>x; a[x]++; } for(int j=1;j<=10;j++){ if(a[j]>max){ max=a[j]; max_i=j; } } cout<<max_i; return 0; }