Submission #7415

#TimeUsernameProblemLanguageResultExecution timeMemory
7415gs13068사냥꾼 (KOI13_hunter)C++98
100 / 100
80 ms2260 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...