#include "bits/stdc++.h" #define REP(i,n,N) for(ll i=(n); i<(N); i++) #define RREP(i,n,N) for(int i=(N-1); i>=n; i--) #define CK(n,a,b) (a)<=(n)&&(n)<(b) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<>N){ REP(i,0,N) cin>>a[i]; ll lb=-1e9-1, ub=1e9; while(ub -lb > 3){ ll mid1=(lb * 2 + ub) / 3; ll mid2=(lb + ub * 2) / 3; if(search(mid1) > search(mid2)) lb=mid1; else ub = mid2; } ll ans = inf; for(ll i=lb; i