12033 - Game of CS
Moderator: Board moderators
12033 - Game of CS
Can anyone tell me how to solve this problem?
Re: 12033 - Game of CS
I found a solution on the Internet and coded according to its description of solution.
Got AC though, but didn't know why...
Let v be child of u, the length between them is c
Then according to the parity of c and sg[v], we can get a value from sg[v], called m
Then sg=m_1^m_2^m_3...(m_i is the value m get from sg[I-th child of u])
How to reach this conclusion?
I don't want to just get AC without knowing the reason...
Hope somebody can explain it...
Thanks in advance!
Got AC though, but didn't know why...
Let v be child of u, the length between them is c
Then according to the parity of c and sg[v], we can get a value from sg[v], called m
Then sg=m_1^m_2^m_3...(m_i is the value m get from sg[I-th child of u])
How to reach this conclusion?
I don't want to just get AC without knowing the reason...
Hope somebody can explain it...
Thanks in advance!