Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160630 王翊金恩 19选班长 C++ Wrong Answer 1 MS 268 KB 353 2026-09-25 18:30:25

Tests(1/10):


Code:

#include<bits/stdc++.h> using namespace std; int tpx[105]; int main() { int n,p1,p2,p3; cin>>n; for(int i=1;i<=n;i++) { cin>>p1>>p2>>p3; tpx[p1]++; tpx[p2]++; tpx[p2]++; } int mx=tpx[1]; int mxid=1; for(int j=1;j<=n;j++) { if(tpx[j]>mx) { mx=tpx[j]; mxid=j; } } cout<<mxid<<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