QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#650534 | #9320. Find the Easiest Problem | bobbyliuruiyu | WA | 5ms | 3684kb | C++14 | 1.1kb | 2024-10-18 15:31:37 | 2024-10-18 15:31:37 |
Judging History
answer
// S2OJ Submission #490 @ 1729236691339
#include <bits/stdc++.h>
#define Love_Elaina return 0
#define int long long
#define ull unsigned long long
using namespace std;
const int maxn=1e5+9;
int qpow(int a,int b,int p){int ans=1;while(b>0){if(b&1)ans=ans*a%p;a=a*a%p;b/=2;}return ans;}
int tong[maxn];
int T;
int n;
string s1,s2,s3;
bool ac[30][30];
int Hash(char a)
{
return a-'A';
}
signed main()
{
//freopen("test.in","r",stdin);
//freopen("test.out","w",stdout);
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
cin>>T;
while(T--)
{
s1.clear(),s2.clear(),s3.clear();
for(int i=0;i<26;i++) tong[i]=0;
for(int i=0;i<26;i++) for(int j=0;j<26;j++) ac[i][j]=0;
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>s1>>s2>>s3;
if(s3[0]!='a') continue;
if(!ac[Hash(s1[4])][Hash(s2[0])]) ac[Hash(s1[4])][Hash(s2[0])]=1,tong[Hash(s2[0])]++;
}
int id=27;
int maxx=0;
for(int i=0;i<26;i++) if(tong[i]>maxx&&i<id) maxx=tong[i],id=i;
cout<<char('A'+id)<<'\n';
}
Love_Elaina;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3604kb
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: 5ms
memory: 3684kb
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 C A A A B A A A A D A F B A C A A A A A A A A A A A B A A A A B C D G B A A A D D B C D C A A A G J A A A A A A B B A A A A C B A C B B G C A E A A A E \ B H A B A B A A F B A D C G C A A F A A A A B A B A B D A A A B C A B C C A A A B B A A A B A A B B G D D A G N A A A A B A A A B A A F B A B H ...
result:
wrong answer 1st lines differ - expected: 'Z', found: 'A'