#define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) v.begin(), v.end() typedef long long ll; #include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin>>n; int x; int mi,minum; vector A(n),B(n),C(n); rep(i,n){ cin>>x; if(mi>x){ mi=x; minum=i; } A[i]=x; } int lmin=1e9,rmin=1e9; rep(i,n){ if(A[i]=0;i--){ if(A[i]B[i] && A[i]+mi+B[i]minum;i--){ if(A[i]>C[i] && A[i]+mi+C[i]