QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#576257#9320. Find the Easiest ProblemcodefighterWA 20ms3584kbC++14477b2024-09-19 19:39:052024-09-19 19:39:05

Judging History

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

  • [2024-09-19 19:39:05]
  • 评测
  • 测评结果:WA
  • 用时:20ms
  • 内存:3584kb
  • [2024-09-19 19:39:05]
  • 提交

answer

#include<iostream>

using namespace std;

int p[32];

int main()
{
	int t;
	cin >> t;
	
	while(t--)
	{
		int n;
		cin >> n;
		char v;
		
		while(n--)
		{
			string a;
			char s;
			string c;
			cin >> a >> s >> c;
			
			if(c[0] == 'a')
			{
				p[s-65]++;
			}
		
			int max = 0;
	
			for(int i = 0 ; i < 32 ; i++)
			{
				if(p[i] > max)
				{
					max = p[i];
					v = i + 65;
				}
			}
		
		}
		cout << v << endl;
	}
return 0;
}

詳細信息

Test #1:

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

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: 20ms
memory: 3532kb

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
P
Z
Z
Z
Z
Z
H
H
H
J
J
H
J
J
J
J
J
J
J
J
J
J
J
J
J
J
J
J
J
J
J
J
Y
Y
Y
Z
Z
S
S
H
S
S
S
S
Z
H
H
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
H
H
O
J
O
J
O
O
O
I
H
H
H
H
H
H
H
H
H
H
H
H
O
O
O
O
O
O
O
O
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
...

result:

wrong answer 2nd lines differ - expected: 'E', found: 'P'