Submission #4483

#TimeUsernameProblemLanguageResultExecution timeMemory
4483ansol4328사냥꾼 (KOI13_hunter)C++98
70 / 100
1000 ms2260 KiB
#include<stdio.h> #include<math.h> #include<algorithm> struct A { int x, y; }; A animal[100002]; int m, n, l; int h[100002], get; int input() { int i; scanf("%d %d %d",&m,&n,&l); for(i=1 ; i<=m ; i++) { scanf("%d",&h[i]); } for(i=1 ; i<=n ; i++) { scanf("%d %d",&animal[i].x,&animal[i].y); } return 0; } int process() { int i, j, d1, d2; for(i=1 ; i<=n ; i++) { for(j=1 ; j<=m ; j++) { d1=abs(h[j]-animal[i].x); d2=animal[i].y; if(l>=d1+d2) { get++; break; } } } return 0; } int output() { printf("%d",get); return 0; } int main() { input(); process(); output(); return 0; }
#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...