|
|
back to boardShow all messages Hide all messagesI have tried with a greedy algorithm but gives WA#8, any tests pls? Yep, my answer is also 7. Still WA#8 here another tests for my program, can u check pls? 5 3 1245 5553 3112 677 1 answer -> 7609 8 2 12455 6666 3312 245 3432 666 421 444 answer -> 16383 Hard to tell your problem without a code. Greedy algorithm is wrong. Try this: 4 1 16 10 9 6 The answer should be 31 because 16 or 9 or 6 is 31. But the greedy algorithm gives 30. Manciu Ion , yes, for me is 15. For mms: Mine gives 31 too Edited by author 15.03.2017 19:44 |
|
|