QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#591511#9320. Find the Easiest ProblemmmzskmWA 0ms3568kbC++17702b2024-09-26 16:15:182024-09-26 16:15:19

Judging History

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

  • [2024-09-26 16:15:19]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3568kb
  • [2024-09-26 16:15:18]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long

void solve()
{
	int n;
	cin >> n;
	vector<string> v(500);
	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 = min(i.first, ans);
		}
	}
	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: 0
Wrong Answer
time: 0ms
memory: 3568kb

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:




result:

wrong answer 1st lines differ - expected: 'A', found: ''