AminAnvari's blog

By AminAnvari, 3 years ago, In English,

Hi :)
These are some LCA (lowest common ancestor) problems. I hope you enjoy them.
I tried to sort them by difficulty. If you know more problems, add it to comments.

208E - Blood Cousins
191C - Fools and Roads
519E - A and B and Lecture Rooms
587C - Duff in the Army
609E - Minimum spanning tree for each edge
178B3 - Greedy Merchants
176E - Archaeology
466E - Information Graph

 
 
 
 
  • Vote: I like it  
  • +94
  • Vote: I do not like it  

»
3 years ago, # |
  Vote: I like it +11 Vote: I do not like it

Hello, A Secret Mission — LOJ , Min Max Roads — LOJ , LCA — SPOJ , Kth Ancestor — HackerRank

Here I found a few LCA / LCA modifications :)

  • »
    »
    6 months ago, # ^ |
      Vote: I like it -6 Vote: I do not like it

    Some basic LCA problems? Which can be solved by only using LCA? By some I mean many please! O_o

»
3 years ago, # |
  Vote: I like it +6 Vote: I do not like it

Thank you so much for taking the time to compile all these lists.

I really appreciate your work!

»
3 years ago, # |
  Vote: I like it +21 Vote: I do not like it
»
3 years ago, # |
  Vote: I like it +6 Vote: I do not like it

Thanks for gathering all problems with same tag!! I was looking for LCA ones :D

»
3 years ago, # |
  Vote: I like it +11 Vote: I do not like it

Another LCA problmes:

Qtree spoj : LCA + Heavy-light Decomposition + segment tree

372D - Choosing Subtree is Fun : LCA + sorting + dfs(starting time calculating) + two_pointer (or Heavy-light Decomposition)

342E - Xenia and Tree : LCA + Sqrt Decomposition

»
17 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

A great LCA problem from codechef : TOMJERGA

»
10 months ago, # |
  Vote: I like it +9 Vote: I do not like it

916E - Jamie and Tree

the newest one :)

»
5 months ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

I wrote code for 191C but I got verdict: wrong answer on test 3. please, tell to me, why my code does not works correctly. link: https://codeforces.com/contest/191/submission/39604271

»
5 months ago, # |
  Vote: I like it +3 Vote: I do not like it
»
4 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

http://www.spoj.com/problems/DISQUERY/ this is problem based only on LCA. this problem is from the SPOJ. update: this problem is not based only on lca, sorry for mistake.