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 1466. Magic Square

Ilya Porublyov Is answer in 1st example really correct? [2] // Problem 1466. Magic Square 12 Aug 2006 16:57
Dear author, are you sure that answer ("NO") for the 1st example of input/output (
2 4
0 0 0
1 2 1
2 1 2
3 3 3
)
really correct?

Is it true that filling square as
0    1    3    2
2    3    1    0
3    2    0    1
1    0    2    3
is NOT correct magic square according to task rules?
You may swap top-left and top-right squares to get non-magic square
3 2 0 1
1 0 2 3
3 2 0 1
1 0 2 3

But if we fill square this way...
0 5 8 4
6 7 2 9
9 1 7 6
4 8 5 3
Mafia {Toropov, Isenbaev, Oparin} SPb IFMO Re: Is answer in 1st example really correct? // Problem 1466. Magic Square 12 Aug 2006 18:05
numbers are between 0 and n^2-1, so your example is incorrect!
rx303 wrote 12 August 2006 17:08
But if we fill square this way...
0 5 8 4
6 7 2 9
9 1 7 6
4 8 5 3