QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#576574 | #9320. Find the Easiest Problem | lxpyyds | WA | 16ms | 3800kb | C++14 | 622b | 2024-09-19 21:05:57 | 2024-09-19 21:05:57 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
vector<string> dp[26];
int n;
cin>>n;
map<char,int> mymap;
for(char j='A';j<='Z';j++)
{
mymap[j]=0;
}
for(int i=0;i<n;i++)
{
string a,c;char b;
cin>>a>>b>>c;
if(c=="accepted")
{
if(find(dp[b-65].begin(),dp[b-65].end(),a)!=dp[b-65].end()){
mymap[b]++;
dp[b-65].push_back(a);
}
}
}
map<int,char> mp;
for(char i='A';i<='Z';i++)
{
mp.insert(make_pair(mymap[i],i));
}
auto it=mp.begin();
cout<<it->second<<endl;
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3800kb
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: 16ms
memory: 3732kb
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'