Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
126883 | 何睿函 | 19选班长 | C++ | Accepted | 2 MS | 272 KB | 297 | 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; }