Run ID:126883
提交时间:2025-07-22 13:42:31
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int b[n+1] = {0}; for (int i = 0; i < 3*n; i++) { int x ; cin >> x; b[x]++; } int max = 1; for (int i = 2; i <= n; i++) { if (b[i] > b[max]) { max = i; } } cout << max; return 0; }