摘要: 1.邦邦的大合唱站队 https://www.luogu.org/problem/show?pid=3694 XY说这是道简单的签到题,然后我大概是普及组都拿不到三等的那种了。。 插入题解。写得太好了,不刊之论,orzSXY大佬 http://www.cnblogs.com/Serene-shixi 阅读全文
posted @ 2017-09-04 21:15 啊宸 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1.洛谷 点分治1 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #includ 阅读全文
posted @ 2017-09-04 19:34 啊宸 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1.单源最短路 //Twenty #include<cstdio> #include<iostream> #include<cstdlib> #include<algorithm> #include<cmath> #include<cstring> using namespace std; int 阅读全文
posted @ 2017-09-04 19:32 啊宸 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1.BZOJ 2434 阿狸的打字机 AC自动机+树状数组 //Twenty #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstring> #include<queue> using 阅读全文
posted @ 2017-09-04 19:18 啊宸 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 写太丑了被卡常了,先码。 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #inc 阅读全文
posted @ 2017-09-04 19:13 啊宸 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 传送门 线段树 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #include< 阅读全文
posted @ 2017-09-04 19:11 啊宸 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 树状数组简单题。一维排个序,另一维加树状数组里就可以搞了。 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #in 阅读全文
posted @ 2017-09-04 19:10 啊宸 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 某天全是数据结构的考试题T3 在我学LCT之前就在轩神的博客中看到过这个归类在LCT里,所以事先知道了算法,不过这个貌似也挺明显的。(虽然分块更好写) 考场上为了证明哇我会写LCT诶就强行打了只打过一遍的LCT,然后Debug两个小时。。。最后还一不小心交了一个没debug的版本。。 //Twent 阅读全文
posted @ 2017-09-04 19:03 啊宸 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 一开始潜意识就认为是splay模板,打了140+行,还调了很久(自己码力太弱了) 然后听学长说不用打标记,可以存全局的增减值,于是写了一个60-的权值线段树,非常快且好看地就A掉了 //Twenty #include<cstdio> #include<cstdlib> #include<iostre 阅读全文
posted @ 2017-09-04 18:57 啊宸 阅读(119) 评论(0) 推荐(0) 编辑
摘要: //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #include<vector> 阅读全文
posted @ 2017-09-04 18:51 啊宸 阅读(116) 评论(0) 推荐(0) 编辑
摘要: //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #include<vector> 阅读全文
posted @ 2017-09-04 18:50 啊宸 阅读(117) 评论(0) 推荐(0) 编辑
摘要: //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #include<vector> 阅读全文
posted @ 2017-09-04 18:32 啊宸 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 传送门 每次只要修改链头实际代表的颜色即可 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<qu 阅读全文
posted @ 2017-09-04 18:31 啊宸 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1.KMP #include<cstdio> #include<cstdlib> #include<algorithm> #include<cmath> #include<cstring> #include<iostream> using namespace std; int next[100]; 阅读全文
posted @ 2017-09-04 18:22 啊宸 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1.线段树 //Twenty #include<cstdio> #include<cstdlib> #include<cstring> #define lc x<<1 #define rc x<<1|1 #define mid ((l+r)>>1) using namespace std; cons 阅读全文
posted @ 2017-09-04 18:15 啊宸 阅读(409) 评论(0) 推荐(1) 编辑
摘要: BZOJ 3239 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #includ 阅读全文
posted @ 2017-09-04 17:27 啊宸 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 板 //Twenty #include<cstdio> #include<iostream> using namespace std; int n,a[10000500],t[10000500],ans; void ms(int a[],int t[],int l,int r) { if(l==r) 阅读全文
posted @ 2017-09-04 17:23 啊宸 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 放几个高一上写的模板,高精除法什么的好像并没有什么用,写过板后就没用过了。 //Twenty #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<cstdlib> #include<algori 阅读全文
posted @ 2017-09-04 17:19 啊宸 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 其实并不怎么会用,有一次有位学长提到了这个名字,就这么取题目了。 1.BZOJ 3687 简单题 求子集的算术和的异或和 http://www.lydsy.com/JudgeOnline/problem.php?id=3687 我们并不需要知道每个数(和)出现了多少次,只需知道它出现了奇数次还是偶数 阅读全文
posted @ 2017-09-04 17:15 啊宸 阅读(1345) 评论(0) 推荐(0) 编辑
摘要: 送分题 1.没有上司的舞会 很久之前写的了,然后看了一下当时的代码感觉有点迷? 似乎是把可以一起选的装成一个背包,然后硬生生用背包做,状态加一维表示这个级别的选没选,没选才可以选它的儿子级别的。 其实没怎么看,就口胡一下。 //Twenty #include<cstdio> #include<ios 阅读全文
posted @ 2017-09-04 16:35 啊宸 阅读(175) 评论(0) 推荐(0) 编辑