Entries from 2016-08-17 to 1 day
Problem - D - Codeforces We will try DP, but realize that merely with left and right bound parameter is insufficient for determining an answer, because if the leftmost tree is falling to the left, we need to know the direction of the falle…
Problem - C - Codeforces The W array given in the input serves for constraining which points can be in those positions. For any ( x, y ), its special value is y - x, and it could only be in a position i, where W[ i ] == y - x. This means, …