摘要: 先按照minSPF排序,然后每次选择最大可以选的就可以了。 注意反向map的lower还是upper 1 /* *********************************************** 2 Author :BPM136 3 Created Time :2018/7/15 17: 阅读全文
posted @ 2018-07-15 17:46 My_Girlfriends 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 考虑固定l,每次查找符合的r,每次倍增长度p,用归并排序将后面的可行的部分归并进去,时间复杂度O(nlogn),不用读入挂就T了 1 /* *********************************************** 2 Author :BPM136 3 Created Time 阅读全文
posted @ 2018-07-15 16:53 My_Girlfriends 阅读(163) 评论(0) 推荐(0) 编辑
摘要: http://wulala.logdown.com/posts/208710-divide-the-problem-and-shared-the-ring-solitaire-solitaire-questions 其实是在书上看的,然而懒得打那么多字了= = 1 /* ************** 阅读全文
posted @ 2018-07-15 15:19 My_Girlfriends 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 显然二分答案,然后减去对应的mid,求超过L的最大子段和验证就好了。 当然记录下长度的直接DP也是可以的。 然而二分答案怎么都WA,很好奇为什么 直接输出r反而是能过的。 看了下https://blog.csdn.net/jiangshibiao/article/details/21963437 想 阅读全文
posted @ 2018-07-15 14:39 My_Girlfriends 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 递归下去,不过要处理好坐标变换,不然很恶心 1 /* *********************************************** 2 Author :BPM136 3 Created Time :2018/7/15 12:25:52 4 File Name :3889.cpp 5 阅读全文
posted @ 2018-07-15 14:07 My_Girlfriends 阅读(166) 评论(2) 推荐(0) 编辑