Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
94662 令狐文丽 19选班长 C++ Wrong Answer 1 MS 276 KB 267 2024-10-26 10:02:02

Tests(9/10):


Code:

#include<iostream> using namespace std; int main(){ int n,a,b[100]={},max = 0,ans =0; cin>>n; for(int i =1;i<3*n;i++){ cin>>a; b[a]++; } for(int i =1;i<=n;i++){ if(b[i]>max){ max = b[i]; ans = i; } } cout<<ans; return 0; }


Run Info:

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