QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#576722 | #9320. Find the Easiest Problem | Hythay | WA | 24ms | 4000kb | C++14 | 568b | 2024-09-19 21:42:53 | 2024-09-19 21:42:54 |
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){
if (pair.second > ans){
p = pair.first;
ans = pair.second;
}
}
cout << p<<endl;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3984kb
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: 24ms
memory: 4000kb
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:
I I I I I I I I I I I I I I I X X X X X X X X X I V V V V V I I I I I I I I I I I I I I I I I I I I I I I I I S S S S S S S S S S S S S S S S S H H H H H H I I I S S I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I O I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I ...
result:
wrong answer 1st lines differ - expected: 'Z', found: 'I'