QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#566664#9320. Find the Easiest ProblemKobicGendWA 0ms3776kbC++20829b2024-09-16 01:05:142024-09-16 01:05:14

Judging History

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

  • [2024-09-16 01:05:14]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3776kb
  • [2024-09-16 01:05:14]
  • 提交

answer

#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <array>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <bitset>
using namespace std;
using ll = long long;

void eachT() {
	int n;
	cin >> n;

	map<string, vector<string>> a;
	while (n--) {
		string name, id, op;
		cin >> name >> id >> op;

		if (op[0] == 'a') {
			a[id].push_back(name);
		}
	}

	string mx = "";
	for (auto& [k, vec] : a) {

		if (a[mx].size() < a[k].size()) {
			mx = k;
		}
	}

	cout << mx << '\n';
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	int T = 1;
	cin >> T;

	while (T--) {
		eachT();
	}

	return 0;
}






Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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'