#include #include using namespace std; int N; long A[1<<17],S[1<<17]; map,bool>M; bool f(int L,int R) { if(L==R)return false; if(M.find(make_pair(L,R))!=M.end())return M[make_pair(L,R)]; long sum=S[R]-S[L]; int l=L-1,r=R; while(r-l>1) { int m=l+r>>1; if(A[m]*(R-L)>=sum)r=m; else l=m; } bool ans=false; if(L>N; for(int i=0;i>A[i]; for(int i=0;i