#include using namespace std; int n, k; long long x[100000], a[100000]; bool ans[100000]; void solve(int i) { if (ans[i]) { return; } ans[i] = true; auto it1 = lower_bound(x, x + n, x[i] - a[i]); auto it2 = upper_bound(x, x + n, x[i] + a[i]); int j = it1 - x; --it2; int end = it2 - x; while (j <= end) { solve(j); ++j; } } int main() { cin>>n>>k; --k; for (int i=0; i>x[i]; for (int i=0; i>a[i]; for (int i=0; i