Submission #17593

# Submission time Handle Problem Language Result Execution time Memory
17593 2016-01-01T14:05:06 Z comet 사냥꾼 (KOI13_hunter) C++
100 / 100
71 ms 2580 KB
#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 time Memory Grader output
1 Correct 0 ms 2580 KB Output is correct
2 Correct 0 ms 2580 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2580 KB Output is correct
2 Correct 0 ms 2580 KB Output is correct
3 Correct 0 ms 2580 KB Output is correct
4 Correct 0 ms 2580 KB Output is correct
5 Correct 0 ms 2580 KB Output is correct
6 Correct 0 ms 2580 KB Output is correct
7 Correct 0 ms 2580 KB Output is correct
8 Correct 0 ms 2580 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2580 KB Output is correct
2 Correct 0 ms 2580 KB Output is correct
3 Correct 0 ms 2580 KB Output is correct
4 Correct 0 ms 2580 KB Output is correct
5 Correct 0 ms 2580 KB Output is correct
6 Correct 0 ms 2580 KB Output is correct
7 Correct 0 ms 2580 KB Output is correct
8 Correct 0 ms 2580 KB Output is correct
9 Correct 0 ms 2580 KB Output is correct
10 Correct 0 ms 2580 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2580 KB Output is correct
2 Correct 0 ms 2580 KB Output is correct
3 Correct 0 ms 2580 KB Output is correct
4 Correct 0 ms 2580 KB Output is correct
5 Correct 0 ms 2580 KB Output is correct
6 Correct 1 ms 2580 KB Output is correct
7 Correct 0 ms 2580 KB Output is correct
8 Correct 0 ms 2580 KB Output is correct
9 Correct 0 ms 2580 KB Output is correct
10 Correct 0 ms 2580 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 30 ms 2580 KB Output is correct
2 Correct 62 ms 2580 KB Output is correct
3 Correct 57 ms 2580 KB Output is correct
4 Correct 48 ms 2580 KB Output is correct
5 Correct 63 ms 2580 KB Output is correct
6 Correct 69 ms 2580 KB Output is correct
7 Correct 62 ms 2580 KB Output is correct
8 Correct 51 ms 2580 KB Output is correct
9 Correct 71 ms 2580 KB Output is correct
10 Correct 68 ms 2580 KB Output is correct