Unable to understand the mistake in implementation

Revision en1, by supermarine, 2021-04-14 07:27:28

In the recently concluded codeforces round 714 I tried problem D. My idea was start from the lowest elements move left and right . Mark the number which are part of a certain min number in vis array and then mark their gcd/min number. And then in the end traverse the visited array and add up the values. But I am getting WA in test 3. Please help ?

My submission:112970075

Tags gcd, round #714 (div. 2), #implementation

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English supermarine 2021-04-14 07:27:28 492 Initial revision (published)