Codeforces Global Round 17 E. AmShZ and G.O.A.T.
#include<bits/stdc++.h>using namespace std;const int N=2e5+10;int t,n,a[N];int main(){ scanf("%d",&t); while(t--){ scanf("%d",&n);for(int i=1;i<=n;i++)scanf("%d",&