|
|
back to boardMathematical solution with O(1) efficiency - why WA#2?Tests and help seriously needed... Hi. I've found a formulae to solve this problem as the fastest variant,but still experiencing some minor problems with this task,cause I've got WA on the 2nd test... I've also tried all the tests I found in this thread,the programme did the well...however,my problem doesn't disappear... Could you please help me,give some more tests or so? Re: Mathematical solution with O(1) efficiency - why WA#2?Tests and help seriously needed... Do you handle the case where Horns + Hoofs can be < K For example 2 2 10 The solution is 2.00 1 1 Re: Mathematical solution with O(1) efficiency - why WA#2?Tests and help seriously needed... Posted by Bobur 28 Jan 2009 00:11 i think you did this like this:: x := TRUNC((a+1)/2); y := TRUNC((b+1)/2); you must write like this: x := TRUNC((a+1)/2); y := TRUNC(b/2); i don't know why, but it help me!!! good luck! |
|
|