#include<bits/stdc++.h> using namespace std; #define ll long long typedef pair<int,int> P; const int maxn=1e5+10; int a[maxn]; int n; int Left[maxn],Right[maxn]; void solve(){ // memset(Left,0,sizeof Left); // memset(Right,0,sizeof Right); scanf("%d",&n); f...