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:
parent
c945e46541
commit
e80a522771
31
CodeForces/1604/C/C.cpp
Normal file
31
CodeForces/1604/C/C.cpp
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user