上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 50 下一页
该文被密码保护。 阅读全文
posted @ 2017-08-06 03:03 yijiull 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 非递归线段树(未测试) 1 const int maxn=1e5+10; 2 int a[maxn],n; //原数组,从1开始 3 struct SegTree{ 4 int N; 5 int sum[maxn<<2],add[maxn<<2]; 6 7 //建树 8 void build(){ 阅读全文
posted @ 2017-08-05 01:03 yijiull 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 学习了自底向上的非递归线段树,深感精妙!! 大牛的博客:http://blog.csdn.net/zearot/article/details/48299459 张坤玮 统计的力量 The Union of k-Segments CodeForces - 612D 题意:求被覆盖k次及以上的点或者线 阅读全文
posted @ 2017-08-05 00:44 yijiull 阅读(1246) 评论(0) 推荐(0) 编辑
摘要: 做题碰到了反素数,学习了下http://blog.csdn.net/acdreamers/article/details/25049767 反素数的定义:对于任何正整数,其约数个数记为,例如,如果某个正整数满足:对任意的正整 数,都有,那么称为反素数。 从反素数的定义中可以看出两个性质: (1)一个 阅读全文
posted @ 2017-08-03 19:49 yijiull 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 题集来源:链接 发现了一个大牛的博客,线段树讲的很精彩。链接在此。 一般用线划掉的都是没有什么意义的水题。。。或者很久之前做过的,把代码粘过来了。 敌兵布阵 HDU - 1166 题意:单点更新,区间求和。 1 #include <bits/stdc++.h> 2 using namespace s 阅读全文
posted @ 2017-08-03 12:25 yijiull 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 学习:http://www.cnblogs.com/zhuyf87/archive/2012/11/09/2763113.html Binary Search Tree UVALive - 4847 题意:给一个1到n的排列,生成一棵BST,问有多少种排列生成的BST和这个相同。 要用到乘法原理 1 阅读全文
posted @ 2017-08-02 20:27 yijiull 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 忽然想起来不会编辑公式,,先不写了=_= 阅读全文
posted @ 2017-08-02 09:32 yijiull 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Potentiometers UVALive - 2191 题意:两种操作,一是把第x个数改成y,而是求x到y的和。 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define ll long long 4 const int maxn=2 阅读全文
posted @ 2017-08-01 14:37 yijiull 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Exclusive-OR UVALive - 4487 带权并查集,回去再写 Exclusive-OR UVALive - 4487 Exclusive-OR 带权并查集,回去再写 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define 阅读全文
posted @ 2017-07-31 17:37 yijiull 阅读(149) 评论(0) 推荐(0) 编辑
摘要: "Ray, Pass me the dishes!" UVALive - 3938 题意:查询区间[x,y]之间的最大连续和的区间[a,b],输出a和b。 出了点差错,,晚上回去再做 1 #include <bits/stdc++.h> 2 using namespace std; 3 #defin 阅读全文
posted @ 2017-07-31 14:33 yijiull 阅读(237) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 50 下一页