QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#567950#9320. Find the Easiest ProblemonewangzaiWA 33ms3808kbC++20551b2024-09-16 14:47:102024-09-16 14:47:15

Judging History

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

  • [2024-09-16 14:47:15]
  • 评测
  • 测评结果:WA
  • 用时:33ms
  • 内存:3808kb
  • [2024-09-16 14:47:10]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;

int main(){
	int T;
	cin >> T;
	while(T--)
	{
		map<string,int> mp;
		int n,Max = 0;
		cin >> n;
		string s1,s2,s3,ans;
		for(int i = 1; i <= n; i++)
		{
			cin >> s1 >> s2 >> s3;
			s1 = s1 + s2;
			if(mp[s1] == 0 && s3 == "accepted")
			{
				mp[s1] = 1;
				mp[s2]++;
				if(mp[s2] > Max)
				{
					Max = mp[s2];
					ans = s2;
				}
				// else if(mp[s2] == Max && s2[0] < ans[0])
				// {
					// ans = s2;
				// }
			}
		}
		cout << ans << endl;
	}
	return 0;
}

详细

Test #1:

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

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: 33ms
memory: 3808kb

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
Z
O
B
I
G
H
T
K
J
I
H
R
Z
X
W
O
I
V
I
Y
I
P
A
O
A
Z
F
O
F
O
R
T
H
G
K
E
S
D
H
D
R
Y
U
V
W
P
Z
O
T
E
A
U
U
M
J
T
L
Y
V
W
Z
N
E
O
Q
H
B
G
J
O
O
M
D
Z
J
K
K
W
J
S
E
W
Z
K
X
I
S
P
O
H
L
Z
H
W
I
P
T
D
O
P
F
N
X
S
Y
Z
S
G
J
H
Q
T
O
C
O
X
U
L
O
Y
E
J
P
S
Q
R
X
N
D
N
O
Q
L
M
X
R
H
Z
J
Z
Y
K
G
F
V
N
B
K
...

result:

wrong answer 4th lines differ - expected: 'I', found: 'O'