QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#576718 | #9320. Find the Easiest Problem | Hythay | WA | 0ms | 3660kb | C++14 | 597b | 2024-09-19 21:42:00 | 2024-09-19 21:42:01 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int t;
int main(){
scanf("%d",&t);
while(t--){
int n;
map<char,int> mp;
set<string> st;
scanf("%d",&n);
while(n--){
string s;
cin.ignore();
getline(cin,s);
if (st.find(s) == st.end()) {
st.insert(s);
if (s[8]=='a'){
mp[s[6]]++;
}
}
else{
continue;
}
}
int ans = 0;
char p;
for(auto&pair :mp){
cout << pair.second<<endl;
if (pair.second > ans){
p = pair.first;
ans = pair.second;
}
}
cout << p<<endl;
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3660kb
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:
1 A A
result:
wrong answer 1st lines differ - expected: 'A', found: '1'