QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#567551#9320. Find the Easiest Problemxjt05WA 21ms3572kbC++23582b2024-09-16 12:43:372024-09-16 12:43:37

Judging History

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

  • [2024-09-16 12:43:37]
  • 评测
  • 测评结果:WA
  • 用时:21ms
  • 内存:3572kb
  • [2024-09-16 12:43:37]
  • 提交

answer

#include<iostream>
#include<map>
using namespace std;
typedef long long ll;
map < pair<string, char>, ll > q;
map<char, ll>f;
int main()
{
	ll t;
	cin >> t;
	while (t--)
	{
		ll n;
		cin >> n;
		for (ll i = 1; i <= n; i++)
		{
			string a, c;
			char b;
			cin >> a >> b >> c;
			if (c[0] == 'a')
			{
				if (q[{a, b}] == 0)
				{
					q[{a, b}]++;
					f[b]++;
				}
			}
		}
		ll j = 0;
		char y;
		for (ll i = 'A'; i <= 'Z'; i++)
		{
			char  k = (char)i;
			if (j < f[k])
			{
				j = f[k];
				y = k;
			}
		}
		cout << y << endl;
	}
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3520kb

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: 21ms
memory: 3572kb

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:

Z
P
P
H
H
H
Z
H
H
H
H
H
H
H
H
H
J
F
F
D
D
D
D
D
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 2nd lines differ - expected: 'E', found: 'P'