Title: http://hzwer.com/3419.html
Test instructions: Give you a series of all 0, there are m operations [Li,ri], each operation will be subscript in [Li,ri] element inverse. You can choose a number of actions to make the series look different at the end of the sequence.
Analysis:
It is easy to know that if each operation is not replaced by a combination of other operations, then this operation will contribute to the set of operations, it is possible to have X such an operation, since the ans= operation set subset number, then ans=2^x
The key to the problem is how to tell if an operation can be replaced by another operation.
A very clever idea is that for each operation [Li,ri], the point Li, Ri edge, to determine whether an operation [Li,ri] can be substituted is to determine whether Li, Ri is connected, this use and check set on the line
["CodechefCHSEQ22" Chef and favourite Sequence (and set)