上一页 1 2 3 4 5 6 7 ··· 50 下一页
摘要: I Hate It HDU - 1754 I Hate It HDU - 1754 I Hate It 1 //fen kuai 2 #include <bits/stdc++.h> 3 using namespace std; 4 const int maxn = 200010; 5 const 阅读全文
posted @ 2018-01-24 19:09 yijiull 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 看了这篇差不多就入门了:链接 这个也可以:链接 阅读全文
posted @ 2018-01-24 12:18 yijiull 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Jam's problem again HDU - 5618 一维快排、二维CDQ、三维树状数组 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn = 100010; 4 5 struct Node{ 6 int x 阅读全文
posted @ 2018-01-24 10:12 yijiull 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Tree POJ - 1741 题意:统计树上有多少点对距离不超过k。 树分治模板题 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <algorithm> 5 using namespace std 阅读全文
posted @ 2018-01-23 12:57 yijiull 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Census UVA - 11297 昨天看完刘汝佳的,用二维线段树写了。。。 然后刚学过整体二分,就拿来练一下,结果调了一晚上加一早上bug。。。 先是二维树状数组写崩了 emmm一直没发现他们两个是不等价的,,好菜啊=_= 改了之后还是一直RE,要是一直RE我大概也能猜到很可能是数组的问题,关键 阅读全文
posted @ 2018-01-23 09:59 yijiull 阅读(240) 评论(0) 推荐(0) 编辑
摘要: Array Transformer UVA - 12003 白书p393 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn = 300010; 4 const int size = 4096; 5 6 int n, 阅读全文
posted @ 2018-01-22 15:55 yijiull 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Census UVA - 11297 二维线段树 lrj 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 const int maxn = 2010; 5 const int inf = 1<<30; 6 7 struct SegTree2 阅读全文
posted @ 2018-01-22 15:32 yijiull 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Sudoku UVALive - 2659 精确覆盖问题 舞蹈链求解数独 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 const int maxn = 1025; 5 const int maxnode = 16385; 6 const 阅读全文
posted @ 2018-01-22 14:06 yijiull 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 最长递增子序列的数量 51Nod - 1376 dp...用树状数组维护一下len和cnt 1 //树状数组 dp 2 //求LIS的数量 3 #include <bits/stdc++.h> 4 using namespace std; 5 6 const int mod = 1e9 + 7; 7 阅读全文
posted @ 2018-01-21 22:28 yijiull 阅读(140) 评论(0) 推荐(0) 编辑
摘要: K大数查询 HYSBZ - 3110 本来是刷整体二分的,被这个sb题折腾了一下午,用cin就RE, 用scanf就过了=_= 收获就是偶然学到了树状数组区间修改区间查询的写法吧。。。 1 #include <iostream> 2 #include <cstring> 3 #include <cs 阅读全文
posted @ 2018-01-21 16:51 yijiull 阅读(250) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 50 下一页