Painting WA???

http://www.codechef.com/viewsolution/4132176 plzzz give test cases where my code fails???

do provide the test case has been waiting long enough…:frowning:

i am new to pair of vetors and all stuff.Painting was my first question using STL pair.check my solution .i got AC in 1st attempt.it is written in simple form.

what made you use double @wonder?

There is no where mention to output the answer in decimal format. So just typecast your cost variable to long long and print it. That will get you AC.

Hope this helps.

1 Like

bt whats the difference it created…I did used .0f to remove the decimal points…and also for ur above question double handles large numbers (10^12)(10^12) (MN) even larger than long long int…

long long int handles only 10^18 while double handles lager than it

Request you to continue the discussion on the editorial page of the problem. Closing this question as of now.