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;
scanf("%d %d %d",&n,&l,&m);
for(i=1 ; i<=n ; i++)
{
scanf("%d %d",&fish[i][1],&fish[i][2]);
}
return 0;
}
int process()
{
int i, j, k, r=0;
int a, b;
for(i=1 ; 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... |