Codeforces Round #210 (Div. 1) B 二分+dp

NoSuchKey