QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#570612 | #9320. Find the Easiest Problem | yyf | WA | 0ms | 3560kb | C++14 | 641b | 2024-09-17 16:44:52 | 2024-09-17 16:44:58 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
void solve(){
int n;
cin>>n;
int cnt[30];
set<pair<string,char>> st;
char s2;
string s1,s3;
for(int i=0;i<n;i++){
cin>>s1>>s2>>s3;
if(s3=="accepted"){
if(st.find({s1,s2})!=st.end()) continue;
st.insert({s1,s2});
cnt[s2-'A']++;
}
}
char ans;
int Max=-1;
for(int i=0;i<30;i++){
if(cnt[i]>Max){
Max=cnt[i];
ans=i;
}
}
cout<<ans+'A'<<endl;
}
int main(){
int t;
cin>>t;
while(t--) solve();
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3560kb
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:
75 75
result:
wrong answer 1st lines differ - expected: 'A', found: '75'