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 1631. Drunk King 2

EpicFail d [7] // Problem 1631. Drunk King 2 11 Oct 2008 15:38
Can drunk King make the first and the last moves in the same direction?
Aisenshtein Daniil Re: d [1] // Problem 1631. Drunk King 2 11 Oct 2008 15:44
No comments
qwe (Dmitry) Re: d // Problem 1631. Drunk King 2 11 Oct 2008 15:54
if "NO COMMENTS" why you write this?
information - Zero
spNautilus Re: d // Problem 1631. Drunk King 2 11 Oct 2008 15:46
King cannot do that because the move to the corner and the move from that corner cannot be the same direction.
BlackShark Re: d [3] // Problem 1631. Drunk King 2 25 Dec 2008 18:45
It's really easy!!!
var n,m:real;
begin
readln(m,n);
writeln((m*n-m-n-1+sqrt(2)*(n+m+1)):0:12);
end.
Pascal forever!!!
Komarov Dmitry [Pskov SPI] Re: d // Problem 1631. Drunk King 2 12 Nov 2009 01:59
FFFFUUUU~. It's not Pascal, it's just Math!!1
wRabbits_AlMag(VNTU) Re: d // Problem 1631. Drunk King 2 5 Feb 2010 13:59
Stop posting your code!!
Vlas Tudor Re: d // Problem 1631. Drunk King 2 8 Nov 2010 19:13
how did you get to the formula?

m*n-m-n-1+sqrt(2)*(n+m+1)