QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#571762#9320. Find the Easiest ProblemluoZH111WA 0ms3616kbC++14822b2024-09-18 08:17:222024-09-18 08:17:22

Judging History

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

  • [2024-09-18 08:17:22]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3616kb
  • [2024-09-18 08:17:22]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define debugging 1
const int maxn = 200010;
#define pii pair<int, int>
#define f first
#define s second

int n;
int a[maxn];
int l[maxn], r[maxn];
int mp[30];
void solve() {
	string team, status;
	char c;
	int mx = 0;
	memset(mp, 0, sizeof(mp));
	cin >> n;
	for (int i = 1; i < n; ++i) {
		cin >> team >> c >> status;
		if (status[0] == 'a') {
			mx = max(mx, ++mp[c-'A']);
		}
	}
	int id = 0;
	for (int i = 0; i < 26; ++i) {
		if (mp[i] == mx) {
			id = i;
			break;
		}
	}
	cout << char('A' + id) << '\n';
}

int main() {
    int tt = 1;
    cin >> tt;
//    scanf("%d", &tt);
    while (tt--) {
        solve();
    }
    
    return 0;
}
/*
9
4
5 5 3 5
1: [1, 1]
2: [2, 2]
3: [3, 3]
4: [3, 4]
1
*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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: 0ms
memory: 3552kb

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
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
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: 'A'