QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#574580#9320. Find the Easiest ProblemUTZWA 0ms3848kbC++14543b2024-09-18 22:59:392024-09-18 22:59:40

Judging History

你现在查看的是最新测评结果

  • [2024-09-18 22:59:40]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3848kb
  • [2024-09-18 22:59:39]
  • 提交

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'