Hi all. I've been trying some bitmask+DP problems lately, and I've found one that is a little too challenging for me: 510D - Fox And Jumping. I looked at the editorial, and the first thing they tell us is that the problem reduces to finding a set of lengths such that GCD is 1 and has minimal cost. Would anyone be so kind to explain how this works? Thanks in advance.
Auto comment: topic has been updated by szawinis (previous revision, new revision, compare).
https://en.wikipedia.org/wiki/Diophantine_equation#Linear_Diophantine
Thanks for the reply. I'll need to familiarize with this.