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

d
Posted by EpicFail 11 Oct 2008 15:38
Can drunk King make the first and the last moves in the same direction?
Re: d
Posted by Aisenshtein Daniil 11 Oct 2008 15:44
No comments
Re: d
Posted by spNautilus 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.
Re: d
Posted by qwe (Dmitry) 11 Oct 2008 15:54
if "NO COMMENTS" why you write this?
information - Zero
Re: d
Posted by BlackShark 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!!!
Re: d
Posted by Komarov Dmitry [Pskov SPI] 12 Nov 2009 01:59
FFFFUUUU~. It's not Pascal, it's just Math!!1
Re: d
Posted by wRabbits_AlMag(VNTU) 5 Feb 2010 13:59
Stop posting your code!!
Re: d
Posted by Vlas Tudor 8 Nov 2010 19:13
how did you get to the formula?

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