i was on this problem for a while 1538G - Gift Set , i wrote my code 120665262 for solution.
it gives WA on test case 2 where 1103rd numbers do not match.
i used basic geometry to solve the problem.(mayb its called linear programming — i dont know exactly.)
Anyone having suggestions what m doing wrong here. THANKS.