QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#568207 | #9320. Find the Easiest Problem | Coffeecat996 | WA | 9ms | 3876kb | C++11 | 828b | 2024-09-16 15:34:00 | 2024-09-16 15:34:06 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define int long long
int nums[30];
void solve()
{
std::map < pair<string, string> , bool > results;
std::memset (nums, 0, sizeof (nums));
int n;
std::cin >> n;
for (int i = 1; i <= n; i++) {
std::string name, pass, flag;
std::cin >> name >> pass >> flag;
if (flag == "accepted") {
if (results[{name, pass}] == true) {
nums[pass[0] - 'A']++;
results[{name, pass}] = true;
}
}
}
int maxx = 0;
for (int i = 0; i < 26; i++) {
maxx = max (maxx, nums[i]);
}
for (int i = 0; i < 26; i++) {
if (maxx == nums[i]) {
std::cout << char(i + 'A') << "\n";
return;
}
}
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
int t=1;
cin >>t;
while(t--)
{
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3876kb
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: 9ms
memory: 3540kb
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'