QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#568414 | #9320. Find the Easiest Problem | 01_Dreamer | RE | 0ms | 3604kb | C++17 | 668b | 2024-09-16 16:24:16 | 2024-09-16 16:24:17 |
Judging History
answer
#include<iostream>
#include<cstring>
using namespace std;
int cnt[30];
int main()
{
int T;
cin>>T;
while(T--)
{
memset(cnt,0,sizeof cnt);
int n;
cin>>n;
char id;
string st;
while(n--)
{
cin>>st>>id>>st;
if(st=="accepted") cnt[id-'a']++;
}
int maxv=-2e9,max_pos=-1;
for(int i=0;i<26;i++)
if(cnt[i]>maxv)
{
maxv=cnt[i];
max_pos=i;
}
char res='A'+max_pos;
cout<<res<<endl;
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3604kb
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
Runtime Error
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...