QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#748660 | #6429. Let's Play Curling | zhaomumu1218 | WA | 1ms | 5996kb | C++14 | 813b | 2024-11-14 21:00:29 | 2024-11-14 21:00:29 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int maxn=100010,maxm=100010;
int n,m,a[maxn],b[maxm],ans,len;
map<int,int>mp;
struct node{
int z,y;
bool operator<(const node t)const{
return z<t.z;
}
}x[maxn+maxm];
void solve(){
mp.clear();
len=ans=0;
scanf("%lld%lld",&n,&m);
for(int i=1;i<=n;i++) scanf("%lld",a+i);
for(int i=1;i<=m;i++) scanf("%lld",b+i),mp[b[i]]=1,x[++len]=(node){b[i],2};
for(int i=1;i<=n;i++) if(mp[a[i]]==0) x[++len]=(node){a[i],1};
sort(x+1,x+1+len);
int u=0;
for(int i=1;i<=len;i++){
if(x[i].y==1) u++;
else u=0;
ans=max(ans,u);
}
printf("%lld\n",ans);
}
signed main(){
int T;
scanf("%lld",&T);
while(T--) solve();
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 5996kb
input:
3 2 2 2 3 1 4 6 5 2 5 3 7 1 7 3 4 3 1 10 1 1 7 7
output:
2 3 0
result:
wrong answer 3rd lines differ - expected: 'Impossible', found: '0'