Comments

Nevermind, I got it. For subarray length 2 or greater, gcd will always be the min element, otherwise for length 1 the numbers are as it is present in set. Nice solution

Can you please explain problem C as well?

Thanks a lot for a detailed explanation.

0

Yes my bad

Sorry it was my fault. Please ignore the comment

The constraints given in problem A are wrong thats why my solution did not pass The constraints for xi and yi given are 1 — 2*1000000 whereas actually the constraints are 1-4*1000000. Please correct me if I am wrong. You can see my submissions for problem 'A' Previous submission with given constraints New submission with change in only size of array 'ha'

0

You can see my submissions for problem A. The only difference between two codes is size of array 'ha'

0

The constraints given in problem A are wrong thats why my solution did not pass The constraints for xi and yi given are 1 — 2*1000000 whereas actually the constraints are 1-4*1000000. Please correct me if I am wrong.

On KAN → Codeforces Round #423 Analysis, 9 years ago
0

Can anyone elaborate the proof (or give in more simpler terms) of High Load?

I'm not clear about ternary search but is it not binary search?