摘要: Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean 阅读全文
posted @ 2016-11-15 20:38 阿波罗2003 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 二叉树是一个幌子,其实中序遍历后变成数列。 原问题变成了给定一个数列,问最少把多少个数修改为其他整数,使得数列递增。 考察修改后要满足的条件($b$数组为中序遍历后得到的数组),即 $b_{i}\leqslant b_{i + 1} - 1$ 所以有: $b_{i} - i\leqslant b_{ 阅读全文
posted @ 2016-11-15 20:31 阿波罗2003 阅读(200) 评论(0) 推荐(0) 编辑