QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#568344#9320. Find the Easiest ProblemlanhuoWA 7ms3660kbC++17819b2024-09-16 16:08:552024-09-16 16:08:56

Judging History

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

  • [2024-09-16 16:08:56]
  • 评测
  • 测评结果:WA
  • 用时:7ms
  • 内存:3660kb
  • [2024-09-16 16:08:55]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
//#pragma GCC optimize(2)
//#pragma GCC optimize(3,"Ofast","inline")
typedef long long ll;
#define pll pair<ll,ll>
const int inf=0x3f3f3f3f;
const int N=1e5+5;
const int mod=99844854;
#define PI 3.1415926
#define fi first
#define se second
ll n,ma;
char ans,s2,s;
string s1,s3;
set<string>se[26];
void solve(){
	cin>>n;ma=0;
	for(int i=1;i<=n;++i){
		cin>>s1>>s2>>s3;
		if(s3[0]=='a'){
			ll cnt=s2-'A';
			se[cnt].insert(s1);
			if(se[cnt].size()>ma){
				ma=se[cnt].size();
				ans=s2;
			}
//			else if(se[cnt].size()==ma){
//				ans=min(ans,s2);
//			}
		}
	}
	cout<<ans<<endl;
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int __;cin>>__;
    while(__--){
    	solve();
	}
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
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: 7ms
memory: 3660kb

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

result:

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