QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#578701 | #9320. Find the Easiest Problem | jk231528 | WA | 6ms | 3744kb | C++14 | 656b | 2024-09-20 20:53:45 | 2024-09-20 20:53:46 |
Judging History
answer
#include<iostream>
#include<set>
#include<cstring>
#define sc scanf
using namespace std;
const int N=2e5+8;
set<int>tm[30];
int main()
{
cin.tie(0)->sync_with_stdio(false);
int t;cin>>t;
while(t--)
{
int n;cin>>n;
int res,maxx=0;
for(int i=1;i<=30;i++ ) tm[i].clear();
for(int i=1;i<=n;i++ )
{
string s;cin>>s;
int num=s[4]-'A'+1;
char x;cin>>x;
cin>>s;
if(s[0]=='r')
continue;
else
{
int t=x-'A'+1;
tm[t].insert(num);
}
}
for(int i=1;i<=30;i++)
{
if(tm[i].size()>maxx)
maxx=tm[i].size(),res=i;
}
res=res+'A'-1;
printf("%c\n",res);
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3744kb
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: 6ms
memory: 3728kb
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 E Z H B I G H S K J I H R Z C K O I P A B I A A N A B A O F O R T H G K E S D F D R C U V W P A O J E A B U M C T B Y V A Z N E O Q F B G J I E M A A E A K J J S E W Z K F I S P M H G G H W I P T D O A F N C S Y Z S G J F Q F O C B B F L I A E I P K C R X N D N L Q L I X I H U J Z D K G F T F B H ...
result:
wrong answer 4th lines differ - expected: 'I', found: 'H'