#include #include #include #include #include #include #include #include #include #include #include #include #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define RI(X) scanf("%d", &(X)) #define RII(X, Y) scanf("%d%d", &(X), &(Y)) #define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y), &(Z)) #define DRI(X) int (X); scanf("%d", &X) #define DRII(X, Y) int X, Y; scanf("%d%d", &X, &Y) #define DRIII(X, Y, Z) int X, Y, Z; scanf("%d%d%d", &X, &Y, &Z) #define RS(X) scanf("%s", (X)) #define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0) #define MP make_pair #define PB push_back #define MS0(X) memset((X), 0, sizeof((X))) #define MS1(X) memset((X), -1, sizeof((X))) #define LEN(X) strlen(X) #define PII pair #define VI vector #define VPII vector > #define PLL pair #define VPLL vector > #define F first #define S second typedef long long LL; using namespace std; const int MOD = 1e9+7; const int SIZE = 1e6+10; int a[SIZE],b[SIZE]; LL v1[SIZE],v2[SIZE]; int main(){ CASET{ LL sum=0; DRI(n); REP(i,n){ RI(a[i+1]); sum+=a[i+1]; } if(sum!=(LL)n*(n-1LL)/2)puts("The data have been tampered with!"); else{ sort(a+1,a+n+1); reverse(a+1,a+n+1); REPP(i,1,n+1)b[i]=n-1-a[i]; { multisetH; LL now=0; REPP(i,1,n+1){ if(b[i]H; LL H_sum=0,num=0; v2[n+1]=0; for(int i=n;i>0;i--){ if(b[i]>=i){ num++; } else{ H.insert(b[i]); H_sum+=b[i]; } while(SZ(H)&&*H.rbegin()>=i){ num++; H_sum-=*H.rbegin(); H.erase(H.find(*H.rbegin())); } v2[i]=H_sum+num*(i-1LL); } } bool suc=1; LL sum=0; REPP(i,1,n+1){ sum+=a[i]; if(sum>v1[i]+v2[i+1]){ suc=0; break; } } if(suc)puts("It seems to have no problem."); else puts("The data have been tampered with!"); } } return 0; }