This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
int n, l, m;
int fish[102][4];
int max;
int input()
{
int i, x=2100000000, y=2100000000;
scanf("%d %d %d",&n,&l,&m);
for(i=1 ; i<=n ; i++)
{
scanf("%d %d",&fish[i][1],&fish[i][2]);
if(fish[i][1]<x) x=fish[i][1];
if(fish[i][2]<y) y=fish[i][2];
}
fish[0][1]=x;
fish[0][2]=y;
return 0;
}
int process()
{
int i, j, k, r=0;
int a, b;
for(i=0 ; i<=m ; i++)
{
for(j=1 ; j<=l/2 ; j++)
{
r=0;
a=j;
b=l/2-j;
k=fish[i][1]+a;
k-=n;
if(k>0) b+=k, a-=k;
if(b+fish[i][2]>n) b=n;
for(k=1 ; k<=m ; k++)
{
if(fish[k][1]>=fish[i][1] && fish[k][1]<=fish[i][1]+a && fish[k][2]>=fish[i][2] && fish[k][2]<=fish[i][2]+b)
{
r++;
}
}
if(max<r) max=r;
}
}
return 0;
}
int output()
{
printf("%d",max);
return 0;
}
int main()
{
input();
process();
output();
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |