#include using namespace std; const int INF = 1023456789; const int SIZE = 200002; int A[SIZE],left_mi[SIZE],right_ma[SIZE]; int solve(vector& seq){ int now=0,ret; for(int i=0;i0;i--){ right_ma[i]=max(right_ma[i+1],A[i]); h=max(h,right_ma[i]-left_mi[i-1]); } int low=INF,an=0; vectorseq; for(int i=1;i<=N;i++){ if(A[i]