QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#567244 | #9320. Find the Easiest Problem | DUSK777 | WA | 0ms | 3640kb | C++14 | 801b | 2024-09-16 10:30:50 | 2024-09-16 10:30:50 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ll long long
struct node{
ll asc;
ll num;
};
bool cmp(node a,node b){
if(a.num==b.num){
return a.num>b.num;
}
return a.asc<b.asc;
}
void solu(){
ll n;
cin>>n;
vector<set<string>> team(200);
vector<node> cnt(200);
for(int i=0;i<200;i++){
cnt[i].asc=i;
}
for(int i=0;i<n;i++){
string name;
cin>>name;
char problem;
cin>>problem;
string state;
cin>>state;
if(state.front()=='a'){
ll amount = team[problem].size();
team[problem].insert(name);
if(amount != team[problem].size()){
cnt[problem].num++;
}
}
}
sort(cnt.begin(),cnt.end(),cmp);
cout<<(char)cnt[0].asc<<endl;
}
int main(){
ll q;
cin>>q;
while(q--){
solu();
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3640kb
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 B
result:
wrong answer 2nd lines differ - expected: 'A', found: 'B'