QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#566739#9320. Find the Easiest ProblemRapidsWA 6ms3636kbC++20703b2024-09-16 01:26:032024-09-16 01:26:08

Judging History

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

  • [2024-09-16 01:26:08]
  • 评测
  • 测评结果:WA
  • 用时:6ms
  • 内存:3636kb
  • [2024-09-16 01:26:03]
  • 提交

answer

#include <bits/stdc++.h>

void solve() {
	int n, max = -1;
	std::cin >> n;

	std::array<int, 26> cnt;
	std::array<std::set<std::string>, 26> st;

	for (int i = 0; i < n; i++) {
		std::string a, b, c;
		std::cin >> a >> b >> c;
		if (c == "rejected" || st[b[0] - 'A'].count(a)) {
			continue;
		}
		int idx = b[0] - 'A';
		st[idx].insert(a);
		cnt[idx] += 1;
		max = std::max(max, cnt[idx]);
	}

	for (int i = 0; i < 26; i++) {
		if (cnt[i] == max) {
			std::cout << (char)(i + 'A') << '\n';
			return;
		}
	}
}

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0), std::cout.tie(0);

	int t;
	std::cin >> t;
	while (t--) {
		solve();
	}

	return 0;
}

詳細信息

Test #1:

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

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: 6ms
memory: 3636kb

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:

K
Q
W
W
K
Q
K
W
W
W
W
W
W
M
W
M
W
W
K
K
Q
Q
K
W
W
W
K
K
Q
W
W
S
M
W
Q
K
W
W
W
W
W
M
W
O
K
K
W
W
W
K
K
W
W
K
W
W
W
W
W
W
K
W
W
W
W
W
W
U
W
T
K
W
W
M
A
K
W
K
W
W
W
W
M
W
K
W
K
W
S
W
M
K
W
Q
W
W
K
W
W
W
W
W
W
W
W
W
W
S
W
W
W
K
K
W
K
W
Q
K
W
K
W
W
K
K
W
W
K
K
K
Q
W
W
W
Q
W
W
W
W
K
U
X
W
K
K
M
W
K
M
W
K
...

result:

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