Forum

Post 09.08.2009   # 1
Subject ACM Training 3, Problem FairCookiesShare
I probably don't understand the problem... because i don't get the same score on two test cases (4 and 10). Could you please explain me for example sample solution for test case 10?

I am using, two adjacent groups should not have the same type and all from one group to get the same cookies...
igorkulev is offline Reply
Post 09.08.2009   # 2
getMinimumCost({2,8,4,1,5}) = 28

2 x 2 = 4
8 x 1 = 8
4 x 2 = 8
1 x 3 = 3
5 x 1 = 5
-----------
sum 28

Test case 4 is complex, it's hard to analyze it thisway.
hsilomedus is offline Reply

Please login to post reply.