QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#579790#9320. Find the Easiest Problemautu_rain#WA 0ms3612kbC++14725b2024-09-21 17:57:332024-09-21 17:57:34

Judging History

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

  • [2024-09-21 17:57:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3612kb
  • [2024-09-21 17:57:33]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define int long long
typedef long long i64;
typedef __int128 i128;
typedef pair<int, int> pII;
#define x first
#define y second
const int N = 2e5 + 10, M = 1e6 + 10, mod = 998244353;
int t, n, m, a[N], b[N];
pII c[N];

void solve() {
	cin >> n;
	unordered_map<string, int> p;
	for (int i = 0; i < n; i ++ ) {
		string a, b, c;
		cin >> a >> b >> c;
		p[b] ++;
	}
	string ans;
	int mx = 0;
	for (auto e : p)
		if (e.second > mx) {
			mx = e.second;
			ans = e.first;
		}
	cout << ans << endl;
}
signed main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr); cout.tie(nullptr);
	cin >> t;
	//t = 1;
	while (t -- ) solve();
	return 0;
}

詳細信息

Test #1:

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

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:

B
B

result:

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