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

Common Board

Why is that? I cannot understand the example in 1121
Posted by Li, Yi 21 Oct 2001 07:16
The input is:
5 5
0 0 2 0 2
0 0 0 0 0
0 0 0 0 0
0 0 0 5 0
1 0 0 4 0
Why the value of (3, 2) in the output is 7?  (point (i, j)
means the ith row, jth column). You see, (1, 3), (4, 4) and
(5, 1) are all three unit distance from (3, 2). I think it
must be 2 + 5 + 1 = 8.
Could anyone explain it to me?
2 or 5 or 1=7
Posted by abc 21 Oct 2001 08:37
Use bit 'or' instead of '+'.
Re: 2 or 5 or 1=7
Posted by Li, Yi 21 Oct 2001 12:33
I've got accepted. Thank you all the same.
> Use bit 'or' instead of '+'.