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

Please add these tests.
Posted by Arthas 19 May 2009 07:14
3 5
1 4 5
7 3 8
2 4 4
7 5 3
7 7 0

3 5
2 5 1
5 3 4
3 8 8
8 6 0
6 6 1
I got tle on these tests.But I got AC.
Re: Please add these tests.
Posted by 👨🏻‍💻 Spatarel Dan Constantin 2 Aug 2019 18:42
My AC solution outputs "NO" on both of those test cases.
Re: Please add these tests.
Posted by Igor Parfenov 9 Jul 2026 19:16
Answer to second test is YES. And, moreover, there are 840 ways to fill the square.

Upd. Sorry, forgot about constraint a[0][0]=0. (But, if ignore it, 840 is correct number.)

Edited by author 09.07.2026 19:19