Search found 5 matches
- Mon Jul 24, 2006 2:24 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11055 - Homogeneous squares
- Replies: 16
- Views: 9485
- Sun Jul 23, 2006 4:31 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11054 - Wine trading in Gergovia
- Replies: 25
- Views: 11041
- Fri Sep 02, 2005 12:31 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10482 - The Candyman Can
- Replies: 10
- Views: 7551
- Fri Sep 02, 2005 11:53 am
- Forum: Volume 104 (10400-10499)
- Topic: 10482 - The Candyman Can
- Replies: 10
- Views: 7551
I must be very unlucky, as I compared my program with a bruteforce implementation of the solution (3^n). I ran 100 random tests, perfect matches for each test (n = 13 for each test, otherwise the bf binary would take ages to finish). This is weird :\ And I don't think it's an off-by-one error in ...
- Thu Sep 01, 2005 10:24 am
- Forum: Volume 104 (10400-10499)
- Topic: 10482 - The Candyman Can
- Replies: 10
- Views: 7551
10482 - The candyman can
I was wondering if someone could point out the error in my DP algorithm (I get WA):
let sum(n) be the sum of the candies #1..n of the input
let c(n, a, b) be the min difference (as defined in the problem) of the total candy weight of the 3 children, right before candy #n is given, at that point ...
let sum(n) be the sum of the candies #1..n of the input
let c(n, a, b) be the min difference (as defined in the problem) of the total candy weight of the 3 children, right before candy #n is given, at that point ...