QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#578664 | #9320. Find the Easiest Problem | jk231528 | TL | 0ms | 42644kb | C++14 | 671b | 2024-09-20 20:43:20 | 2024-09-20 20:43:20 |
Judging History
answer
#include<iostream>
#include<set>
#include<cstring>
#define sc scanf
using namespace std;
const int N=2e5+8;
int a[50][N];
int ans[50];
int main()
{
int t;cin>>t;
while(t--)
{
int n;cin>>n;
int res,maxx=0;
memset(ans,0,sizeof(ans));
memset(a,0,sizeof(a));
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;
if(!a[t][num])
{
ans[t]++;
a[t][num]++;
if(maxx<ans[t])
maxx=ans[t],res=t;
}
else
continue;
}
}
res=res+'A'-1;
printf("%c\n",res);
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 42644kb
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
Time Limit Exceeded
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 O B I G H T K Y I H R Z X W O I V C Y I P A O A Z F O F O R T H G K E S D H D R Y U V W P Z O T E A U U M J T L Y V W Z N E O Q H G G J O O M D Z J K K W J S E W Z K X I S P O H L Z H W I P T D O P F N X S Y Z S G J H Q T O C O X F L O Y E J P S Q R X N D N O Q L M X R H Z J Z Y K G F V N B K ...