# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
23734 |
2017-05-24T11:17:28 Z |
leejseo |
사냥꾼 (KOI13_hunter) |
Python 2 |
|
173 ms |
13 KB |
def main():
m, n, l = map(int, raw_input().split())
s = map(int, raw_input().split())
a = []
for i in range (n) :
h = map(int, raw_input().split())
a.append(h[::])
a.sort()
s.sort()
answer = 0
j = 0
for i in range (n) :
while (j<m) and s[j] < a[i][0] :
j+=1
flag = False
if (j > 0) and (a[i][0] - s[j-1] + a[i][1] <= l) : flag = True
if (j < m) and (s[j] - a[i][0] + a[i][1] <= l) : flag = True
if flag : answer += 1
print answer
return
main()
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
15 ms |
2 KB |
Output is correct |
2 |
Correct |
14 ms |
2 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
2 KB |
Output is correct |
2 |
Correct |
14 ms |
2 KB |
Output is correct |
3 |
Correct |
16 ms |
2 KB |
Output is correct |
4 |
Correct |
15 ms |
2 KB |
Output is correct |
5 |
Correct |
14 ms |
2 KB |
Output is correct |
6 |
Correct |
15 ms |
2 KB |
Output is correct |
7 |
Correct |
16 ms |
2 KB |
Output is correct |
8 |
Correct |
20 ms |
2 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
2 KB |
Output is correct |
2 |
Correct |
19 ms |
2 KB |
Output is correct |
3 |
Correct |
13 ms |
2 KB |
Output is correct |
4 |
Correct |
15 ms |
2 KB |
Output is correct |
5 |
Correct |
14 ms |
2 KB |
Output is correct |
6 |
Correct |
18 ms |
2 KB |
Output is correct |
7 |
Correct |
15 ms |
2 KB |
Output is correct |
8 |
Correct |
17 ms |
2 KB |
Output is correct |
9 |
Correct |
22 ms |
2 KB |
Output is correct |
10 |
Correct |
13 ms |
2 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
2 KB |
Output is correct |
2 |
Correct |
18 ms |
2 KB |
Output is correct |
3 |
Correct |
20 ms |
2 KB |
Output is correct |
4 |
Correct |
20 ms |
3 KB |
Output is correct |
5 |
Correct |
21 ms |
3 KB |
Output is correct |
6 |
Correct |
22 ms |
3 KB |
Output is correct |
7 |
Correct |
24 ms |
3 KB |
Output is correct |
8 |
Correct |
21 ms |
3 KB |
Output is correct |
9 |
Correct |
37 ms |
3 KB |
Output is correct |
10 |
Correct |
24 ms |
3 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
173 ms |
13 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |