#include #include #include #include #include #include #include #define rep(i,n) for(i=0; i> a #define out(a,b) cout << a << b using namespace std; using lint = long long; int main(void){ lint i, j; lint n, m; in(n); in(m); vector a(n); vector b(n); vector c(n); rep(i,n) in(a[i]); rep(i,n) in(b[i]); rep(i,n) c[i]=a[i]-b[i]; vector d=c; sort(c.begin(), c.end()); lint elem=c[n-m]; int cnt=0; rep(i,n){ if(d[i]>=elem&&cnt