该文被密码保护。 阅读全文
posted @ 2018-01-30 21:01 啊宸 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 传送门 传说中的经典容斥+卢卡斯定理+中国剩余定理 题解传送门 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<vector> # 阅读全文
posted @ 2018-01-30 20:14 啊宸 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 传送门 一段区间里求异或值最大容易想到可持久化字典树,然而要加上一个数,就很难受了。 考虑用权值线段树代替字典树,开一颗底层大小为2^k的权值线段树,i的位置代表i-1,那么在字典树上向下走一层刚好对应权值线段树上向下走一层。 这样直接在线段树上走就可以了。 因为要加上x,查询l~r是否存在相当于查 阅读全文
posted @ 2018-01-30 18:33 啊宸 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 传送门 只会瞎那啥三分,然后正解是凸包。 题解传送门 式子摆出来,发现可以看成二维平面上一堆斜率为-a/b的点的横纵截距和。 然后一坨平行线中,值最大的就是最右上的直线。 一个点何时会成为最大值呢,维护一个右上凸包即可。 然后对于凸包上每个点计算答案,取min。 //Achen #include<a 阅读全文
posted @ 2018-01-30 16:46 啊宸 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 传送门 一个杜教筛的简单题。 这里没开LL那里没模,de了好久。。 127872 5036446814 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio 阅读全文
posted @ 2018-01-30 10:14 啊宸 阅读(139) 评论(0) 推荐(1) 编辑
摘要: 八数码问题传送门 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<vector> #include<queue> #include 阅读全文
posted @ 2018-01-30 07:32 啊宸 阅读(174) 评论(0) 推荐(0) 编辑