| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 160629 | 王翊金恩 | 19选班长 | C++ | Wrong Answer | 1 MS | 268 KB | 352 | 2026-09-25 18:29:07 |
#include<bits/stdc++.h> using namespace std; int tpx[15]; 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; }
------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