MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / solve

Function solve

CodeChef_problems/GCD operations/solution.cpp:9–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7typedef long long ll;
8
9void solve(int tc = 0) {
10 ll n, x;
11 cin >> n;
12
13 bool pos = 1;
14 for (ll i = 0; i < n; i++) {
15 cin >> x;
16 pos &= ((i + 1) % x == 0);
17 }
18
19 cout << (pos ? "YES\n" : "NO\n");
20}
21
22int main() {
23

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected