zzm looked after would say: It can wrong? Obviously this is not it.
DP
P3957 hopscotch
The algorithm is correct, implementation issues.
1. The two points r and l feet provided
x [n] is set to n, l set to x [0], without considering the original flexibility.
2.dp the initial consideration is not comprehensive
Did not consider point behind can not be transferred over from the front, it should be assigned to negative infinity.
3. monotonous tail queue pop forget