ubercool's blog

By ubercool, history, 5 years ago, In English

Can anyone explain how we are taking the subtree in this problem??Link

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By ubercool, history, 5 years ago, In English

I was solving QTREE2 on SPOJ but I am getting WA I can't find my mistake can anyone point it out pls.Here is my code.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By ubercool, history, 5 years ago, In English

I was solving tourists problem on kattis and keep on getting WA ,I can't understand what I am doing wrong.Here is a link to my code.The problem is asking for the sum of all paths between such vertex pair (x,y) where y>x and y%x is zero.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By ubercool, history, 5 years ago, In English

I was solving tourists problem on kattis and keep on getting WA ,I can't understand what I am doing wrong.Here is a link to my code.The problem is asking for the sum of all paths between such vertex pair (x,y) where y>x and y%x is zero.

Full text and comments »

  • Vote: I like it
  • -6
  • Vote: I do not like it

By ubercool, history, 5 years ago, In English

I am solving the problem QTREE2 on Spoj.[](http://www.spoj.com/problems/QTREE2/) I am learning LCA and I have calculated LCA using euler tour.But I am unable to find the answer to the second type of query which asks about Kth node in a path from node a to node b in a tree.How do we solve it ??

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it