上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 39 下一页
摘要: http://poj.org/problem?id=2689/*区间筛法适用于L, R范围比较大,但是区间长度较小时套个模板然后取出最小最大就可以*//************************************************* Author :Powatr* C... 阅读全文
posted @ 2015-08-17 10:31 Painting、时光 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 1 : 22 : 43 : 84 : 165 : 326 : 647 : 1288 : 2569 : 51210 : 102411 : 204812 : 409613 : 819214 : 1638415 : 3276816 : 6553617 : 13107218 : 26214419 : 524... 阅读全文
posted @ 2015-08-17 09:54 Painting、时光 阅读(5641) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5391/*求(n-1)!%n先打个表发现与素数有关,而且4特判,然后只要尽可能降低复杂度就行*//************************************************* Author ... 阅读全文
posted @ 2015-08-16 21:14 Painting、时光 阅读(152) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/problemset/problem/446/A/*贪心,开前缀后缀,枚举,每个i*//************************************************* Author :Powatr* Created Tim... 阅读全文
posted @ 2015-08-16 20:27 Painting、时光 阅读(153) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5384/*AC自动机是用来求多字符串匹配问题,所需要掌握的基础是KMP和trie对匹配子串建立一棵trie树,对这棵树进行KMP匹配*//**************************************... 阅读全文
posted @ 2015-08-14 21:11 Painting、时光 阅读(138) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1251/*模板题,c表示最长后缀串的编号,如果后面加入的与前面的字符一直相同,那么不会产生新的推荐http://www.cnblogs.com/yym2013/p/3780621.htmlhttp://blog.c... 阅读全文
posted @ 2015-08-14 16:44 Painting、时光 阅读(155) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5389/*数相加超过两位数个十位相加等价于所有数相加Mod9大意: 有两扇门,n个人,要使得这些人全部进去这两扇门,进去的条件是两个sum_group模9为门上的数,问有多少种方案定义 dp[i][j] 已经选了i... 阅读全文
posted @ 2015-08-14 15:22 Painting、时光 阅读(426) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5372/*要求有多少线段被现在加进去的线段完全覆盖,所求即左端点比当前加进去的线段大的减去右端点比当前加进去的线段大的,就是覆盖的线段树用两个树状数组来更新左端点和右端点的值跟求逆序数那道题目一样,进行排序,二分得... 阅读全文
posted @ 2015-08-14 14:35 Painting、时光 阅读(162) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2352模板/************************************************* Author :Powatr* Created Time :2015-8-13 16:18:10* File Name... 阅读全文
posted @ 2015-08-13 16:45 Painting、时光 阅读(112) 评论(0) 推荐(0) 编辑
摘要: upper_bound 大于找上界lower_bound 大于等于找下界 阅读全文
posted @ 2015-08-12 20:58 Painting、时光 阅读(112) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 39 下一页