QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#574580 | #9320. Find the Easiest Problem | UTZ | WA | 0ms | 3848kb | C++14 | 543b | 2024-09-18 22:59:39 | 2024-09-18 22:59:40 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
mt19937_64 mrand(random_device{}());
int n;
string a,b,c;
void solve()
{
map<string,set<string>> mp;
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>a>>b>>c;
if(c=="accepted")
{
mp[b].insert(a);
}
}
int maxx=0;
string name;
for(auto [u,v]:mp)
{
if(v.size()>maxx)
{
name=u;
}
}
cout<<name<<endl;
}
int main ()
{
ios::sync_with_stdio(false);
cin.tie(0);
int _=1;
cin>>_;
while(_--)
{
solve();
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3848kb
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:
C B
result:
wrong answer 1st lines differ - expected: 'A', found: 'C'