#include <bits/stdc++.h> const int N=2e5+10; const int inf = 0x3f3f3f3f; using namespace std; using ull = unsigned long long int; using ll = long long int; int main() { ios::sync_with_stdio(false); cin.tie(0); int n,mxL=1; cin>>n; vector<int> a(N); vector<int> cnt(N,0),Lx(N,n...