Snackdown Round 1B Editorial (Unofficial)

Hello Codechef Community,

I have prepared editorial (unofficial) for Snackdown Round 1B.

Any feedbacks or alternative solutions are welcome.

4 Likes

As the editorial for problem 3 reads : " Now we can just sort A in increasing order and find the time we have to wait for t = A[i] and t = k, and take the minimum of those. "

I did the same thing in my code but it got partial AC.

Refer :
View Solution

bro you have to take mod also in consideration.

Why take mod ? Is the required time too large ?
As far as I remember, there was no mention of taking the answer mod 10^9+7

take min=(m+1)*l instead of 10000000007

Does the default value for min make a difference ? I supposed to take it like +INF and comparing waiting times with it so as to find the minimum among them ( linear comparison ).