QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#570137 | #9320. Find the Easiest Problem | AceTaffy258 | WA | 7ms | 8504kb | C++20 | 757b | 2024-09-17 14:12:44 | 2024-09-17 14:12:46 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int n,m;
set<char> ac[100005];
int acc[30];
char ques_id;
string team_name,isac;
int main(){
std::ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
int T;cin>>T;
while(T--){
cin>>n;
map<string,int> idx;
int cnt=0;
for(int i=0;i<26;i++){
acc[i]=0;
}
int ans=0;char ANS;
for(int i=1;i<=n;i++){
cin>>team_name>>ques_id>>isac;
if(!idx[team_name]){
idx[team_name]=(++cnt);
}
if(isac=="accepted"){
if(!ac[idx[team_name]].count(ques_id)){
ac[idx[team_name]].insert(ques_id);
acc[ques_id-'A']++;
if(acc[ques_id-'A']>ans){
ans=acc[ques_id-'A'];
ANS=ques_id;
}
}
}
}
cout<<ANS<<endl;
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 8504kb
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: 8204kb
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 F G Q S T Y M N T R V M K Y Y I I P D A Y D D X X B L L B C C C Y Z C C C C Q Q Q Q Q Q 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 R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R ...
result:
wrong answer 4th lines differ - expected: 'I', found: 'O'