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
P2015 二叉苹果树 树状dp
P2015二叉苹果树#includeusingnamespacestd;intdp[101][101];intmp[1001][1001];structNO{intw,to,
nxt
;}no[501];intcnt
wym_king
·
2020-08-13 17:54
树状dp
Millionaire(2008 APAC local onsite C)
freopen("output.txt","w",stdout);ios_base::sync_with_stdio(0);cin.tie(0);intn=1<
nxt
Accepted丶
·
2020-08-13 16:14
————DP————
BZOJ4825 [Hnoi2017]单旋
HNOID1每道题都已小于2s的差距领先ljss交到BZ上23333论快捷键提交的优越性考虑一次插入了x,x的前驱为pre,后继为
nxt
,平衡树中排名相邻的两个点一定互为祖先关系,那么如果pre为
nxt
neither_nor
·
2020-08-13 16:39
BZOJ
ETT
HDU 5977 & 2016 ICPC 大连 G:点分治
题意:给出一棵树(nusingnamespacestd;constintmaxn=5e4+100;constintmaxk=12;intfirst[maxn],
nxt
[maxn*2],des[maxn*
calabash_boy
·
2020-08-13 13:27
HDU
[HNOI2019]JOJO
[HNOI2019]JOJO[题目链接]链接[思路要点]题目询问的是当前字符串做\(\text{kmp}\)之后的\(\text{
nxt
}\)数组的值的和首先考虑没有第二种操作的情况将添加操作看成添加一个字符
aozhuan8489
·
2020-08-13 13:54
数据结构与算法
[POJ3189][cqbzoj1640]稳定的奶牛分配 解题报告
constintMAXN=2000;constintMAXM=1000000;constintINF=0x7f7f7f7f;constintINF4BIT=0x7f;structNode{intv,c,
nxt
aigan1964
·
2020-08-13 12:18
NOIp2003 传染病控制
代码:#include#include#include#includeusingnamespacestd;#defineN305intn,p,hed[N],cnt;structEG{intto,
nxt
;
a6t2007
·
2020-08-13 12:16
点分治专题
求树上最小距离等于K的点对是否存在离线+点分治题解#includeusingnamespacestd;constintMAX=1e4+5;constintINF=1e7;intn,m,K;structP{intto,
nxt
qianyri
·
2020-08-13 12:17
点分治
P2661(拓扑排序找最小环)
#include#includeusingnamespacestd;constintmaxn=400000;structE{intto,
nxt
;}edge[maxn];inthead[maxn],cnt
@Milly
·
2020-08-12 01:20
洛谷
【C语言】状态机编程
状态机原理:有限状态机的工作原理如图1所示,发生事件(event)后,根据当前状态(cur_state),决定执行的动作(action),并设置下一个状态号(
nxt
_state)。
玛丽奥ZJY
·
2020-08-12 00:10
【C语言(基础)】
P4001 [ICPC-Beijing 2006]狼抓兔子
#include#include#includeusingnamespacestd;constintMAXN=1000010,MAXM=1000010;structEdge{intfrom,to,w,
nxt
Object_S
·
2020-08-11 18:50
A
--
题解
图论
--
网络流
图论
--
最小割
T103492 【模板】点双连通分量
题目地址#include#includeusingnamespacestd;constintMAXN=1e5,MAXM=1e6;structEdge{intfrom,to,
nxt
;}e[MAXM];inthead
Object_S
·
2020-08-11 04:48
A
--
模板
A
--
知识点
#
点双连通分量
T103440 【模板】缩点
#include#includeusingnamespacestd;constintMAXN=1e5,MAXM=1e6;structEdge{intfrom,to,
nxt
;}e[MAXM];inthead
Object_S
·
2020-08-11 04:47
A
--
模板
A
--
知识点
#
缩点
P3388 【模板】割点(割顶)
题目地址注意点:dfn[x]#includeusingnamespacestd;constintMAXN=4e4,MAXM=2e5;structEdge{intfrom,to,
nxt
;}e[MAXM];
Object_S
·
2020-08-11 04:47
A
--
模板
A
--
知识点
#
割点
T103489 【模板】边双连通分量
#include#includeusingnamespacestd;constintMAXN=1e5,MAXM=1e6;structEdge{intfrom,to,
nxt
;}e[MAXM];inthead
Object_S
·
2020-08-11 04:47
A
--
模板
A
--
知识点
#
边双连通分量
洛谷 P3649 徐州2019网络赛G gym100548G(回文自动机)
回文自动机大概是根据最长回文后缀来实现求
nxt
数组和fail数组每个节点表示一个回文串,最后拓扑合并一下就是每个回文串出现次数,回文长度中间记录下也不难,最后遍历所有节点求解即可代码#in
ToRe.
·
2020-08-11 03:03
回文自动机
回文自动机
ICPC Pacific Northwest Regional Contest 2019 ABCDEM
#includeusingnamespacestd;typedeflonglongll;constintM=1e5+7;inthead[M],cnt;structEDGE{intto,
nxt
,val;}
夕林山寸
·
2020-08-11 03:03
网络赛
【BZOJ3205_洛谷3638】[APIO2013]机器人(动态规划)
题目:洛谷3638分析:卡了一天的神题……(OrzJumpmelon)首先预处理出从点\(p\)向\(d\)方向出发最终能到达的点\(
nxt
[p][d]\)。这个可以直接记忆化搜索解决。
weixin_30852367
·
2020-08-10 23:23
JZOJ 3252. 【GDOI三校联考】炸弹
#includeusingnamespacestd;intn,m,mp[55][55],f[55*55][4],tot,vis[55*55],h[55*55],rt;structedge{intto,
nxt
leiyuanze
·
2020-08-10 21:00
P1113 杂务 拓扑
100000000;inthead[maxn];intcnt;intval[20005],in[20005];boolbook[20005];intans[20005];intn,as;structN{intv,
nxt
wym_king
·
2020-08-10 20:31
数据结构
最小费用最大流
luogu-judger-enable-o2#includeusingnamespacestd;constintN=1e4+100;intn,m,S,T,tot;inthead[N];structnode{intv,cap,cost,
nxt
lixuwei2333
·
2020-08-10 19:14
算法模板
网络流
最小费用最大流
includeusingnamespacestd;constintMAXN=1000;constintMAXM=10000;constintINF=0x3f3f3f3f;structEdge{intv,c,w,
nxt
algzjh
·
2020-08-10 15:54
#
网络流及二分图
最小费用最大流
树链剖分入门详解
intdfs(intx,intfa,longlongdeep){d[x]=deep;for(inti=head[x];i;i=
nxt
[i]){intu=to[i];if(u==fa)continue;dfs
Tekim
·
2020-08-10 14:56
c++
算法
树链剖分
网络流算法+例题整理
DINIC(无当前弧优化):voidadd(intx,inty,intz){son[++tot]=y,w[tot]=z,
nxt
[tot]=lnk[x],lnk[x]=tot;}intdfs(intx,intsum
DYT_B
·
2020-08-10 13:01
知识整理
最小费用最大流(spfa增广)——模板整理
#include#include#include#includeusingnamespacestd;constintmaxn=5005,maxe=100005;intn,m,
nxt
[maxe],S,T,
Lynstery
·
2020-08-10 13:09
网络流
我的OI学习足迹
2019 牛客暑假多校训练营 第四场 I 广义后缀自动机+回文自动机
#includeusingnamespacestd;constintmaxn=4e5+100;chars[maxn];intlen;intT;intn,m;structSAM{intlast,cnt,
nxt
Black__wing
·
2020-08-10 13:30
回文自动机
后缀自动机
New Equipments( 最小费用最大流+性质 )
个工人(#defineinf0x3f3f3f3f#defineintlonglongusingnamespacestd;constintmaxn=55*55*5;structnode{intto,w,f,
nxt
才子词人自是白衣卿相
·
2020-08-10 13:19
2020多校赛
链表相关题目的实现
给定链表的信息,及元素的值A及对应的
nxt
指向的元素编号同时给定val,请构造出这个环形链表,并插入该值。
枯萎的海风
·
2020-08-10 05:57
算法与OJ
C/C++
cf29d 深搜,dfs序
#includeusingnamespacestd;#definemaxn500structEdge{intto,
nxt
;}edge[maxnv;voidinit(){memset(head,-1,sizeofhead
weixin_30765475
·
2020-08-09 13:33
2020杭电多校第六场 1006 A Very Easy Graph Problem
includeusingnamespacestd;constintN=1e6+50;constlonglongmo=1e9+7;structEdge{intpoint;intnext;longlongw;}
nxt
wayne_lee_lwc
·
2020-08-09 05:55
#
杭电多校
数据结构
算法
图论
二分图的染色与匹配
#include#include#include#include#include#includeusingnamespacestd;intn,m,ru,rv,tot;intfirst[100010],
nxt
Loi_MurasameKatana
·
2020-08-08 19:21
>算法集合(_▽_)<
二分图染色
匈牙利
NOIPRP++
[动态点分治] BZOJ3730: 震波
include#includeusingnamespacestd;constintmaxn=100005,maxe=200005;intn,m,w[maxn],last_print;intfir[maxn],
nxt
Lynstery
·
2020-08-08 01:45
树分治
我的OI学习足迹
初识App Inventor 2(AI2)
除此之外它也正式支持乐高
NXT
机器人,对于Android初学者或是机器人开发者来
深夜码农
·
2020-08-07 18:24
App
Inventor
2应用开发
android
积木
设计
编程
谷歌
20190921
defineRregisterintusingnamespacestd;namespaceLuitaryi{constintN=100010;chars[N*3],s1[N],s2[N];intl,l1,l2,
nxt
1
diaohan2969
·
2020-08-07 13:11
BZOJ4059: [Cerc2012]Non-boring sequences
和这道题很像,同样记一个
nxt
[i]
nxt
[i]
nxt
[i]表示a[i]a[i]a[i]下一次出现的位置,枚举左端点,撤销[i,
nxt
[i]−1][i,
nxt
[i]-1][i,
nxt
[i]−1],加上[
forezxl
·
2020-08-07 12:52
BZOJ
数据结构---线段树
蒟蒻zxl的Blog专栏
LeetCode高频面试题记录
高频面试题记录K个一组翻转链表困难classSolution{ListNode*reverseList(ListNode*a,ListNode*b){ListNode*pre=NULL,*cur=a,*
nxt
qq_32468785
·
2020-08-05 19:00
C++
蒋豆芽的秋招之路
最短路算法——SPFA
include#include#include#include#defineINF0x3f3f3f3fusingnamespacestd;constintMAXN=1e3+20;structedge{intt,
nxt
weixin_30723433
·
2020-08-05 17:12
POJ 3691 AcWing 1053 修复DNA
具体来说,我们先将不允许出现的短串建AC自动机,在每个串末尾打一个标记(注意:在当
nxt
[p]
nxt
[p]
nxt
[p],被打标记后,p上也要打标记,因为从根到
nxt
[p]所组成的字符串是从根到p所组成的字符串的后缀
linwenqidbk
·
2020-08-05 17:02
动态规划
AC自动机
2010年11月编程语言排行榜:手机里的代码
本期另外一个值得注意的语言是重回前20名
NXT
-G。
weixin_33754913
·
2020-08-04 20:52
繁忙的都市(最小生成树模板)
include#includeusingnamespacestd;constintmaxm=50010;intn,m,a[maxm],maxx,head[2*maxm],fa[310],v[2*maxm],
nxt
renxinyu2002
·
2020-08-04 17:42
图论专题
noip冲刺复习
lougu2017 [USACO09DEC]Dizzy Cows G
的方向使图不存在环根据有向边统计入度,拓扑排序,碰到端点有入度为0的点的无相边,则方向为入度为0的边指向另一点#includeusingnamespacestd;constintmaxn=3e5+7;inthead[maxn],
nxt
best_jayce
·
2020-08-04 17:23
算法
Cf1152 欧拉回路
https://blog.csdn.net/qq_37555704/article/details/83347641无向图建双向边但只能用一个,
nxt
数组优化当前节点考虑的边号防止反复从头枚举,离散化数组要开大
c_cl
·
2020-08-04 13:43
图论
hdu 2222 -AC自动机入门
typedeflonglongll;constintmx=5e5+10;intn,m,root,tot;intnxt[mx][26],fail[mx],key[mx];intinit(){memset(
nxt
a1214034447
·
2020-08-04 12:22
字符串
【东方模拟题】伊吹萃香 分层图最短路
其他的看代码就行了…代码:#include#include#include#include#includeusingnamespacestd;constintsize=100010;inthead[size],
nxt
DQSSS
·
2020-08-04 12:26
===图论===
最短路
字符串专题
4.扩展KMP/字符串最小表示法(咕咕咕)模板熟练KMP模板:#include#include#include#include#includeusingnamespacestd;intls,lt,
nxt
acw10104
·
2020-08-04 10:29
树上第k大/小(主席树)
R[maxn*44],sum[maxn*44];inta[maxn],b[maxn],f[maxn][22],dep[maxn],e,len,tot;intto[maxn*2],head[maxn],
nxt
CC_1012
·
2020-08-04 10:56
Daily
algorithm
最短回文串(KMP)
思路:关键在于找串s的最长回文前缀串,可以构造其反串rev,长串s2=s+#+revs2=s+\#+revs2=s+#+rev,求s2的最后一个位置的
nxt
值,即对应串s的最长回文前缀串的长度。
罗gkv
·
2020-08-04 07:11
leetcode
蒟蒻的第一篇学习日记(KMP)
先粘代码:voidgetnext(stringa){intlen=a.size();intk=-1;intj=0;
nxt
[0]=-1;while(j
天际之子
·
2020-08-03 14:26
zkw费用流
q.empty()){inttmp=q.front();q.pop();b[tmp]=0;for(inti=head[tmp];i;i=a[i].
nxt
)if(dis[a[i].to]>dis[tmp]
iamwms
·
2020-08-03 13:50
网络流
板子
设计包含min函数的栈,要求函数min、push以及pop的时间复杂度都是O(1)
classStack{private:structLink{intdata;Link*next;Link(constint&dat,Link*
nxt
):data(dat),next(
nxt
){}~Link
NEOMc
·
2020-08-03 13:28
C++
面试积累
null
数据结构
delete
struct
class
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
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
其他