QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#565209 | #9320. Find the Easiest Problem | oyasumi_sion | WA | 8ms | 3776kb | C++20 | 671b | 2024-09-15 20:36:03 | 2024-09-15 20:36:04 |
Judging History
answer
#include <bits/stdc++.h>
using i64 = long long;
using namespace std;
void solve() {
int n;
cin>>n;
map<string,int>pd_team;
vector<int>pb(26);
while(n--){
string team,id,pd;
cin>>team>>id>>pd;
if(pd_team[team]!=1){
if(pd=="accepted")pb[id[0]-'A']++;
}
if(pd=="accepted"){
pd_team[team] = 1;
}
}
int maxx = 0;
for(int i = 0;i<26;i++){
maxx = max(maxx,pb[i]);
}
for(int i = 0;i<26;i++){
if(pb[i]==maxx){
printf("%c\n",i+'A');
return;
}
}
}
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int t = 1;
std::cin >> t;
while (t--) {
solve();
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3728kb
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: 3776kb
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:
O P P A B I N H V A T I F R E C N F I V A B S B A O A E F O F A Y O H G K Z B F F D R C U T W I A I J A K L I M C C B A V O F A E A H R B G J O F H D B E A B W H M O I B E F W A E P H F N J Y K P V X O B P I K X L Z H Q B D B T F C B U F L A H T I G A C R G V A N O N K I M R H N J K F K A G N F B H ...
result:
wrong answer 1st lines differ - expected: 'Z', found: 'O'