Editorial for DMOPC '17 Contest 5 P5 - XOR Bridges
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
For the first two subtasks, the constraints are low enough that finding all edges and DFSing for each query passes.
Time Complexity:
For subtask 3, observe that the last
Time Complexity:
For the final subtask, we use disjoint sets. Consider the largest bit any value or
Time Complexity:
Comments