답안 #7415

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
7415 2014-08-05T04:43:56 Z gs13068 사냥꾼 (KOI13_hunter) C++
100 / 100
80 ms 2260 KB
#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);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2260 KB Output is correct
2 Correct 0 ms 2260 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2260 KB Output is correct
2 Correct 0 ms 2260 KB Output is correct
3 Correct 0 ms 2260 KB Output is correct
4 Correct 0 ms 2260 KB Output is correct
5 Correct 0 ms 2260 KB Output is correct
6 Correct 0 ms 2260 KB Output is correct
7 Correct 0 ms 2260 KB Output is correct
8 Correct 0 ms 2260 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2260 KB Output is correct
2 Correct 0 ms 2260 KB Output is correct
3 Correct 0 ms 2260 KB Output is correct
4 Correct 0 ms 2260 KB Output is correct
5 Correct 0 ms 2260 KB Output is correct
6 Correct 0 ms 2260 KB Output is correct
7 Correct 0 ms 2260 KB Output is correct
8 Correct 0 ms 2260 KB Output is correct
9 Correct 0 ms 2260 KB Output is correct
10 Correct 0 ms 2260 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2260 KB Output is correct
2 Correct 0 ms 2260 KB Output is correct
3 Correct 0 ms 2260 KB Output is correct
4 Correct 0 ms 2260 KB Output is correct
5 Correct 0 ms 2260 KB Output is correct
6 Correct 0 ms 2260 KB Output is correct
7 Correct 0 ms 2260 KB Output is correct
8 Correct 0 ms 2260 KB Output is correct
9 Correct 0 ms 2260 KB Output is correct
10 Correct 0 ms 2260 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 44 ms 2260 KB Output is correct
2 Correct 56 ms 2260 KB Output is correct
3 Correct 56 ms 2260 KB Output is correct
4 Correct 44 ms 2260 KB Output is correct
5 Correct 68 ms 2260 KB Output is correct
6 Correct 76 ms 2260 KB Output is correct
7 Correct 72 ms 2260 KB Output is correct
8 Correct 64 ms 2260 KB Output is correct
9 Correct 72 ms 2260 KB Output is correct
10 Correct 80 ms 2260 KB Output is correct