Advertisement
Dimaush

Untitled

Apr 23rd, 2023
931
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. n = int(input())
  2. a = list(map(int, input().split()))
  3. b = list(map(int, input().split()))
  4. k = int(input())
  5.  
  6. h = [0] * (n - 1)
  7. for i in range(n - 1):
  8.     h[i] = [0] * 4
  9.  
  10. for i in range(n - 1):
  11.     if abs(a[i] - a[i + 1]) <= k:
  12.         h[i][0] = 1
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement