Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
88054 王馨桐 19选班长 C++ Accepted 1 MS 268 KB 303 2024-08-17 11:09:18

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int t[100]; int main(){ int n; cin >>n; int p1,p2,p3; for(int i=1; i<=n;i++){ cin >>p1 >>p2 >>p3; t[p1]++; t[p2]++; t[p3]++; } int bz=1; for(int i=1; i<=n; i++){ if(t[i]>t[bz]){ bz=i; } } cout <<bz; return 0; }