//#pragma comment(linker, "/STACK:1024000000,1024000000") #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; //const int maxn=1250; //const long long INF=999999999999999; const int INF=999999999; //const float eps = 0.00000001; //const int mod=1000000007; const int mod=9973; //const long long mod=100000000000000; //const int VM=15; const int VM=100210; const int EM=500010; //const int N=120; //const double PI=3.14159; //const double PI=3.14159265359; const double PI=acos(-1.0); //圆周率PI const double eps=1e-10; //const int N=1e6+200; //const int N=20; typedef pair P; //int dir[4][2]={{-1,0},{1,0},{0,-1},{0,1}}; //int dir[4][2]={{0,1},{0,-1},{-1,0},{1,0}}; int dir[4][2]={{1,0},{0,-1},{-1,0},{0,1}}; #define L(x) (x<<1) #define R(x) (x<<1|1) /** */ int a[50]; int main(){ //freopen("input.txt","r",stdin); int t,n; scanf("%d",&t); while(t--){ scanf("%d",&n); int x,maxx=0; for(int i=0;i