#include #include #include #include #include using namespace std; typedef long long LL; struct DT { LL w; int d; }; inline bool operator<(const DT &a,const DT &b) { return !(a.w Q; int main() { #ifdef local freopen("pro.in","r",stdin); #endif scanf("%d%d",&n,&k); for(int i=0;i=k) { LL a=0; int nl=0; for(int i=0;i