QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#568140 | #9320. Find the Easiest Problem | Clauvenater_# | RE | 0ms | 3588kb | C++20 | 935b | 2024-09-16 15:21:34 | 2024-09-16 15:21:36 |
Judging History
answer
#include <iostream>
#include <vector>
//#include <windef.h>
#include <algorithm>
#include <cstdlib>
#include <cassert>
#include <numeric>
#include <climits>
#include <set>
#include <map>
#define ENDL endl
using i64=long long;
std::istream& CIN = std::cin;
std::ostream& COUT = std::cout;
using namespace std;
int main() {
int tt;
cin>>tt;
while(tt--){
int n;
cin>>n;
map<string,set<string>> smi;
for(int i = 0;i<n;i++){
string team,problem,status;
CIN>>team>>problem>>status;
if(status == "accepted"){
smi[problem].insert(string(team.begin() + 4,team.end()));
}
}
pair<int,string> ans;
for(const auto& m:smi){
int x = m.second.size();
if(x > ans.first){
ans = make_pair(x,m.first);
}
}
cout<<ans.second<<endl;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3588kb
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
Runtime Error
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