QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#740285 | #6429. Let's Play Curling | DengDuck | WA | 0ms | 3956kb | C++14 | 514b | 2024-11-13 08:29:27 | 2024-11-13 08:29:27 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
const int Inf=1.2e9;
int n,m,A[N],B[N];
inline void Work()
{
scanf("%d%d",&n,&m);
for(int i=1;i<=n;i++)scanf("%d",&A[i]);
for(int i=1;i<=m;i++)scanf("%d",&B[i]);
sort(A+1,A+n+1);
sort(B+1,B+m+1);
B[0]=-1,B[m+1]=Inf;
int Mx=0;
for(int i=1;i<=m+1;i++)
{
int K=lower_bound(A+1,A+n+1,B[i])-upper_bound(A+1,A+n+1,B[i-1]);
Mx=max(Mx,K);
}
printf("%d\n",Mx);
}
int main()
{
int T;scanf("%d",&T);
while(T--)Work();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3956kb
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'