QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#576246#9320. Find the Easiest ProblemcodefighterWA 0ms3748kbC++14458b2024-09-19 19:36:362024-09-19 19:36:36

Judging History

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

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

answer

#include<iostream>

using namespace std;

int p[32];

int main()
{
	int t;
	cin >> t;
	
	while(t--)
	{
		int n;
		cin >> n;
		char v;
		
		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;
	}
}

详细

Test #1:

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

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:

AA

result:

wrong answer 1st lines differ - expected: 'A', found: 'AA'