Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78464 曹铭竣 19选班长 C++ Accepted 1 MS 268 KB 277 2024-06-22 09:45:13

Tests(10/10):


Code:

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