이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<cstdio>
#include<algorithm>
int a[100000];
std::pair<int,int> b[100000];
int main()
{
int i,j,n,m,l;
scanf("%d%d%d",&n,&m,&l);
for(i=0;i<n;i++)scanf("%d",&a[i]);
for(j=0;j<m;j++)scanf("%d%d",&b[j].first,&b[j].second);
std::sort(a,a+n);
i=0;
for(j=0;j<m;j++)if(std::lower_bound(a,a+n,b[j].first+b[j].second-l)<std::upper_bound(a,a+n,b[j].first-b[j].second+l))i++;
printf("%d",i);
}
# | 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... |