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

Please, give me any hint to solve problems 1018,1042,1058,1062,1093,1099,1103,1111,1148,1158,1163,1171.
Posted by Nazarov Denis (nsc2001@rambler.ru) 13 Feb 2002 15:18
Use Gauss method for 1042 (+)
Posted by Michael_Rybak 15 Feb 2002 18:57
Let's consider two matrixes nXn - a and b, and two array c,d :[1..n]
The first has a[i,j]=1 if person i switches valve j, and 0 if doesn't.
Initially, b[i,j]=1 if and only if i=j. Further this matrix will
contain the information about how did we get the corresponding row of
matrix a (I'll be more detailed about this below)
Initially, c[i]=0 for all i. Further, c[i]=1 means that for current
moment valve number i is turned on.
Initially, d[i]=0 for all i. This array will have d[i]=1 if we used i-
th person for current moment.

Then, we shall use Gauss method with XOR operation in order to make
string C consist only '1', using  XOR for lines of a and for line c,
doing the same actions with corresponding lines of b and line d.


I think that's enough for you to solve the problem.

Good luck!
Thank you for your help! But as I study at school now (not at university) I don't hear nothing about Gauss method :=( Please, explain it to me(if you have time). My e-mail: nsc2001@rambler.ru
Posted by Nazarov Denis (nsc2001@rambler.ru) 15 Feb 2002 23:10
Re: Gauss is one of many methods to solve system of linear equations (but for this prob is system of mudulo linear equation)
Posted by Tran Nam Trung (trungduck@yahoo.com) 16 Feb 2002 06:55
>