QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#570127 | #9320. Find the Easiest Problem | AceTaffy258 | WA | 10ms | 3600kb | C++20 | 830b | 2024-09-17 14:05:45 | 2024-09-17 14:05:49 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int n,m;
int ac[100005][30];
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=1;i<=n;i++){
for(int j=0;j<26;j++){
ac[i][j]=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"){
ac[idx[team_name]][ques_id-'A']++;
if(ac[idx[team_name]][ques_id-'A']==1){
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: 0ms
memory: 3600kb
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: 10ms
memory: 3552kb
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'