上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 44 下一页
摘要: 2-sat模板 这篇博客写得非常好 传送门 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<vector> #include<qu 阅读全文
posted @ 2017-12-27 18:29 啊宸 阅读(151) 评论(0) 推荐(0) 编辑
摘要: OJ 题解传送门 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<cmath> int T; double a,b,l,r; us 阅读全文
posted @ 2017-12-25 17:09 啊宸 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 我的智商之低,简直举世无匹,旷烁古今,无与伦比. 在傻逼这件事上真是做到了极致. 不想说什么了. 传送门 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdi 阅读全文
posted @ 2017-12-24 16:24 啊宸 阅读(179) 评论(0) 推荐(0) 编辑
摘要: lct裸题. 记得很久之前打算学lct的时候看着好难啊.结果是水题. 调了半天去看了眼别人代码,发现取相反数的时候忘了把本身的v取反了. 1 //Achen 2 #include<algorithm> 3 #include<iostream> 4 #include<cstring> 5 #inclu 阅读全文
posted @ 2017-12-21 19:28 啊宸 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 传送门 写了一中午,被自己瓜得无话可说。 cdq的题,然后开始脑补。 写了第一个版本是考虑一半对另一半的贡献,贡献的那一遍维护单调性,没有考虑查询的一半的点之间的影响,一直偏大,14pt。 卡掉的数据: 5 1 5 5 4 2 1 3 2 4 3 然后不知道如何脑抽地写了第二个版本,树状数组乱搞,从 阅读全文
posted @ 2017-12-21 15:27 啊宸 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 传送门 题目 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<vector> #include<queue> #include<c 阅读全文
posted @ 2017-12-21 10:58 啊宸 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 一直心心念念着的splay模板。终于写了。 写了半个下午,然后半个晚上重构,半个晚上debug。 终于A了。。 码力真是弱的可怕。 二十分钟找到第一个bug,kth时忘了down。 然后剩下的一整个晚上才发现第2个bug,且是在同一个地方,应该是先down再判断找没找到。 又花了十分钟找到第三个bu 阅读全文
posted @ 2017-12-20 22:03 啊宸 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 传送门 cdq模板 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<vector> #include<cstdio> #include<queue> #includ 阅读全文
posted @ 2017-12-20 15:26 啊宸 阅读(134) 评论(1) 推荐(0) 编辑
摘要: 隐藏在素数规律中的π 传送门 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<vector> #include<queue> #i 阅读全文
posted @ 2017-12-17 16:26 啊宸 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 传送门 求补图的联通块个数。 补图非常大。 链表维护搜索。 把所有点加到链表中,每次取出链头,删掉,联通块个数++;扔进队列,取出队首,把原图跟他有连边的标记了,遍历一遍链表把没有标记的删除,入队,继续取出队首重复。 RE了半个下午发现建图边开小了。。 //Achen #include<algori 阅读全文
posted @ 2017-12-16 07:17 啊宸 阅读(154) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 44 下一页