QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#576491#9320. Find the Easiest ProblemkramQAQWA 0ms3668kbC++14599b2024-09-19 20:39:062024-09-19 20:39:07

Judging History

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

  • [2024-09-19 20:39:07]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3668kb
  • [2024-09-19 20:39:06]
  • 提交

answer

#include <bits/stdc++.h>
#define endl '\n'
#define int long long
using namespace std;
 
void solve()
{
	int n;
	cin >> n;
	map<char,int> mp;
	for (int i = 0 ; i < n ; ++i){
		string s1,s2;
		char x;
		cin >> s1;
		cin >> x;
		cin >> s2;
		if (s2 == "accepted") mp[x]++; 
	}
	int max = 0;
	char ans;
	for (auto& i: mp){
		if (i.second > max && i.first > ans){
			max = i.second;
			ans = i.first;
		}
	}
	cout << ans << endl;
}
 
 
signed main()
{
	ios::sync_with_stdio(0);
	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: 3668kb

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
B

result:

wrong answer 2nd lines differ - expected: 'A', found: 'B'