832D: Misha, Grisha and Underground

Of the 3 nodes, which two share the most parents? We can calculate lca with binary lifting with O(logN) or with sparse tables!!!

1000D: Yet Another Problem On a Subsequence

Just DP from the head. Need to pre-compute binomial coefficent though.

965D: Single-use Stones

Bsearch on the answer, and finally, instead of answering it one by one one, we compress the paths altogether. This means, at each step, the stones we hit must be a continous band

999D: Equalize the Remainders

Calculate the current remainder on each. Start from the highest remainder, and try filling the gaps. If there is remainding ones, increase to 1 first

660D: Number of Parallelograms

sort by (slope, length)