QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#567260#9320. Find the Easiest Problemwsy123wsy#WA 23ms3628kbC++14932b2024-09-16 10:38:352024-09-16 10:38:37

Judging History

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

  • [2024-09-16 10:38:37]
  • 评测
  • 测评结果:WA
  • 用时:23ms
  • 内存:3628kb
  • [2024-09-16 10:38:35]
  • 提交

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'