Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5302 黄言岐 19选班长 C++ Wrong Answer 0 MS 260 KB 504 2024-11-09 15:04:21

Tests(0/10):


Code:

#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],n; int m; cin>>n; for(int i;i<=n*3;i++){ cin>>m; a[m]++; } int maxn=0; int no; for(int i=1;i<=n;i++){ if(maxn<a[i])maxn=a[i],no=i; } cout<<no<<endl; return 0; }


Run Info:

------Input------
7 4 4 1 7 2 4 3 1 3 5 2 1 1 6 6 6 6 5 3 4 1
------Answer-----
1
------Your output-----
4