ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1200. Horns and Hoofs

Show all messages Hide all messages

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?
Do you handle the case where Horns + Hoofs can be < K

For example
2 2
10
The solution is
2.00
1 1
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!