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>
#include<math.h>
#include<algorithm>
struct A
{
int x, y;
};
A animal[100002];
int m, n, l;
int h[100002], get;
int input()
{
int i;
scanf("%d %d %d",&m,&n,&l);
for(i=1 ; i<=m ; i++)
{
scanf("%d",&h[i]);
}
for(i=1 ; i<=n ; i++)
{
scanf("%d %d",&animal[i].x,&animal[i].y);
}
return 0;
}
int process()
{
int i, j, d1, d2;
for(i=1 ; i<=n ; i++)
{
for(j=1 ; j<=m ; j++)
{
d1=abs(h[j]-animal[i].x);
d2=animal[i].y;
if(l>=d1+d2)
{
get++;
break;
}
}
}
return 0;
}
int output()
{
printf("%d",get);
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... |