# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
4504 |
2013-10-14T06:13:28 Z |
ansol1111 |
사냥꾼 (KOI13_hunter) |
C++ |
|
1000 ms |
3820 KB |
#include<stdio.h>
int i, j, n, m, l, gun[100005], animal[100005][5], cnt[100005], a;
int input()
{
int i;
scanf("%d %d %d",&n,&m,&l);
for(i=1 ; i<=n ; i++)
{
scanf("%d",&gun[i]);
}
for(i=1 ; i<=m ; i++)
{
scanf("%d %d",&animal[i][1],&animal[i][2]);
}
return 0;
}
int process()
{
int i, j, temp;
for(i=1 ; i<=n ; i++)
{
for(j=1 ; j<=m ; j++)
{
if(cnt[j]==0)
{
temp=gun[i]-animal[j][1];
if(temp>=0)
{
temp+=animal[j][2];
}
else
{
temp=temp*(-1);
temp+=animal[j][2];
}
if(temp<=l)
{
cnt[j]=1;
a++;
}
if(a==m)
{
break;
}
}
}
if(j!=m+1)
{
break;
}
}
return 0;
}
int output()
{
printf("%d\n",a);
return 0;
}
int main()
{
input();
process();
output();
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
3820 KB |
Output is correct |
2 |
Correct |
0 ms |
3820 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
3820 KB |
Output is correct |
2 |
Correct |
0 ms |
3820 KB |
Output is correct |
3 |
Correct |
0 ms |
3820 KB |
Output is correct |
4 |
Correct |
0 ms |
3820 KB |
Output is correct |
5 |
Correct |
0 ms |
3820 KB |
Output is correct |
6 |
Correct |
0 ms |
3820 KB |
Output is correct |
7 |
Correct |
0 ms |
3820 KB |
Output is correct |
8 |
Correct |
0 ms |
3820 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
3820 KB |
Output is correct |
2 |
Correct |
0 ms |
3820 KB |
Output is correct |
3 |
Correct |
0 ms |
3820 KB |
Output is correct |
4 |
Correct |
0 ms |
3820 KB |
Output is correct |
5 |
Correct |
0 ms |
3820 KB |
Output is correct |
6 |
Correct |
0 ms |
3820 KB |
Output is correct |
7 |
Correct |
0 ms |
3820 KB |
Output is correct |
8 |
Correct |
0 ms |
3820 KB |
Output is correct |
9 |
Correct |
0 ms |
3820 KB |
Output is correct |
10 |
Correct |
0 ms |
3820 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
3820 KB |
Output is correct |
2 |
Correct |
0 ms |
3820 KB |
Output is correct |
3 |
Correct |
0 ms |
3820 KB |
Output is correct |
4 |
Correct |
8 ms |
3820 KB |
Output is correct |
5 |
Correct |
16 ms |
3820 KB |
Output is correct |
6 |
Correct |
20 ms |
3820 KB |
Output is correct |
7 |
Correct |
24 ms |
3820 KB |
Output is correct |
8 |
Correct |
20 ms |
3820 KB |
Output is correct |
9 |
Correct |
4 ms |
3820 KB |
Output is correct |
10 |
Correct |
16 ms |
3820 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1000 ms |
3816 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |