#include using namespace std; typedef long long int ll; typedef pair P; const ll MOD=1000000007; const ll INF=1000000010; const ll LINF=4000000000000000010LL; const int MAX=310; const double EPS=1e-9; int dx[4]={0,1,0,-1}; int dy[4]={1,0,-1,0}; struct BinaryIndexedTree{ vector bit; BinaryIndexedTree(int siz){ bit.assign(++siz,0); } int sum(int k){ int ret=0; for(++k;k>0;k-=k&-k){ ret+=bit[k]; } return ret; } void add(int k,int x){ for(++k;k<(int)bit.size();k+=k&-k){ bit[k]+=x; } } }; int main(){ int n,k;cin>>n>>k; int w[100010]; BinaryIndexedTree bit(1000010); for(int i=0;i>w[i]; } for(int i=0;i