QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#575670#9320. Find the Easiest ProblemAwith#WA 10ms3652kbC++201.1kb2024-09-19 16:11:272024-09-19 16:11:28

Judging History

This is the latest submission verdict.

  • [2024-09-19 16:11:28]
  • Judged
  • Verdict: WA
  • Time: 10ms
  • Memory: 3652kb
  • [2024-09-19 16:11:27]
  • Submitted

answer

#include<iostream>
#include<iomanip>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<vector>
#include<map>
#include<unordered_map>
#include<set>
#include<unordered_set>
#include<stack>
#include<queue>
#include<string>
#include<bitset>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define INF 0x3f3f3f3f
#define MOD 1000000007
#define endl "\n"
#define ios {ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);}
const int N=2e5+10;

void Solve()
{
    int n;
    cin>>n;
    set<pair<string,char>> s;
    for(int i=0;i<n;i++){
        string a,c;
        char b;
        cin>>a>>b>>c;
        if(c=="accepted") s.insert({a,b});
    }
    map<char,int> mp;
    for(auto e:s) mp[e.second]++;
    int maxn=0;
    char ans;
    for(char c='A';c<'Z';c++){
        if(mp[c]>maxn){
            maxn=mp[c];
            ans=c;
        }
    }
    cout<<ans<<endl;
}

int main()
{
    ios 
    int t = 1;
    cin >> t;
    while(t--){
        Solve();
    }

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3588kb

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

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:

C
E
H
I
B
I
G
H
S
K
J
I
H
R
A
C
K
O
I
P
A
B
I
A
A
N
A
B
A
O
F
O
R
T
H
G
K
E
S
D
F
D
R
C
U
V
W
P
A
O
J
E
A
B
U
M
C
T
L
G
V
A
O
N
E
O
Q
F
B
G
J
I
E
M
A
A
E
A
K
J
J
S
E
W
A
K
F
I
S
P
M
H
G
G
H
W
I
P
T
D
O
A
F
N
C
S
Y
P
S
G
J
F
Q
F
O
C
B
B
U
C
I
A
E
I
P
K
C
R
X
N
D
N
L
Q
L
I
X
I
H
U
J
X
D
K
G
F
T
F
B
H
...

result:

wrong answer 1st lines differ - expected: 'Z', found: 'C'