QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#574003#9320. Find the Easiest ProblemstarWA 7ms3884kbC++17725b2024-09-18 20:32:202024-09-18 20:32:21

Judging History

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

  • [2024-09-18 20:32:21]
  • 评测
  • 测评结果:WA
  • 用时:7ms
  • 内存:3884kb
  • [2024-09-18 20:32:20]
  • 提交

answer

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

set<string>st[30];

void slove(){
  int n;
  cin>>n;
  for(int i=1;i<=26;i++){
    st[i].clear();
  }
  map<string,int>mp;
  int tot=0;
  for(int i=1;i<=n;i++){
    string s;
    char c;
    string s1;
    cin>>s>>c>>s1;
    if(s1=="rejected")continue;
    if(mp[s]==0)mp[s]=++tot;
    int p=c-'A'+1;
    st[p].insert(s);
  }
  char ans;
  for(int i=1;i<=26;i++){
    if(st[i].size()>st[i-1].size()){
        ans=(i-1+'A');
    }
  }
  cout<<ans<<'\n';
}

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin>>t;
    while(t--){
        slove();
    }
    return 0;
}

详细

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: 7ms
memory: 3884kb

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
Z
Y
X
Q
Z
W
X
Y
Y
Z
W
V
Z
X
Y
Y
X
X
X
X
Z
Z
X
Y
S
Z
Z
Y
Y
X
Z
Z
T
X
Z
Y
X
Z
Z
Z
Z
Y
U
Z
W
Y
Y
Y
Z
V
Z
Y
X
V
U
X
Z
Y
X
W
Z
Y
Z
Y
W
X
Y
T
X
Y
W
Z
D
Z
W
M
W
W
W
Y
Y
Y
Z
Y
X
W
Y
Y
X
T
Y
Z
Y
Y
Z
T
Z
W
Y
X
X
W
X
X
Y
Z
Z
Y
Z
Z
Y
Y
X
Z
Y
Z
U
Y
Z
Y
X
T
Y
Y
Z
X
Z
Y
Z
Z
W
X
Z
Z
X
X
Z
Z
X
Z
Y
Z
Z
Y
X
X
V
X
...

result:

wrong answer 2nd lines differ - expected: 'E', found: 'P'