Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n, k, x = tuple([int(x) for x in input().split()])
- a = [int(x) for x in input().split()]
- a.sort()
- j = 0
- count = 0
- for i in range(1,n):
- c = a[i]-a[i-1]
- if(c > x):
- if(c/2 <= x and k != count):
- count += 1
- else:
- j += 1
- print(j+1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement