E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
NXT
bzoj2730 矿场搭建 dfs
#include #include #defineN10005 usingnamespacestd; intri,n,m,cnt,now,all,tot,dfsclk,fst[N],pnt[N],
nxt
lych_cys
·
2016-04-21 09:00
DFS
bzoj4519 不同的最小割 分治&最小割
#defineN1005 #defineM20005 usingnamespacestd; intn,m,tot=1,sta,gol,cnt,fst[N],cur[N],pnt[M],len[M],
nxt
lych_cys
·
2016-04-18 18:00
分治
网络流
最大流
isap
POJ1236 Network of Schools
include usingnamespacestd; constintmn=105,mm=10005; intn,e,x,num,cur,tmp,cnt,ans1,ans2,hd[mn],to[mm],
nxt
Monster__Yi
·
2016-04-14 20:00
强连通分量tarjan
POJ1419 Graph Coloring
include #include usingnamespacestd; intT,n,m,x,y,cnt,ans,ansi,fin,vis[105],mat[105][105],to[10005],
nxt
Monster__Yi
·
2016-04-08 21:00
DFS
剪枝
最大独立集
最大团
[BZOJ1692][Usaco2007 Dec]队列变换
usingnamespacestd; #definerightRight constintMaxN=120100; chars[MaxN]; intright[MaxN],len[MaxN],pos[MaxN],
nxt
hbhcy98
·
2016-04-07 21:00
后缀数组
贪心
后缀自动机
POJ2449 Remmarguts' Date
maxm=100005; boolinq[maxn]; intn,x,y,z,s,t,k,m,cnt,d[maxn],hd[maxn],hd2[maxn]; structEdge{ intto,w,
nxt
Monster__Yi
·
2016-04-02 22:00
SPFA
启发式搜索
bzoj4317 Atm的树 树分治
defineinf1000000000 #defineN30005 #defineM1200005 usingnamespacestd; intn,k,m,cnt,rt,tot=1,all,pnt[M],edg[M],len[M],
nxt
lych_cys
·
2016-03-31 18:00
二分查找
二分
点分治
[NOIp2013] 货车运输
题目大意:给一个n(0 #include #include usingnamespacestd; intn,m,q,x,y,cnt,hd[10005],
nxt
[20005],to[20005],w[
Monster__Yi
·
2016-03-21 21:00
图论
LCA
最大生成树
LruCache,DiskLruCache实现相关研究记录
LinkHashMap(关键的数据结构)最新的元素指向头表(头表前一个元素,Tail)(头表后一个元素指向最老的元素)在构造器中,head.
nxt
=head.prv,此时链表为空LinkedHashMap
frano
·
2016-03-19 13:00
java
android
map
LRU
HashMap
LinkedHashMap
hash
缓存
内存优化
LruCache
BZOJ3421 : Poi2013 Walk
#include typedeflonglongll; constintN=5001000,M=9999991; intn,m,lim,i,h=1,t,g[M],
nxt
[N],ed;llv[N],
Claris
·
2016-03-16 18:00
【bzoj1009】[HNOI2008]GT考试 矩阵+kmp+DP
include usingnamespacestd; typedeflonglongLL; constintSZ=1000010; constintINF=1000000010; intn,m,mod,
nxt
LOI_DQS
·
2016-03-15 16:00
UVA1152 4 Values whose Sum is 0
usingnamespacestd; constinthashsize=1000003; intn,t,cnt,a[4005],b[4005],c[4005],d[4005],hd[hashsize],
nxt
Monster__Yi
·
2016-03-13 19:00
哈希
中途相遇法
hdu3746 Cyclic Nacklace(kmp找循环节)
在kmp中循环节的长度是len-
nxt
[len],len是指串的长度。
KIJamesQi
·
2016-03-11 21:00
KMP
leetcode:Reverse Linked List 【Java】
一、问题描述Reverseasinglylinkedlist.二、问题分析利用三个指针pre、
nxt
、cur,最后返回指针pre。
tterminator
·
2016-03-11 13:00
LeetCode
【bzoj1092】蜘蛛难题 模拟
:#include #include #include #defineN205 usingnamespacestd; intn,m,gol,tal,tot,fst[N],pnt[N],len[N],
nxt
lych_cys
·
2016-03-04 14:00
模拟
BZOJ 1015 星球大战
#include#include#include#definemaxe950050#definemaxv950050usingnamespacestd;structedge{intv,
nxt
;}e[maxe
ziliuziliu
·
2016-03-03 16:00
【poj2226】Muddy Fields 二分图
arectangulargridofRrowsandCcolumns(1#include#include#includeusingnamespacestd;constintSZ=100010;charmaps[1010][1010];inthead[SZ],
nxt
DQSSS
·
2016-03-02 09:24
===图论===
二分图
【poj2226】Muddy Fields 二分图
include #include #include usingnamespacestd; constintSZ=100010; charmaps[1010][1010]; inthead[SZ],
nxt
LOI_DQS
·
2016-03-02 09:00
3696: 化合物|树形DP
include #include #include #include #include #include #defineN100052 usingnamespacestd; inthead[N],lst[N],
nxt
ws_yzy
·
2016-02-28 16:00
树形DP
UVA 820(p380)----Internet Bandwidth
include usingnamespacestd; constintinf=100000000; constintmaxn=500,maxm=500000; structedge { intv,f,
nxt
wang2147483647
·
2016-02-25 23:00
【模板】【笔记】字符串相关
昨天开始学的…随便写点记录一下以免忘了…因为学的比较混乱,欢迎在评论互相交流,欢迎打脸KMP这是复习…求
nxt
数组这个DP,思想好好想想就没问题,代码好好看看就没问题,不难会了这个,才能继续往下学…voidgetnxt
LOI_DQS
·
2016-02-25 20:00
BZOJ2061 : Country
#include #include constintN=26,M=105,P=10000; intn,m,F,i,j,len[N],
nxt
[M],f[N][M],g[N][M],v[N][M];chars
Claris
·
2016-02-19 20:00
codevs 4633 [Mz]树链剖分练习
include#include#definemaxn1000050#definemaxe200500#definemaxv100500usingnamespacestd;structedge{longlongv,
nxt
ziliuziliu
·
2016-02-19 17:00
【codevs 1993】草地排水 isap模板题
include #include #include #include #include usingnamespacestd; constintinf=1E9; intN,M,point[203],
nxt
abclzr
·
2016-02-17 14:00
BZOJ 1001 狼抓兔子
include#include#include#include#definemaxv1005#definemaxe6000050usingnamespacestd;structedge{intv,w,
nxt
ziliuziliu
·
2016-02-16 22:00
Codeforces 126B Password(KMP)
所以说,我们首先要看看是否存在公共前缀后缀,如果有,这只是保证了可能有解,因为我们还要看中间是否出现过,这个时候,我们让i=
nxt
[i],继续看这个
nxt
[i]是否出现过,为什么呢?
只玩三国的程序猿
·
2016-02-12 21:25
字符串匹配
codevs 1503 愚蠢的宠物
include#include#include#include#definemaxv1000005#definemaxe1000005usingnamespacestd;structedge{intv,
nxt
ziliuziliu
·
2016-02-09 14:00
codevs 1992 聚会
include#include#include#definemaxv1005#definemaxe100005usingnamespacestd;queueq;structedge{longlongv,w,
nxt
ziliuziliu
·
2016-02-08 13:00
hdu2196 computer dfs 树形dp
#include #include #include #include usingnamespacestd; constintN=10005; structE{intto,
nxt
,w;}edge[N+N
yxr0105
·
2016-02-04 21:00
dp
HDU
DFS
hdu 2767强连通分量
#include #include #include usingnamespacestd; constintN=2e4+10; constintM=1e6+10; structEdge{ intto,
nxt
zjck1995
·
2016-01-30 12:00
hdu1269 tarjan算法
#include #include #include usingnamespacestd; constintN=1e4+10; constintM=1e5+10; structEdge{ intto,
nxt
zjck1995
·
2016-01-29 20:00
poj1947 Rebuilding Roads 树形dp 背包
n,k #include #include usingnamespacestd; constintN=200; constintinf=0x7fffffff; structE{intto,
nxt
;}edge
yxr0105
·
2016-01-28 15:00
dp
poj
背包
树形DP
bzoj1036 树的统计Count 树链剖分 线段树
include #include #include usingnamespacestd; constintM=200010; constintinf=0x7fffffff; structE{intto,
nxt
yxr0105
·
2016-01-27 14:00
线段树
树链剖分
bzoj
【bzoj2743】[HEOI2012]采花 树状数组 bzoj400AC纪念
同一类问题,计算一个
nxt
[i]表示i后面出现的第一个位置,离线做,按照右端点排序,扫描到i,把
nxt
[
nxt
[i]]减1,
nxt
[i]加1。
u012288458
·
2016-01-18 15:00
BZOJ3140 HNOI2013消毒
发现想不出来了,有观察到a,b,c中最小的最大只有17(a∗b∗c==5000)=>(min(a,b,c) #defineMAXM100005 #defineMAXN5005 structnode{intv,
nxt
geng4512
·
2016-01-16 00:00
二分图匹配
uva572 Oil Deposits
思路:深搜入门水题#include usingnamespacestd; constintinf=0x7fffffff; intcnt,v[110][110],n,m,
nxt
[8][2]={-1,-1,
yexiaohhjk
·
2016-01-15 19:00
BZOJ 1486: [HNOI2009]最小圈|分数规划
include #include #include #include #defineT22222 usingnamespacestd; doublev[T],e[T],dis[T]; inthead[T],
nxt
ws_yzy
·
2016-01-11 11:00
分数规划
【bzoj4059】[Cerc2012]Non-boring sequences 分治
首先处理出pre[i],
nxt
[i],很明显只要i这个位置的数如果pre[i]R那么这个数在区间[L,R]上只出现了一次。
u012288458
·
2016-01-08 10:00
【bzoj1086】王室联邦 dfs
为什么是 #include #include #defineN2005 usingnamespacestd; intn,m,tot,tp,cnt,fst[N],pnt[N],
nxt
[N],stk[N]
lych_cys
·
2015-12-03 20:00
DFS
【bzoj2152】聪聪可可 点分治
#include #include #defineN50005 usingnamespacestd; intn,m,tot,sum,rt,ans,t[3],fst[N],pnt[N],len[N],
nxt
lych_cys
·
2015-11-28 11:00
DFS
点分治
hdu 1251 字典树模板题 ---多串 查找单词出现次数
我以为自己模板理解错 然后一天没吃饭,饿得胃疼还是想着把这题A掉再去吃,谁知竟然是这样的问题,,,呵呵~~~ 只是记录下这道题学到的方法吧: for(rt = 0; *s; rt =
nxt
·
2015-11-13 12:37
HDU
poj 1986 Distance Queries(LCA离线Tarjan算法)
numberofhouse #defineMM40002//numberofquery usingnamespacestd; typedefstructnode{ intv; intd; structnode*
nxt
u014552756
·
2015-11-12 22:00
最大流之dinic
预处理出层次图,然后在层次图上用dfs找增广路径,理论复杂度O(n*n*m) const int INF=0xfffffff ; struct node { int s,t,cap,
nxt
·
2015-11-12 21:26
dinic
最小费用最大流
bfs改成spfa,spfa需要注意的是进行松弛的边容量不能为0 const int INF=0xfffffff ; struct node{ int s,t,cap,cost,
nxt
·
2015-11-12 21:24
最大流
匈牙利算法
二分图最大匹配 邻接表:O(nm) struct node{ int s,t,
nxt
; }e[1005] ; int k,m,n,head[505],cnt,match[505
·
2015-11-12 21:19
算法
HDU 2874 Connections between cities
LCA: #include <cstdio> int f[10010][18]; int s[10010],d[10010],from[10010]; int g[10010],
nxt
·
2015-11-12 16:45
Connection
求割点 模板
2 { 3 int child=0; 4 dfn[u]=low[u]=++dfs_clock; 5 6 for (int c=head[u];c;c=
nxt
·
2015-11-12 14:39
模板
tarjan求强联通分量 模板
{ 3 dfn[u]=low[u]=++dfs_clock; 4 stack_push(u); 5 6 for (int c=head[u];c;c=
nxt
·
2015-11-12 14:38
tar
hdu 4468 spy 构造kmp
= sj时,令 j =
nxt
[j], (这样做,而不是直接令J=0,是为了保证模式串最短),因为可能是从头开始
·
2015-11-11 11:45
HDU
HDU 2087 剪花布条(第一道KMP题)
iostream>#include <string>using namespace std;#define L1 1001#define L2 1001char s[L1], p[L2];int
nxt
·
2015-11-11 10:10
HDU
上一页
8
9
10
11
12
13
14
15
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他