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 1224. Spiral

Help
Posted by Alexander Prokazyuk (TKTL) 8 Oct 2006 19:00
Anybody Help Me Please! My program can't pass 6 test Please Write which mistake I have made in my program.

var n,m,b:int64;
begin read(n,m);
      if (m=1)or(n=1) then b:=1
      else if M>=n then b:=n*2-2
      else if n>m then b:=m*2-1;
      writeln(b);
end.
Re: Help
Posted by Tbilisi SU: Eldar Bogdanov 26 Oct 2006 19:19
When n=1, answer is 0.