# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
4483 |
2013-10-11T05:31:09 Z |
ansol4328 |
사냥꾼 (KOI13_hunter) |
C++ |
|
1000 ms |
2260 KB |
#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 time |
Memory |
Grader output |
1 |
Correct |
0 ms |
2260 KB |
Output is correct |
2 |
Correct |
0 ms |
2260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
# |
Verdict |
Execution time |
Memory |
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 |
# |
Verdict |
Execution time |
Memory |
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 |
4 ms |
2260 KB |
Output is correct |
6 |
Correct |
4 ms |
2260 KB |
Output is correct |
7 |
Correct |
4 ms |
2260 KB |
Output is correct |
8 |
Correct |
4 ms |
2260 KB |
Output is correct |
9 |
Correct |
0 ms |
2260 KB |
Output is correct |
10 |
Correct |
4 ms |
2260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1000 ms |
2256 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |