// 忘れてた 記憶力ゴミ // https://codeforces.com/contest/713/submission/152643164 #include using namespace std; typedef long long ll; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b>N; vector A(N); for(int i=0;i>A[i]; sort(all(A)); priority_queue L; priority_queue,greater> R; ll mi=0; L.push(-INF); R.push(INF); for(int i=0;i