-
Notifications
You must be signed in to change notification settings - Fork 0
Problem Practice
Rishabh Singhal edited this page May 12, 2020
·
5 revisions
- SORTING (Persistent SegTree) [To learn]
-
Orac and LCM (up-solve)
Solution Ideas: Ans will be 2nd minimum pk such that pki | ai
One solution: lcm(gcd(S-{a_i})...) because for n-1 pairs, the answer will be minimum and for 1 pair will be second min. Therefore, lcm(min, max) = max as min | max