QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#740290#6429. Let's Play CurlingDengDuckCompile Error//C++14662b2024-11-13 08:33:052024-11-13 08:33:05

Judging History

你现在查看的是最新测评结果

  • [2024-11-13 08:33:05]
  • 评测
  • [2024-11-13 08:33:05]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
int n,m,A[N],B[N];
inline void Work()
{
	Rd(n),Rd(m);
	for(int i=1;i<=n;i++)Rd(A[i]);
	for(int i=1;i<=m;i++)Rd(B[i]);
	sort(A+1,A+n+1);
	sort(B+1,B+m+1);
	B[0]=-1,B[m+1]=1e9;
	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);
	}
	if(Mx==0)return puts("Impossible"),void();
	printf("%d\n",Mx);
}
inline void Rd(int &s)
{
	s=0;char ch=getchar();
	while(ch<'0'||ch>'9')ch=getchar();
	while(ch>='0'&&ch<='9'){s=(s<<3)+(s<<1)+(ch-'0');ch=getchar();}
}
int main()
{
	int T;Rd(T);
	while(T--)Work();
}

Details

answer.code: In function ‘void Work()’:
answer.code:7:9: error: ‘Rd’ was not declared in this scope
    7 |         Rd(n),Rd(m);
      |         ^~