03 2017 档案

摘要:一种快速的二分图匹配算法。 阅读全文
posted @ 2017-03-30 14:49 will7101 阅读(545) 评论(2) 推荐(0)
摘要:一道SA/SAM简单题。 阅读全文
posted @ 2017-03-29 19:01 will7101 阅读(324) 评论(0) 推荐(0)
摘要:没啥用的板子。 阅读全文
posted @ 2017-03-28 17:43 will7101 阅读(249) 评论(0) 推荐(1)
摘要:传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1692 题意: 给出一个长度为N的字符串,每次可以从串头或串尾取一个字符,添加到新串中,使新串的字典序最小。 做法: 经过推导(略),发现只要贪心地取两端字典序较小的一端,所以在一开始对所有的正 阅读全文
posted @ 2017-03-27 17:31 will7101 阅读(168) 评论(0) 推荐(0)
摘要:一道分块题。 阅读全文
posted @ 2017-03-23 16:26 will7101 阅读(251) 评论(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 阅读(210) 评论(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 阅读(697) 评论(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 阅读(362) 评论(0) 推荐(0)
摘要:http://www.lydsy.com/JudgeOnline/problem.php?id=4522 题目:给你RSA密钥的公钥和密文,求私钥和原文,其中$N=pq\le 2^{62}$,p和q为质数。 RSA加密算法:https://en.wikipedia.org/wiki/RSA_(cry 阅读全文
posted @ 2017-03-12 15:40 will7101 阅读(456) 评论(0) 推荐(0)
摘要:http://www.lydsy.com/JudgeOnline/problem.php?id=3932 主席树(可持久化线段树)模板题。 然而我太 弱 了,调了1h+,发现询问区间前k大的时候,忘了对重复元素个数判断,导致WA。 做法:把每个任务拆成两个事件,按照时间排序,从前往后建主席树。 然后 阅读全文
posted @ 2017-03-08 22:14 will7101 阅读(192) 评论(0) 推荐(0)
摘要:完成进度(290/500) 阅读全文
posted @ 2017-03-07 20:53 will7101 阅读(424) 评论(0) 推荐(0)
摘要:大家期待已久~~并没有~~的题解终于来啦~ 这次的T1和HAOI2016撞题了...深表歉意...表示自己真的不知情... 出题的过程:@PhoenixEclipse @xht13127提供了一些想法,我负责写标程,对拍,造数据...然后 @SakuraDance帮我验了题。感谢上述,以及其他几位dalao的资辞。 阅读全文
posted @ 2017-03-05 20:57 will7101 阅读(593) 评论(0) 推荐(0)