#pragma GCC optimize("Ofast") #pragma GCC target("avx2") char*mmap(); #define RD(v) int v=0;{int _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;} #define WTHI(v) {long _z=v,_n=0,_d=0;while(++_n,_d=_d<<8|0x30|_z%10,_z/=10);*(long*)wp=_d;wp+=_n;} #define WTLO(v) {long _z=v,_n=8,_d=0;while(_d=_d<<8|0x30|_z%10,_z/=10,--_n);*(long*)wp=_d;wp+=8;} #define WT(v) if(v>=100000000){WTHI(v/100000000);WTLO(v);}else{WTHI(v);} int a[100000]; int sl[100000],sln; int sh[100000],shn; main(){ long z=0; char*rp=mmap(0l,1l<<28,1,2,0,0ll); RD(n); { RD(v); a[0]=v; } for(int i=1;i>1; if(sl[c]v){ --sln; } if(sln){ int j=sl[sln-1]; int a=-1,b=shn; while(a+1>1; if(sh[c]