Run ID:123219
提交时间:2025-06-28 13:33:36
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int b[n + 1]; for (int i = 1; i <= n; i++) { b[i = 0]; } for (int i = 1; i <= n * 3; i++) { int x; cin >> x; b[x] = b[x] + 1; } int c = 1; for (int i = 2; i <= n; i++) { if (b[i] > b[c]) { c = i; } } cout << c; return 0; }