QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#594081#9320. Find the Easiest ProblemHansenWA 21ms3576kbC++141.1kb2024-09-27 18:58:472024-09-27 18:58:47

Judging History

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

  • [2024-09-27 18:58:47]
  • 评测
  • 测评结果:WA
  • 用时:21ms
  • 内存:3576kb
  • [2024-09-27 18:58:47]
  • 提交

answer

#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
#include<string>
#include<iostream>
#include<stdlib.h>
#include<cstring>
#include<string.h>
#include<time.h>
#include<ctype.h>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<numeric>
#include<assert.h>
#include<stack>
#include<queue>
#include<deque>
#include<unordered_map>
#include<vector>
#include<map>
#include<bitset>
#include<iomanip>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
int main() {
	int t;
	cin >> t;
	while (t--)
	{
		unordered_map<string,int> hash1;
		int flag[100005][100] = { 0 }, cnt = 0, shu[200] = { 0 },imax=0;
		char ans='A';
		int n;
		cin >> n;
		string team, s;
		char q;
		for (int i = 1; i <= n; i++)
		{
			cin >> team >> q >> s;
			if (hash1[team] == 0)
				hash1[team] = ++cnt;
			if (flag[hash1[team]][q] == 0 && s == "hash1[team]")
				shu[q]++;
		}
		for (int i = 65; i <= 65 + 25; i++)
		{
			if (shu[i] > imax)
			{
				imax = shu[i];
				ans = i;
			}
		}
		cout << ans << endl;
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3576kb

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: 21ms
memory: 3508kb

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'