EGBOBRD - Editorial

They eat acc. to daily requirement. So go on adding the no of breads they eat daily AND add 1(bread that damages daily). Don’t add 1 bread if(sum%k==0), because on that day no bread will remain. THUS, print sum/k or (sum/k)+1
which gives total no of packets required for throught the trip. TOO SIMPLE :slight_smile:

SOLUTION: http://www.codechef.com/viewsolution/7440314

Job done with only few variables.

Why this code gave WA…Please help

Can anyone take a look at my submission.
https://www.codechef.com/viewsolution/8536505.
i am taking an array dp[] which contains the no of of packages opened after each day and another array left[] which contains no of left over breads after each day
i am getting just one WA in subtask 2.

Hey Thanks this is useful coding link… Thanks for sharing…

Netsuite Partners