QOJ.ac
QOJ
The 2nd Universal Cup Finals is coming! Check out our event page, schedule, and competition rules!
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#568202 | #9320. Find the Easiest Problem | 2497201210 | WA | 13ms | 3868kb | C++14 | 1.8kb | 2024-09-16 15:33:18 | 2024-09-16 15:33:19 |
Judging History
answer
// LUOGU_RID: 175894884
// LUOGU_RID: 175308511
#define _CRT_SECURE_NO_DEPRECATE
#include<iostream>
#include<algorithm>
#include<iomanip>
#include<math.h>
#include<queue>
#include<cstring>
#include<map>
#include<set>
#include<stack>
#include<unordered_map>
#include<string>
#include<time.h>
#include<random>
#include<unordered_set>
#include<bitset>
#include<deque>
#define endl '\n'
#define int long long
#define uint unsigned long long
#define double long double
using namespace std;
const int N = 4e5 + 610;
const long long INF = 2e18;
long long P = 998244353;
uint P2 = 131;
double eps = 1e-9;
int qim(int a, int b) {
int res = 1;
while (b) {
if (b & 1)res = (res * a) % P;
b /= 2;
a = (a * a) % P;
}
return res % P;
}
int gcd(int a, int b) {
return b ? gcd(b, a % b) : a;
}
int lcm(int a, int b) {
return a * b / gcd(a, b);
}
int ff[N], inf[N];
int C(int n, int m) {
return ff[n] * inf[n - m] % P * inf[m] % P;
}
int A(int n, int m) {
return ff[n] * inf[n - m] % P;
}
map<string, set<string>>hh;
inline void solve() {
int n;cin >> n;
for (int i = 1;i <= n;i++) {
string a, b, c;
cin >> a >> b >> c;
if (c == "accepted") {
hh[b].insert(a);
}
}
int res = 0;string ans;
for (auto it : hh) {
if (it.second.size() > res) {
res = it.second.size();ans = it.first;
}
}
cout << ans << endl;
}
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
int t;t = 1;cin >> t;
/*ff[0] = inf[0] = 1;
for (int i = 1;i < N / 2;i++) {
ff[i] = ff[i - 1] * i % P;
inf[i] = qim(ff[i], P - 2);
}*/
while (t--) {
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3580kb
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: 13ms
memory: 3868kb
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:
Z P P H H H Z H H H H H H H H H J F F D D D D D A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A ...
result:
wrong answer 2nd lines differ - expected: 'E', found: 'P'