0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2025-01-11 22:12:00 +00:00

C - Di-visible Confusion

https://codeforces.com/contest/1604/submission/133663556
This commit is contained in:
Baoshuo Ren 2021-10-31 00:07:26 +08:00 committed by Baoshuo Ren
parent c945e46541
commit e80a522771
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

31
CodeForces/1604/C/C.cpp Normal file
View File

@ -0,0 +1,31 @@
#include <bits/stdc++.h>
using namespace std;
int t, n, a[100005];
int main() {
scanf("%d", &t);
while (t--) {
bool flag = true;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%d", a + i);
}
for (int i = 1; i <= n; i++) {
bool t = false;
for (int j = 2; j <= i + 1; j++) {
if (a[i] % j) {
t = true;
break;
}
}
if (!t) {
flag = false;
break;
}
}
printf("%s\n", flag ? "YES" : "NO");
}
return 0;
}