QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#573759 | #9320. Find the Easiest Problem | amumu123 | WA | 30ms | 3880kb | C++17 | 1.0kb | 2024-09-18 19:53:54 | 2024-09-18 19:53:54 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=1005;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll t;
cin>>t;
while(t--){
int n;
cin>>n;
map<string,int>mp;
map<char,int>mmp;
int x=0;
char y=65;
while(n--){
string a,c,d;
char b;
cin>>a>>b>>c;
int flag=1;
if(c[0]=='a'){
d=a+b+c;
for(auto [key,val]:mp){
if(key==d){
flag=0;
}
}
}
if(flag==1){
mmp[b]++;
mp[d]++;
}
for(int i=65;i<=90;i++){
char k=i;
if(mmp[k]>x){
x=mmp[k];
y=k;
}
}
}
cout<<y<<"\n";
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3880kb
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: 30ms
memory: 3540kb
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 O W O B I N J S K T I K B B Y W O Q H J F T H A R I V V T L O S D H G L E H D G D Q Y J V W P Z O J V T B U E I T C S V H Z I G O J A S G I L E S D I S J K P J S U D C E K A S P D H X N R W N I E G O X F L G V E S S R J K Q G P C W U F T I F E K P U Q R O V V N N U A H M K E Z J X Y H F F V L B K ...
result:
wrong answer 2nd lines differ - expected: 'E', found: 'O'