QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#568207#9320. Find the Easiest ProblemCoffeecat996WA 9ms3876kbC++11828b2024-09-16 15:34:002024-09-16 15:34:06

Judging History

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

  • [2024-09-16 15:34:06]
  • 评测
  • 测评结果:WA
  • 用时:9ms
  • 内存:3876kb
  • [2024-09-16 15:34:00]
  • 提交

answer

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

int nums[30];
void solve()
{
	std::map < pair<string, string> , bool > results;
	std::memset (nums, 0, sizeof (nums));
	int n;
	std::cin >> n;
	for (int i = 1; i <= n; i++) {
		std::string name, pass, flag;
		std::cin >> name >> pass >> flag;
		if (flag == "accepted") {
			if (results[{name, pass}] == true) {
				nums[pass[0] - 'A']++;
				results[{name, pass}] = true;
			}
		}
	}
	int maxx = 0;
	for (int i = 0; i < 26; i++) {
		maxx = max (maxx, nums[i]);
	}
	for (int i = 0; i < 26; i++) {
		if (maxx == nums[i]) {
			std::cout << char(i + 'A') << "\n";
			return;
		}
	}
	
}
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: 3876kb

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
Wrong Answer
time: 9ms
memory: 3540kb

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...

output:

A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
...

result:

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