QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#570403 | #9320. Find the Easiest Problem | viliant | WA | 8ms | 3552kb | C++20 | 623b | 2024-09-17 15:40:43 | 2024-09-17 15:40:43 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
void easy(){
int n;
cin >> n;
string name,result;
char problem;
set<string> s[26];//下标为题号,对应元素为set 存储AC该题的队名(去重)
for(int i = 0;i < n;i++){
cin >> name >> problem >> result;
int x = problem - 'A';
s[x].insert(name);
}
char k = 0,max = 0;
for(int i = 0;i < 26;i++){
if(s[i].size() > max){
k = i +'A';
max = s[i].size();
}
}
cout << k << endl;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while(t--){
easy();
};
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3532kb
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: 8ms
memory: 3552kb
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:
P E C H A I N F E K H I F B X L R O A H J F I H A A A Q V T K A F A H G L E S D G D Q Y J V H C C O J V T B U E I T C O V H Z I G O N F O G I B E A D J L A K B J S U V Z A K A S P D H G J H W I I E G H A F L D V E S B R H K Q G P C W B F T I F E K P U Q R N V O N N G L H A J E U J R Y K F F T F B H ...
result:
wrong answer 1st lines differ - expected: 'Z', found: 'P'