QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#591505 | #9320. Find the Easiest Problem | mmzskm | RE | 0ms | 3640kb | C++17 | 690b | 2024-09-26 16:12:49 | 2024-09-26 16:12:49 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define int long long
void solve()
{
int n;
cin >> n;
vector<string> v(30);
map<string, int> m;
for (int i = 0; i < n; i++)
{
string t, p, s;
cin >> t >> p >> s;
if (s == "accepted" && v[t[4] - 'A'].find(p[0]) == -1) // t队的p题还没AC
{
m[p]++;
v[t[4] - 'A'].push_back(p[0]);
}
}
int maxn = -1;
string ans;
for (auto i : m)
{
if (maxn < i.second)
{
maxn = i.second;
ans = i.first;
}
}
cout << ans << endl;
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
int T = 1;
cin >> T;
while (T--)
{
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3640kb
input:
2 5 teamA A accepted teamB B rejected teamC A accepted teamB B accepted teamD C accepted 4 teamA A rejected teamB A accepted teamC B accepted teamC B accepted
output:
A A
result:
ok 2 lines
Test #2:
score: -100
Runtime Error
input:
1000 44 WaiooyIXa O accepted WaiooyIXa P accepted ZYYsNWag P accepted DPIawQg D rejected IzPdjnM Z rejected Ra D rejected kwQyGxLo I rejected DPIawQg L accepted kwQyGxLo I accepted mmWxDuADCB D rejected PXwVAOgwiz P rejected ZYYsNWag U accepted IzPdjnM Z accepted TgBNO P rejected kwQyGxLo J accepted...