[CF1007D] Ants (tree chain subdivision + 2-SAT)

Click here to see the problem There is a tree with \ (n \) points. You need to perform \ (m \) coloring operations. Each operation gives two point pairs \ ((x_1,y_1) \) and \ ((x_2,y_2) \), and you need to select a point pair to color all the edges in the path on the corresponding tree. It is required that the same edge cannot be dyed repeated ...

Posted by Andrei on Thu, 04 Nov 2021 10:57:34 -0700