https://codeforces.com/contest/1344/problem/A
证明参考:
https://blog.csdn.net/qq_43408978/article/details/108889203
#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=2e5+1000;
typedef long long LL;
inline LL read(){LL x=0,f=1;char ch=getchar(); while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
map<LL,LL>map1;
LL a[maxn];
int main(void){
cin.tie(0);std::ios::sync_with_stdio(false);
LL t;cin>>t;
while(t--){
map1.clear();
LL n;cin>>n;
for(LL i=0;i<n;i++) cin>>a[i],map1[ ( (a[i]+i)%n+n)%n]++;
bool flag=1;
for(auto i:map1){
if(i.second>=2){
flag=0;
}
}
if(flag){
cout<<"YES"<<"\n";
}
else{
cout<<"NO"<<"\n";
}
}
return 0;
}