#include using namespace std; typedef unsigned long long int ull; typedef long long int ll; typedef pair pll; typedef long double D; typedef complex P; #define F first #define S second const ll E=1e18+7; const ll MOD=1000000007; templateistream & operator >> (istream &i,pair &A){i>>A.F>>A.S; return i;} templateistream & operator >> (istream &i,vector &A){for(auto &I:A){i>>I;} return i;} templateostream & operator << (ostream &o,pair &A){o<ostream & operator << (ostream &o,vector &A){ll i=A.size(); for(auto &I:A){o<vector & cset(vector &A,T e=T()){for(auto &I:A){I=e;} return A;} namespace Monotone_Minima{ //argmin(cul(i,*))<=argmin(cul(j,*)) for(i inline vector argmin(F cul,int n,int m){ vector ret(n,-1); int i=2; while(i>=1){ for(int j=0;j=0 && ret[j-i]!=-1?ret[j-i]:0),r=(j+i inline vector divide_and_conquer(F cul,int n){ vector ret(n,0); for(int i=1;i am=argmin(fnc,min(j,n-i),j); for(int s=0;s>n; vector A(n),X(n),Y(n); for(auto &I:A){cin>>I;} for(auto &I:X){cin>>I;} for(auto &I:Y){cin>>I;} for(auto &I:Y){I=I*I*I; I=abs(I);} function cul=[&](int i,int j)->ll{i--; return i ans=divide_and_conquer>(cul,n+1); cout<