Debugging help on (similar to) a lca problem

Правка en1, от memeset, 2016-10-14 07:21:30

Hi everyone, I am getting a test case wrong for this problem and have already spent multiple days debugging. Could somebody please take a look at my code and help me find the bug?

A few things about the code: an Event consists of an array of the lowest indexed people that are contained in a segment, in sorted order. the array e[i][j] is the segment from vertex i to its 2^(j-1)th parent, inclusive, and stores events. e[i][0] is just that node's event, ie a segment with only itself. dp[i][j] is the 2^jth parent of node i. anc returns the kth ancestor of a vertex. mergeevent merges two events' persons that are contained, while maintaining sorted order. removeDup removes duplicates in the array.

Thanks everyone!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский memeset 2016-10-14 07:22:46 12
en2 Английский memeset 2016-10-14 07:22:08 12
en1 Английский memeset 2016-10-14 07:21:30 830 Initial revision (published)