Hi in problem C today the hard part is not the bezout it's the fact the when the linear combination might have some negative numbers it's still possible to apply it in our problem
I asked the author and he told me that:
if you add a or b to all the elements except ci , it is the same as decreasing a or b from ci . So it doesn't matter if X,Y are negative.
but I'm still confused like I would never in 100 years come up with this observation. so I want to ask you guys how did you knew that the negative combination is ok intuitively ?