QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#576266#9320. Find the Easiest ProblemcodefighterWA 0ms3504kbC++14511b2024-09-19 19:42:352024-09-19 19:42:35

Judging History

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

  • [2024-09-19 19:42:35]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3504kb
  • [2024-09-19 19:42:35]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;

int p[32];

int main()
{
	int t;
	cin >> t;
	
	while(t--)
	{
		int n;
		cin >> n;
		char v;
		memset(p, 0, sizeof(p));
		
		while(n--)
		{
			string a;
			char s;
			string c;
			cin >> a >> s >> c;
			
			if(c[0] == 'a')
			{
				p[s-65]++;
			}
		
			int max = 0;
	
			for(int i = 0 ; i < 32 ; i++)
			{
				if(p[i] > max)
				{
					max = p[i];
					v = i + 65;
				}
			}
		
		}
		cout << v << endl;
	}
	return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3504kb

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
B

result:

wrong answer 2nd lines differ - expected: 'A', found: 'B'