QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#566986 | #9320. Find the Easiest Problem | Lam017 | Compile Error | / | / | C++20 | 906b | 2024-09-16 04:38:38 | 2024-09-16 04:38:39 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
map<char, set<string>> solved;
for (int i = 0; i < n; i++) {
string team, problem, result;
cin >> team >> problem >> result;
if (result == "accepted") {
solved[problem[0]].insert(team);
}
}
char ea = 'Z' + 1;
int maxS = 0;
for (auto& [problem, teams] : solved) {
int num = teams.size();
if (num > maxS ||
(num == maxS && problem < ea)) {
maxS = numS;
ea = problem;
}
}
cout << ea << endl;
}
return 0;
}
詳細信息
answer.code: In function ‘int main()’: answer.code:31:24: error: ‘numS’ was not declared in this scope; did you mean ‘num’? 31 | maxS = numS; | ^~~~ | num