https://ac.nowcoder.com/acm/contest/625/B
Analysis:
All status is only 1<< 18, so we can preprocess f[u][j], and then build a state diagram of all the states that u can transfer;
https://ac.nowcoder.com/acm/contest/625/B
Analysis:
All status is only 1<< 18, so we can preprocess f[u][j], and then build a state diagram of all the states that u can transfer;