- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 差分不等式
http://www.cnblogs.com/tanhehe/archive/2013/02/27/2935726.htmlD[i+1] - D[i] >= 0对于每个好感的描述(i,j,k),假设iD[j] - D[i] 对于每个反感的描述(i,j,k),假设iD[j] - D[i] >= k写成我们约定的形式:D[i] - D[i+1] D[j] -
2015-05-08 20:47:43 749
原创 poj 2763树链剖分
const int maxn = 100008 ;int to[maxn*2] , next[maxn*2] , head[maxn*2] , edge ;void addedge(int u , int v){ to[edge] = v ; next[edge] = head[u] ; head[u] = edge++ ; to[edge] = u ; nex
2015-05-08 16:43:33 371
原创 lca
hdu2586const int maxn = 40008 ;struct E{ int v , w , next ;}e[maxn * 2] ;int eid , g[maxn] ;void add(int u , int v , int w){ e[eid].v = v ; e[eid].w = w ; e[eid].nex
2015-05-07 10:33:04 350
原创 KM最小
hdu1853const int inf = 1000000000 ;const int maxn = 508 ;bool sx[maxn], sy[maxn] ;int match[maxn], w[maxn][maxn] ;int n , m , lx[maxn] , ly[maxn] ;//n:左集元素个数; m:右集元素个数void init (){ mems
2015-05-06 20:44:33 379
原创 fzu2190
typedef long long LL ;const int maxn = 2008 ;LL dp[maxn] , h[maxn];int _stack[maxn] , top ;int getidx(int i){ while(top >= 0 && h[_stack[top]] >= h[i]) top-- ; _stack[++top] = i ;
2015-05-05 15:25:15 522
原创 hdu 4612
#pragma comment(linker, "/STACK:102400000,102400000")using namespace std ;typedef long long LL ;const int maxn = 200008 ;const int maxm = 2000008 ;struct E{ int v , next ; int vi
2015-05-05 11:10:40 515
原创 POJ 2186
const int maxn = 10008 ;const int maxm = 50008 ;struct E{ int v , next ;}e[maxm] ;int eid , g[maxn] ;void add(int u , int v){ e[eid].v = v ; e[eid].next = g[u] ; g[u] = ei
2015-05-05 09:57:13 363
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人