Given a tree of n vertices (n <= 1e5) in which the edge is arbitrarily oriented. Also given q queries (q <= 1e5) in which a, b are entered. The problem is quickly answer whether there is a path from a to b.
Thank a lot for your help.
Given a tree of n vertices (n <= 1e5) in which the edge is arbitrarily oriented. Also given q queries (q <= 1e5) in which a, b are entered. The problem is quickly answer whether there is a path from a to b.
Thank a lot for your help.
what different between make_pair() and {}
when I get my rating from last div 2 round I can't wait anymore help me probably u know