import strutils,sequtils,deques var N,K : int (N, K) = stdin.readline.split.map(parseInt) var X = stdin.readline.split.map(parseBiggestInt) A = stdin.readline.split.map(parseBiggestInt) u : bool = true que = initDeque[int](1024) lx,rx,lx2,rx2 : int64 ln,rn : int used : array[100010, bool] ans : int = 1 K -= 1 lx = X[K] rx = X[K] ln = K rn = K lx2 = X[K] rx2 = X[K] que.addLast(K) while que.len > 0: u = false while que.len > 0: var p = que.popFirst lx2 = min(lx2, X[p] - A[p]) rx2 = max(rx2, X[p] + A[p]) for n in countdown(ln - 1, 0): if X[n] >= lx2: que.addLast(n) ln = n ans += 1 else: break lx = lx2 for n in (rn + 1) ..