Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

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

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

Could someone explain me the proof of this line: "Let l hasn't right child and r hasn't left child. Hence lowest common ancestor (lca) of l and r doesn't equal to l or r. So lca is between l and r in tree traversal. But it's impossible because l is maximal possible and r is minimal possible. So l has right child or r has left child and we know exactly which of them will be parent of x." in the problem tree construction (link: http://codeforces.com/problemset/problem/675/D) also could you plz suggest some SCC and LCA problems.

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