This is partially correct code for 20 points of 2nd Question of codechef November challenge
I highly recommend to first try on your own and then
see the solution and complete code will be uploaded tomorrow...
for solution of first question ada and dishes : • Ada and dishes codechef November challenge