自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 POJ3258 什么东西过河?? 贪心+二分, 贪心的证明????

蒙是蒙对了 搞不懂贪心怎么证明 我猜的 ------ -------- --------- ------------------ -------------- 用左端点的控制范围,然后一直选最左边的来缩短该点的左侧控制范围!但是不明白最后end点怎么考虑。可能是考虑end点的左控制范围???????或者end被删除和值钱点被删除是等效的?/?不懂了

2017-08-19 22:50:31 191

原创 POJ 3735 矩阵快速幂

Training little cats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 14555   Accepted: 3602 Description Facer's pet cat just gave birth to a brood of little

2017-08-19 22:16:03 132

转载 poj 3273 二分枚举

转http://www.cnblogs.com/wolf-yasen/p/6557729.html poj 3273 二分枚举 题意:给出一个有n个数据的数组,将其分为连续的m份,找到一种分法,是的m份中最大一份总和最小 参考博客:http://blog.csdn.net/qq_22902423/article/details/50601451 题解:一种方案中最大的那

2017-08-19 17:45:27 201

原创 POJ3734 比矩阵快速幂简单的方法

using Eigen Value 用矩阵特殊值 矩阵 2 1 0 的特征向量为 (1,2,1)  (-1, 0, 1), 对应的特征值为4, 2; 2 2 2 0 1 2 #include const int divisor=10007; int n, now; int get_mod(int x, int y){ int mod=y, ans=1; for (int i=

2017-08-16 23:15:43 165

原创 同余与模算术 与 poj1995

let a=(k1n+c), b=(k2n+c), ( k1n a*b=k1k2n^2 + dk1n + ck2n + cd ab mod n = cd mod n = (a mod n) (b mod n) mod n  2.1 同余性质1:     对任意整数b     ab≡bc (mod m) -----------(1)     证

2017-08-16 11:25:27 308

原创 poj1470的输入

Closest Common AncestorsTime Limit: 2000MS Memory Limit: 10000KTotal Submissions: 20607 Accepted: 6550DescriptionWrite a program that takes as input a rooted tree and a list of pairs of vertices. Fo

2017-08-14 22:42:18 151

转载 POJ1330 倍增

//http://www.cnblogs.com/zhouzhendong/p/7255907.html #include #include #include #include #include #include using namespace std; const int N=10000+5; vector son[N]; int T,n,depth[N],fa[N][17],i

2017-08-14 21:02:20 204

原创 POJ3461

kmp; next数组意义, next[i]表示, 匹配到key[i]失败时,i将回退到next[i]来与主串比较。 #include #include int count; char p[10005],s[1000005];//开小会WA?  int next[1000005]; int lens, lenp; void getnext(){ int i

2017-08-10 22:59:02 323

原创 POJ1577 树的遍历

注意建树方法, 不能像线段树一样用i #include #include #define MAXN 26 using namespace std; struct Tree{ char v; int lch, rch;//这个很重要, 不能像完全二叉树一样建树了, 极端情况有2^25的节点编号  void init(){ lch=rch=0; } }tree[MAXN];

2017-08-10 10:25:20 308

原创 poj1177 Picture 离散 注意排序

参考 http://www.cnblogs.com/kuangbin/archive/2013/04/10/3013437.html 但他是错的 3 0 0 1 2 0 2 1 4 1 1 2 3 12 3 0 1 2 2 2 1 4 2 1 0 3 1 12 如上这两组数据 /* POJ 1177 矩形周长并,求轮廓周长 这题可以不离散化做的,我做的是离散化以后的

2017-08-05 11:10:53 184

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除