#include #include #include #include #include #include #include #include #include #include using namespace std; const double eps = 1e-6; const double pi = acos(-1.0); const int INF = 0x3f3f3f3f; const int MOD = 1000000007; #define ll long long #define CL(a,b) memset(a,b,sizeof(a)) #define lson (i<<1) #define rson ((i<<1)|1) #define MAXN 100010 int main() { int T,n,x; scanf("%d",&T); while(T--) { scanf("%d",&n); int t=0,tt=0; for(int i=0; i