QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#567971 | #9320. Find the Easiest Problem | Regen_# | WA | 9ms | 3648kb | C++17 | 1.5kb | 2024-09-16 14:51:36 | 2024-09-16 14:51:38 |
Judging History
answer
#include<iostream>
#include<algorithm>
#include<vector>
#include<cstring>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<tuple>
#include<deque>
#include<stack>
#include<sstream>
#include<limits.h>
using namespace std;
#define int long long
#define ull unsigned long long
#define __md ios_base::sync_with_stdio(false);cin.tie(NULL);
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define endl '\n'
#define mem(h,x) memset(h,x,sizeof h);
#define py cout<<"YES"<<endl;
#define pn cout<<"NO"<<endl;
#define PII pair<int,int>
#define PCS pair<char,int>
#define PSI pair<string,int>
#define PBS pair<bool,string>
#define PSS pair<string,string>
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 ne[4][2]={{1,0},{0,1},{-1,0},{0,-1}};
//int nefire[8][2]={{0,1},{1,0},{0,-1},{-1,0},{-1,-1},{-1,1},{1,-1},{1,1}};
constexpr int N=1e7+5,mod=1e9+7;
map<pair<string,string>,int> mp;
map<string,int> h;
void solve()
{
int n;cin>>n;
int maxd=0;
while(n--)
{
string a,b,c;cin>>a>>b>>c;
if(c=="accepted"&&!mp[{a,b}])
{
mp[{a,b}]=1;
h[b]++;
maxd=max(maxd,h[b]);
}
}
string res;
for(auto [a,b]:h)
{
if(b==maxd)
{
cout<<a<<endl;
return ;
}
}
}
int32_t main()
{
__md
int t;cin>>t;
//t=1;
while(t--)
{
solve();
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3636kb
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: 9ms
memory: 3648kb
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 I B Z H J G H H G H H E J F B D D D D D A A A A B A A A C A A A A
result:
wrong answer 2nd lines differ - expected: 'E', found: 'P'