QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#569447#9320. Find the Easiest ProblemRaniyWA 6ms3704kbC++14901b2024-09-16 23:01:252024-09-16 23:01:26

Judging History

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

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

answer

#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 1e5+5, MOD = 998244353;
int n;
map<string, bool> mp;
struct node{
	int problem;
	int num;
	
	bool operator < (const node & e) const{
		if(num == e.num) return problem > e.problem;
		return num < e.num;
	}
}arr[30];

void solve(){
	for(int i = 0; i < 30; i ++){
		arr[i].num = 0;
		arr[i].problem = i;
	}
	cin >> n;
	string name;
	char Id;
	string status;
	for(int i = 0; i < n; i ++){
		cin >> name >> Id >> status;
		bool Is = (status == "accepted" ? 1 : 0);
		name += Id;
		int id = Id - 'A';
		if(!mp[name] && Is){
			arr[id].num ++;
			mp[name] = 1;
		}
	}
	sort(arr,arr+26);
	cout << char(arr[25].problem + 'A') << endl;
}

signed main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL); cout.tie(NULL);
	int t;
	cin >> t;
	while(t --){
		solve();
	}

	return 0;
}


Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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: 3704kb

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
E
H
I
B
B
G
H
S
C
M
B
Q
R
A
M
D
B
A
D
G
P
S
P
A
I
A
X
A
E
L
B
V
R
A
A
A
C
A
A
A
A
A
A
A
A
W
C
A
A
A
A
L
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
K
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
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 3rd lines differ - expected: 'Z', found: 'H'