QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#567260 | #9320. Find the Easiest Problem | wsy123wsy# | WA | 23ms | 3628kb | C++14 | 932b | 2024-09-16 10:38:35 | 2024-09-16 10:38:37 |
Judging History
answer
#include <iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<queue>
#include<stack>
#include<map>
#include<list>
#include<deque>
#include<cstdio>
#include<string>
#include<regex>
#include<fstream>
using namespace std;
#define lowbit(x) ((x)&-(x))
#define ll long long
#define ull unsigned long long
ll read()
{
ll x=0;char ch=getchar();
while(ch<'0'||ch>'9')ch=getchar();
while(ch>='0'&&ch<='9')x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
return x;
}
int n,t;
int main()
{
cin>>t;
while(t--)
{
map<string,int>m;
map<char,int>cnt;
string s;
cin>>n;
getchar();
for(int i=1;i<=n;i++)
{
getline(cin,s);
m[s]=1;
}
for(auto nums:m)
{
if(nums.first[8]=='a')
{
cnt[nums.first[6]]++;
}
}
ll max1=0;
char ch;
for(char i='A';i<='Z';i++)
{
if(cnt[i]>max1) ch=i,max1=cnt[i];
}
cout<<ch<<endl;
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3628kb
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: 23ms
memory: 3532kb
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:
I I I I I B I I I I I I I I I I I I I I I I I I I I I I I I I I I I I K I I I I I I I I F I I I I I I I A I I I I I I I I I I I G I I I I I I I I I I I I I I I W I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I A I I I I I K K I F I I I I I A I I I I I I I I I I I I H ...
result:
wrong answer 1st lines differ - expected: 'Z', found: 'I'