QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#576722#9320. Find the Easiest ProblemHythayWA 24ms4000kbC++14568b2024-09-19 21:42:532024-09-19 21:42:54

Judging History

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

  • [2024-09-19 21:42:54]
  • 评测
  • 测评结果:WA
  • 用时:24ms
  • 内存:4000kb
  • [2024-09-19 21:42:53]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;
int t;
int main(){
	scanf("%d",&t);
	while(t--){
		int n;
		map<char,int> mp;
		set<string> st;
		scanf("%d",&n);
		while(n--){
			string s;
			cin.ignore();
			getline(cin,s);
			
			if (st.find(s) == st.end()) {
				st.insert(s);
				if (s[8]=='a'){
					mp[s[6]]++;
				}	
			}
			else{
				continue;
			}
		}
		int ans = 0;
		char p;
		for(auto&pair :mp){

			if (pair.second > ans){
				p = pair.first;
				ans = pair.second;
			} 
			
		}
		cout << p<<endl;
	}
	
	return 0;
}

詳細信息

Test #1:

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

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: 24ms
memory: 4000kb

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
I
I
I
I
I
I
I
I
I
I
X
X
X
X
X
X
X
X
X
I
V
V
V
V
V
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
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
H
H
H
H
H
H
I
I
I
S
S
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
O
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
...

result:

wrong answer 1st lines differ - expected: 'Z', found: 'I'