Скоро Codeforces Round 1133 (Div. 1, Div. 2)! Регистрация здесь. ×

Блог пользователя kyrros

Автор kyrros, история, 6 лет назад, По-английски

This problem falls under the LCA category in Csacademy's tasks list.
How to apply LCA when given graph may not be a tree?

Problem

As I've understood it, to answer a given query of two vertices namely A and B, we have to find the number vertices which are present in all the paths from vertex A to vertex B.

Links to similar problems would be appreciated. Thanks!!

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится