QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#566983#9320. Find the Easiest ProblemLam017WA 1ms3576kbC++20891b2024-09-16 04:33:392024-09-16 04:33:40

Judging History

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

  • [2024-09-16 04:33:40]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3576kb
  • [2024-09-16 04:33:39]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t;
    cin >> t;
    int cnt[26];  
    while (t--) {
        int n;
        cin >> n;
        memset(cnt, 0, sizeof(cnt));
        map<string, string> mp;  
        while (n--) {
            string s1, s2, s3;
            cin >> s1 >> s2 >> s3;
            if (s3[0] == 'r' || mp[s1] == s2)
                continue;
            mp[s1] = s2;
            cout << "hhh" << endl;
            cnt[s2[0] - 'A']++; 
            cout << mp[s1] << endl;
        }
        int mx = -1;
        char ans;
        for (int i = 0; i < 26; i++) {  
            cout << cnt[i] << endl;
            if (cnt[i] > mx) {
                mx = cnt[i];
                ans = i + 'A';
            }
        }
        cout << ans << endl;
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3576kb

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:

hhh
A
hhh
A
hhh
B
hhh
C
2
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
A
hhh
A
hhh
B
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
A

result:

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