QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#574628#9320. Find the Easiest ProblemwinterlWA 0ms3836kbC++20750b2024-09-18 23:20:512024-09-18 23:20:52

Judging History

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

  • [2024-09-18 23:20:52]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3836kb
  • [2024-09-18 23:20:51]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
map<string,int> m;
int a[27];
bool vis[100000][27];
auto solve() {
    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);
}

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

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3836kb

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:

AA

result:

wrong answer 1st lines differ - expected: 'A', found: 'AA'