摘要: 一道简单数位dp题。 阅读全文
posted @ 2017-04-06 19:28 will7101 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 一道平衡树模板题。 阅读全文
posted @ 2017-04-05 21:33 will7101 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 一种快速的二分图匹配算法。 阅读全文
posted @ 2017-03-30 14:49 will7101 阅读(486) 评论(2) 推荐(0) 编辑
摘要: 一道SA/SAM简单题。 阅读全文
posted @ 2017-03-29 19:01 will7101 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 没啥用的板子。 阅读全文
posted @ 2017-03-28 17:43 will7101 阅读(231) 评论(0) 推荐(1) 编辑
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1692 题意: 给出一个长度为N的字符串,每次可以从串头或串尾取一个字符,添加到新串中,使新串的字典序最小。 做法: 经过推导(略),发现只要贪心地取两端字典序较小的一端,所以在一开始对所有的正 阅读全文
posted @ 2017-03-27 17:31 will7101 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 一道分块题。 阅读全文
posted @ 2017-03-23 16:26 will7101 阅读(241) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=3781 N个数的序列,每次询问区间中每种数字出现次数的平方和,可以离线。 丢模板: cpp include using namespace std; const int MAXN=50005, S=22 阅读全文
posted @ 2017-03-21 16:32 will7101 阅读(192) 评论(0) 推荐(0) 编辑
摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=3656 大意:经过一通推导,问题变成求$$\binom N M \mod P$$,其中N,M using namespace std; typedef long long ll; define TR(x 阅读全文
posted @ 2017-03-21 15:24 will7101 阅读(651) 评论(0) 推荐(0) 编辑
摘要: http://www.spoj.com/problems/FACT0/en/ 给一个小于1e15的数,将他分解。 miller rabin & pollard rho模板 cpp include using namespace std; typedef long long ll; const int 阅读全文
posted @ 2017-03-20 15:09 will7101 阅读(347) 评论(0) 推荐(0) 编辑