Invitation to ALQUORA 2018

Thanx

For last sum ,we consider each node as B type node,obviously now if we wanna find C node for that node v ,we should just take maximum in subtree of v.

Now v is B node,max is C node

So only thing left is A node,if we have a map containing elements of path root to v,then we can find easily the largest value less than v among the parents of v,which is A.

These all can be done in a single dfd(i dont know y i used 2,should’ve done with 1).

Solution:

https://www.codechef.com/viewsolution/20466684

1 Like

I haven’t yet received any mail from u regarding bank details or anything,by when and how are u’ll gonna send the cash prize?And by when will i receive the laddus?

Hope this is not any kind of scam!!