QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#576212#9320. Find the Easiest ProblemniYinRE 0ms3868kbC++17762b2024-09-19 19:25:052024-09-19 19:25:05

Judging History

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

  • [2024-09-19 19:25:05]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:3868kb
  • [2024-09-19 19:25:05]
  • 提交

answer

#include <bits/stdc++.h>		

#define fi first
#define se second
#define endl '\n'


using namespace std;
using LL = long long;

const int N = 1e5 + 9; 
const int mod = 998244353;


int n;
set<string> se[25];
string team,status;
char id;

void solve()
{
	cin >> n;	
	for (int i = 1;i <= n;i ++)
	{
		cin >> team >> id >> status;
		if (status == "accepted")
			se[id - 65].insert(team);
			// cout << id - 65 << endl;
	}
	
	int ans;
	int maxv = 0;
	for (int i = 0;i < 24;i ++)
		if (se[i].size() > maxv) maxv = se[i].size(),ans = i;

	// cout << ans << endl;
	cout << char('A' + ans) << endl;
}

int main()
{
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	int _ = 1;
	cin >> _;
	while(_--) solve();
	
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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
Runtime Error

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:


result: