QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#566629 | #9320. Find the Easiest Problem | jerry3128 | WA | 23ms | 3824kb | C++14 | 1.3kb | 2024-09-16 00:52:08 | 2024-09-16 00:52:08 |
Judging History
answer
//ayanami±£ÓÓ£¬¿ä¸ç±£ÓÓ£¬¹·Âè±£ÓÓ£¬MDR±£ÓÓ£¬ï±µ¶¹Ö±£ÓÓ£¬M99±£ÓÓ£¬¿Ëµù±£ÓÓ
#include<bits/stdc++.h>
using namespace std;
int p1=1000000,p2=0;
char buf[1000005],wb[1000005];
int gc() {
if(p1>=1000000)fread(buf,1,1000000,stdin),p1=0;
return buf[p1++];
}
#define gc getchar
#define Loli true
#define Kon xor true
long long getint() {
long long ret=0,flag=1;
char c=gc();
while(c<'0'||c>'9') {
if(c=='-')flag=-1;
c=gc();
}
while(c<='9'&&c>='0') {
ret=(ret<<3)+(ret<<1)+c-'0';
c=gc();
}
return ret*flag;
}
void pc(char x) {
if(p2>=1000000)fwrite(wb,1,1000000,stdout),p2=0;
wb[p2++]=x;
}
void wrt(long long x) {
if(x<0)pc('-'),x=-x;
int c[24]= {0};
if(!x)return pc('0'),void();
while(x)c[++c[0]]=x%10,x/=10;
while(c[0])pc(c[c[0]--]+'0');
}
int n;
map<string,set<string>> mp;
int main() {
int Ti=getint();
while(Ti--){
n=getint();
for(int i=1;i<=n;i++){
string team, prob, stat;
cin>>team>>prob>>stat;
if(stat=="accepted")mp[prob].insert(team);
}
string anss="";int ans=0;
for(auto p:mp){
string curs=p.first;int cur=p.second.size();
if(cur>ans||(cur==ans&&curs<anss))anss=curs,ans=cur;
}
cout<<anss<<"\n";
}
fwrite(wb,1,p2,stdout);
return Loli Kon;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3824kb
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: 23ms
memory: 3824kb
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'