this s a dynamic progrmming problem
basicallly i have 2 loops one contain another, iterate through all data,
when i goes before j, i set parent[j]=i, and update length of all children of j (maybe predecessor and successor is more appropiate)
but i got WA. plz help.
[cpp]
#include <iostream.h ...