#include #include #include #include #include #include using namespace std; #define mem(a,t) memset(a,t,sizeof(a)) #define N 100005 const int inf=0x1f1f1f1f; const double eps=1e-7; const int M=10000; bool cmp(int a,int b) { return a>b; } int a[N],n; int gcd(int a,int b) { int r=a%b; while(r) { a=b; b=r; r=a%b; } return b; } int findd(int x) { int l,r,m; l=0; r=n-1; while(l<=r) { m=(l+r)>>1; if(a[m]==x) return 1; else if(a[m]=2; i--) { t=i; cnt=0; while(t<=a[n-1]) { l=lower_bound(a,a+n,t)-a; r=upper_bound(a,a+n,t)-a; t+=i; //printf("%d %d %d\n",i,l,r); if(r>=l+2) cnt=2; else if(r>=l+1) cnt++; if(cnt>=2) break; } if(cnt>=2) break; } return i; } int main() { int i,j,T,t,cnt=1; scanf("%d",&T); while(T--) { scanf("%d",&n); for(i=j=0; i