QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#576718#9320. Find the Easiest ProblemHythayWA 0ms3660kbC++14597b2024-09-19 21:42:002024-09-19 21:42:01

Judging History

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

  • [2024-09-19 21:42:01]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3660kb
  • [2024-09-19 21:42:00]
  • 提交

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){
			cout << pair.second<<endl;
			if (pair.second > ans){
				p = pair.first;
				ans = pair.second;
			} 
			
		}
		cout << p<<endl;
	}
	
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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:

1
A
A

result:

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