QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#574683#9320. Find the Easiest ProblemwinterlWA 95ms6280kbC++20817b2024-09-18 23:47:442024-09-18 23:47:45

Judging History

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

  • [2024-09-18 23:47:45]
  • 评测
  • 测评结果:WA
  • 用时:95ms
  • 内存:6280kb
  • [2024-09-18 23:47:44]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
map<string,int> m;
int a[27];
bool vis[100000][27];

auto solve() {
    fill(a,a+27,0);
    fill(vis[0],vis[0]+27*100000,0);
    int n;
    cin>>n;
    int j = 1;
    for (int i = 1; i <= n; i++) {
        string s1,s2;
        char zm;
        cin>>s1;
        cin>>zm;
        cin>>s2;
        if (m.find(s1) == m.end()) {
            m[s1] = j++;
        }
        if(vis[m[s1]][zm - 'A'+1] and s2 == "accepted") {
            a[zm - 'A'+1]++;
        }
    }
    int ans = 0;
    for (int i = 1; i <= 26; i++) {
        ans = max(a[i],ans);
    }
    cout<<char(ans+65)<<endl;
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int64_t t;
    cin >> t;
    while(t--)
        solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 6172kb

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

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:

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
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 1st lines differ - expected: 'Z', found: 'A'