QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#579836#9320. Find the Easiest Problemautu_rain#WA 3ms3624kbC++14795b2024-09-21 18:23:102024-09-21 18:23:10

Judging History

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

  • [2024-09-21 18:23:10]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3624kb
  • [2024-09-21 18:23:10]
  • 提交

answer

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

#define int long long
typedef long long i64;
typedef __int128 i128;
typedef pair<int, int> pII;
#define x first
#define y second
const int N = 2e5 + 10, M = 1e6 + 10, mod = 998244353;
int t, n, m, a[N], b[N];
pII c[N];

void solve() {
	cin >> n;
	set<string> s[26];
	for (int i = 0; i < n; i ++ ) {
		string a, c;
		char b;
		cin >> a >> b >> c;
		if (c[0] == 'a') s[b - 'A'].insert(a);
	}
	char ans = 'Z';
	int mx = 0;
	for (int i = 0; i < 26; i ++ )
		if (s[i].size() >= mx) {
			mx = s[i].size();
			ans = min(ans, (char)(i + 'A'));
		}
	cout << ans << endl;
}
signed main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr); cout.tie(nullptr);
	cin >> t;
	//t = 1;
	while (t -- ) solve();
	return 0;
}

详细

Test #1:

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

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: 3ms
memory: 3624kb

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'