QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#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;
}
详细
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