QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#567273#9320. Find the Easiest Problemwsy123wsy#WA 22ms3860kbC++14950b2024-09-16 10:43:172024-09-16 10:43:17

Judging History

你现在查看的是最新测评结果

  • [2024-09-16 10:43:17]
  • 评测
  • 测评结果:WA
  • 用时:22ms
  • 内存:3860kb
  • [2024-09-16 10:43:17]
  • 提交

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(auto nums:cnt)
		{
			if(cnt[nums.first]>max1) ch=nums.first,max1=cnt[nums.first];
		}
		cout<<ch<<endl;
	}
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3860kb

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: 22ms
memory: 3668kb

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'