#include using namespace std; void solve(){ int N,input,cur=1,ans=1; cin>>N; int P[N],memo[N+2]; fill(memo+1,memo+N+1,1); memo[0]=0; memo[N+1]=0; for(int i=1;i<=N;++i){ cin>>input; P[input-1]=i; } for(int i=N-1;i>=0;--i){ memo[P[i]]=-1; cur+=memo[P[i]+1]+memo[P[i]-1]; ans=max(cur,ans); } cout<>T; for(int i=0;i