上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页
摘要: 题目链接 画画图发现如果某一个连通块中没有环那么就不可能存在方案 所以直接并查集维护一个连通块中有没有环 1 #include<algorithm> 2 #include<iostream> 3 #include<cstdlib> 4 #include<cstring> 5 #include<cst 阅读全文
posted @ 2016-02-04 19:36 HugeGun 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 题目链接 并查集 听说有人用差分约束做,我哪天也去试一试 并查集维护后缀和,从前往后合并 注意路径压缩的时候要修改后缀和 1 #include<algorithm> 2 #include<iostream> 3 #include<cstdlib> 4 #include<cstring> 5 #inc 阅读全文
posted @ 2016-02-04 19:25 HugeGun 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 题目链接 主席树模板题 本来想用treap写 但是看到强制在线就放弃了 还是有点不熟,多练 1 #include<algorithm> 2 #include<iostream> 3 #include<cstdlib> 4 #include<cstring> 5 #include<cstdio> 6 阅读全文
posted @ 2016-02-03 22:34 HugeGun 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 题目链接 先写了一个BIT套主席树,后来觉得树套树好写又写了一个树套树 因为没有离散化所以树套树要慢一些QAQ BIT套主席树 第一次写,参考了一下hzwer的代码%%%Orz 跟主席树不同的就是查询和修改都像BIT一样,要修改log2n颗树的信息 1 #include<algorithm> 2 # 阅读全文
posted @ 2016-02-02 14:27 HugeGun 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 题目链接1 题目链接2 主席树模板题 两题有细节不同 1 #include<algorithm> 2 #include<iostream> 3 #include<cstdlib> 4 #include<cstring> 5 #include<cstdio> 6 #include<string> 7 阅读全文
posted @ 2016-02-02 11:03 HugeGun 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 题目链接 本来是想做强连通分量缩点的题 然而1000000不可搞 于是并查集秒 1 #include<algorithm> 2 #include<iostream> 3 #include<cstdlib> 4 #include<cstring> 5 #include<cstdio> 6 #inclu 阅读全文
posted @ 2016-02-01 20:33 HugeGun 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 题目链接 splay模板题 只是多维护一个子树内最小值所在结点编号即可 1 #include<algorithm> 2 #include<iostream> 3 #include<cstdlib> 4 #include<cstring> 5 #include<cstdio> 6 #include<s 阅读全文
posted @ 2016-02-01 20:30 HugeGun 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 题目链接 先是强连通分量缩点,然后出来一个DAG 然后就可以DP啦,要找出每个SCC能到达的SCC有哪些 如果直接存一个二维数组来传递闭包的话肯定会TLE对吧 于是我们使用了神奇的bitset就快多了 1 #include<cstdio> 2 #include<cstdlib> 3 #include 阅读全文
posted @ 2016-02-01 20:22 HugeGun 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 考试 坑坑坑 无法调试 两个小时写的第一题爆零了 O(n)(n<=200)都能被卡T???数据乱搞吧WOC 10分胸牌滚粗 阅读全文
posted @ 2016-02-01 13:33 HugeGun 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 上午:随机算法/近似算法与随机算法的分析方法与应用实例 不懂,完全滑水QAQ :( 下午:计算理论与NP问题 只有讲2-sat和3-sat的时候能听懂,其他的基本都在滑水:( 晚上说是什么中学生学术训练计划选拔笔试,我只想说关我什么事? 只有高三保送生能参加,我们就在寝室里耍 :( 阅读全文
posted @ 2016-02-01 13:28 HugeGun 阅读(166) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页