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 1485. Football and Lie

Help please
Posted by Nebojsa 4 May 2008 20:30
Can somebody explain me this test
input
-1 1 0
1 -1 -1
0 1 -1
output
0 0 1
3 0 3
1 0 0
Re: Help please
Posted by Nebojsa 5 May 2008 04:25
Any body????
Re: Help please
Posted by Denis Koshman 22 Aug 2008 14:15
If some captain tells the truth, then for each cell of his row:
A[i,j]==-1 || A[i,j] == (bool)B[i][j]

If some captain lies, then for each cell of his row:
A[i,j]==-1 || A[i][j] != (bool)B[i][j]

Matrix B must be such that every pair B[i][j], B[j][i] is one of three forms:
1,1 0,3 3,0

(bool)x = 0 if x=0, and 1 otherwise
Re: Help please
Posted by Denis Koshman 22 Aug 2008 14:16
So, for that test: 1st and 3rd captains lie. The 2nd tells the truth. This is not necessarily the only possible distribution of truths and lies.