QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#574003 | #9320. Find the Easiest Problem | star | WA | 7ms | 3884kb | C++17 | 725b | 2024-09-18 20:32:20 | 2024-09-18 20:32:21 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
set<string>st[30];
void slove(){
int n;
cin>>n;
for(int i=1;i<=26;i++){
st[i].clear();
}
map<string,int>mp;
int tot=0;
for(int i=1;i<=n;i++){
string s;
char c;
string s1;
cin>>s>>c>>s1;
if(s1=="rejected")continue;
if(mp[s]==0)mp[s]=++tot;
int p=c-'A'+1;
st[p].insert(s);
}
char ans;
for(int i=1;i<=26;i++){
if(st[i].size()>st[i-1].size()){
ans=(i-1+'A');
}
}
cout<<ans<<'\n';
}
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t;
cin>>t;
while(t--){
slove();
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3580kb
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: 3884kb
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 Y X Q Z W X Y Y Z W V Z X Y Y X X X X Z Z X Y S Z Z Y Y X Z Z T X Z Y X Z Z Z Z Y U Z W Y Y Y Z V Z Y X V U X Z Y X W Z Y Z Y W X Y T X Y W Z D Z W M W W W Y Y Y Z Y X W Y Y X T Y Z Y Y Z T Z W Y X X W X X Y Z Z Y Z Z Y Y X Z Y Z U Y Z Y X T Y Y Z X Z Y Z Z W X Z Z X X Z Z X Z Y Z Z Y X X V X ...
result:
wrong answer 2nd lines differ - expected: 'E', found: 'P'