Submission #17593

#TimeUsernameProblemLanguageResultExecution timeMemory
17593comet사냥꾼 (KOI13_hunter)C++98
100 / 100
71 ms2580 KiB
#include<iostream> #include<algorithm> using namespace std; typedef long long ll; ll M,N,L,a[111111]; int main(){ ios::sync_with_stdio(0); cin>>M>>N>>L; for(int i=0;i<M;i++)cin>>a[i]; sort(a,a+M); int x,y,l,r,ans=0; for(int i=0;i<N;i++){ cin>>x>>y; l=x-L+y; r=x+L-y; l=lower_bound(a,a+M,l)-a; r=upper_bound(a,a+M,r)-a; if(l>=r)continue; ans++; } cout<<ans; }
#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...