摘要: 设数列s,位置为i的元素被区间覆盖的数目定义为∑s[j], j≤ i。则给定区间[l, r], 更新数列s,只需:++s[l],--s[r + 1]。http://acm.hdu.edu.cn/showproblem.php?pid=5419 1 #include 2 #include 3 #i... 阅读全文
posted @ 2015-09-07 22:30 astoninfer 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 官方题解:http://acm.hdu.edu.cn/showproblem.php?pid=5426 阅读全文
posted @ 2015-09-07 19:25 astoninfer 阅读(159) 评论(0) 推荐(0) 编辑