#include using namespace std; #ifndef ONLINE_JUDGE #define dbg(x...) do{cout << "\033[32;1m" << #x << "->" ; err(x);} while(0) void err(){cout << "\033[39;0m" << endl;} template class T,typename t,typename... A> void err(T a,A... x){for (auto v:a) cout << v << ' '; err(x...);} template void err(T a,A... x){cout << a << ' '; err(x...);} #else #define dbg(...) #endif typedef long long ll; typedef pair pi; typedef vector vi; template using vc=vector; template using vvc=vc>; template void mkuni(vector&v) { sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end()); } template void print(T x,int suc=1) { cout< void print(const vector&v,int suc=1) { for(int i=0;i>=1; } return res; } int t,n,k; int a[101010]; int X[101010]; void solve() { auto cmp = [](int L,int R) { return 1LL*a[L]*(X[R]+1)<1LL*a[R]*(X[L]+1); }; priority_queue,decltype(cmp)> pq(cmp); cin>>n>>k; ll s=0; for(int i=0;i>a[i]; s+=a[i]; X[i]=0; pq.push(i); } ll ans=1; for(int i=0;i>t; while(t--) solve(); }