QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#567454 | #9320. Find the Easiest Problem | 1929902943 | WA | 13ms | 3632kb | C++14 | 740b | 2024-09-16 12:04:31 | 2024-09-16 12:04:31 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef pair<string,pair<char,bool>> ppp;
void sol(){
int n;
cin >> n;
vector<ppp> a(n);
vector<int> cnt(26);
for(int i = 0 ; i < n ; ++i){
string t;
cin >> a[i].first >> a[i].second.first >> t;
if(t == "accepted")a[i].second.second = true;
else a[i].second.second = false;
}
sort(a.begin(),a.end());
a.erase(unique(a.begin(),a.end()),a.end());
int ans = 0;
for(auto s:a){
if(s.second.second){
int k = s.second.first - 'A';
cnt[k]++;
if(cnt[ans] < cnt[k])ans = k;
}
}
cout << char(ans+'A') << endl;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);cout.tie(nullptr);
int t;
cin >> t;
while(t--)sol();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3632kb
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: 13ms
memory: 3628kb
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 I B I G H T T J I H R Z L W O I P P Y I A A N S Z Q O S O Z T H G L E S D G Z R C U V W P Z O P E A B U N Q T L O X W Z N E V Q I B G J O E M A H L A K J J S E W Z K K I S P O M G G H W I P T D O P F N K S Y Z Z G J G Q F O C O P U C I U E I P K Q R X N D N L Q L I X I H Z J Z Y K G F V F B X ...
result:
wrong answer 9th lines differ - expected: 'S', found: 'T'