QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#566983 | #9320. Find the Easiest Problem | Lam017 | WA | 1ms | 3576kb | C++20 | 891b | 2024-09-16 04:33:39 | 2024-09-16 04:33:40 |
Judging History
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;
}
详细
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'