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
TOT
2017.9.24 三色二叉树 思考记录
所以枚举下面点的情况转移就可以了码:#include#includeusingnamespacestd;#includevectorv[100005];intf[100005][2],g[100005][2],
tot
_hlly_
·
2020-08-17 00:08
题目
HDU4825 01字典树模板题
includeusingnamespacestd;constintMAXN=100000+7;structnode{intnext[2];intcnt;intw;}t[MAXN*33];inta[MAXN],num[33],
tot
Start_to_crazy
·
2020-08-16 23:44
字典树
~Keywords Search~~~~AC自动机
输入:第一行是一个整数N,表示关键词个数,下面有N个关键词,Nq;for(inti=0;iusingnamespacestd;constintN=1e6+1;inttrie[N][26],num[N],
tot
HAUT_Xjl
·
2020-08-16 23:51
算法
【GDOI2013模拟1】病毒传播
上标:#include#include#defineN1510usingnamespacestd;intm,a[N],s[N],bz[N],
tot
=0;longlongK;i
Larry1118
·
2020-08-16 23:48
矩阵乘法
SAS学习笔记(四)
";DATAmylib.SCORE;/*data步先插入一部分数据*/INPUTNUM$S1-S3@@;CLAS=SUBSTR(num,3,2);/*用SUBSTR函数从NUM中截取出班级CLAS*/
TOT
yyxyyx10
·
2020-08-16 22:57
SAS
spfa dijkstra堆优化
include#include#include#defineinf1000000000usingnamespacestd;typedeflonglongll;constintN=1010;intn,m,
tot
flyzer
·
2020-08-16 06:35
模板题
家谱树 拓扑算法
【输入格式】第1行一个整数N(1#includeusingnamespacestd;intr[101],c[101];inta[101][101],ans[101];intnum,
tot
,temp,n,
魔丸小哪吒
·
2020-08-16 05:53
拓扑排序
数据结构——线性表
栈栈(stack)(lastinfirstout);后进先出1.函数实现栈#includeusingnamespacestd;ints[10005];inttot;voidpush(intx){s[++
tot
繁凡さん
·
2020-08-16 03:10
#
基础合集
#
线性表
trie模板
intchild[maxnode][charset];boolflag[maxnode];trie(){memset(child[1],0,sizeof(child[1]));flag[1]=false;root=
tot
luminous11
·
2020-08-15 23:09
模板
POJ1816(字典树模糊匹配)
include#includeusingnamespacestd;constintmaxn=100005;inttrie[maxn][28];intval[maxn];intans[maxn];intn,m,
tot
奔跑的蜗new
·
2020-08-15 22:59
字典树
P2820 局域网 洛谷
题目背景某个局域网内有n(n2#include3#include4#definemaxn1e75#definecnt10567usingnamespacestd;89intn,m,x,y,z,minn,k,
tot
agcozdwdfvds08078
·
2020-08-15 22:34
字典树基础模板
1.查询一个单词是否出现/*trietree的储存方式:将字母储存在边上,边的节点连接与它相连的字母trie[rt][x]=
tot
:rt是上个节点编号,x是字母,
tot
是下个节点编号*/#include
drrrrrrrrr
·
2020-08-15 22:29
模板
字典树入门
qu.empty())qu.pop();mem(ne,0);//mem(fail,0);mem(vis,0);mem(book,0);
tot
=1;}voidInsert(char*str,inty)//
CYBCLOUD
·
2020-08-15 20:53
字典树
金明的预算方案
structnode{intv,w,fa;}a[maxn];structedge{intnext,end;}e[maxn];inttot;inthead[maxn];voidadd(intx,inty){e[++
tot
Magnetic_Momain
·
2020-08-15 17:30
20191031
definemaxn10010usingnamespacestd;intn,m,k;structedge{intend,next;}e[maxn];inttot;inthead[maxn];voidadd(intx,inty){e[++
tot
Magnetic_Momain
·
2020-08-15 17:30
期望——Vasya and Magic Matrix
defineintlonglongusingnamespacestd;usingnamespacestd;constintN=10000010;intn,m,sumx,sumy,sump,dp[N],sumdp,x,y,
tot
行走天涯的豆沙包
·
2020-08-15 16:01
数学
NOIP2018PJ
⋯\cdots⋯Vars:string[10];
tot
,i:longint;Beginreadln(s);
tot
:=0;fori:=1
willbe233
·
2020-08-15 16:45
切题集合
【BZOJ4872】分手是祝愿(动态规划,数学期望)
从大到小枚举,每次把最大的没有关掉的灯关掉暴力枚举因数关就好假设我们知道了当前至少要关\(
tot
\)次如果一个灯被动两次以上是没有任何意义的所以,相当于,要动的灯只有\(
tot
\)个其他的是没有任何意义的所以
weixin_30263277
·
2020-08-15 16:09
prometheus查看cpu的使用率
instance))/(sum(increase(node_cpu_seconds_total[1m]))by(instance)))*100(sum(increase(node_cpu_seconds_
tot
柳暗花明又一村ヾ(◍°∇°◍)ノ゙
·
2020-08-15 15:39
Prometheus
JS 数组对象如何使用Array.reduce
count:23}],需要求所有天数的sum(count)使用技术:Array.reduce()/***reduce函数接收四个参数,分别是total,currentValue,index,arr**
tot
Wuuboy
·
2020-08-15 15:25
javaScript
数组方法reduce
1.计算一维数组元素之和letarr=[1,5,6]letfn=(
tot
昵称叫铃风的小前端
·
2020-08-15 15:32
js语法
HDU-4453 Looploop(Splay树)
includeusingnamespacestd;constintMX=2e5+5;intm,k1,k2;intn;inta[MX];introot,rear;//根节点,节点总数intrem[MX],
tot
丿残念灬
·
2020-08-15 15:49
Splay-Tree
js中Array的reduce()函数
constarr=[1,2,3,4,5];consttotal=arr.reduce(function(sum,item){returnsum+item},0);console.log('======
tot
halo1416
·
2020-08-15 14:01
JavaScript
POJ 3680 最小费用最大流
include#includeusingnamespacestd;#defineN444#defineM2222intfirst[N],next[M],v[M],edge[M],cost[M],s[N],top,
tot
weixin_33811539
·
2020-08-15 11:15
struct--iphdr -- IP头部
:4;#elifdefined(__BIG_ENDIAN_BITFIELD)__u8version:4,ihl:4;#else#error"Pleasefix"#endif__u8tos;__be16
tot
_len
bjutnotbit
·
2020-08-15 09:29
linux
网络
路由器
alignment
网络
struct
tcp
字典树——HDU2072
include#include#includeusingnamespacestd;constintmaxn=1e4+7;stringstr1,str2;inttree[maxn][30],flag[maxn],
tot
weixin_30732487
·
2020-08-15 08:17
[杂题 交互] Codeforces Gym 101190 NEERC 16 I. Indiana Jones and the Uniform Cave
include#include#include#include#includeusingnamespacestd;stringret;inttot;inlinevoidP(intx,inty,intz){++
tot
里阿奴摩西
·
2020-08-15 08:49
杂题
交互题&提交答案题
4242: 水壶
然后就是货车运输了Orz题解我的收获:#include#include#include#defineN2005#defineM200005usingnamespacestd; intn,m,pt,cas,
tot
Mmh2000
·
2020-08-15 05:28
4001-4250
[Trie树优化建图 2-SAT] Codeforces Gym101190B. Binary Code
用类似于前缀优化建图的方法建图#include#include#include#include#includeusingnamespacestd;constintN=5000010;intn,lst,cnt,
tot
LowestJN
·
2020-08-15 05:06
字典树
2-SAT
Codeforces 964D - Destruction of a Tree(思维 + DFS)
#includeusingnamespacestd;constintmaxn=200005;structEdge{intto,next;}e[maxn*2];inthead[maxn],
tot
;intfa
Chen丶HC
·
2020-08-14 13:02
Codeforces
this指针(超详细)
defineSTOCK_H_#includeclassStock{private:std::stringcompany;longshares;doubleshare_val;doubletotal_val;voidset_
tot
美女大神的日子
·
2020-08-14 11:02
c++学习
NKOJ 4284 路径数【最短路计数】
definelllonglongusingnamespacestd;constllN=2e2+5;constllInf=1e18;constllMod=1e9+9;lln,t,mp[N][N],id[N][N];lldis[N*N],vis[N*N],
tot
Yucoh
·
2020-08-14 08:57
NKOJ
图论-最短路
图论-最短路计数
用回溯法法解决八皇后问题
把问题分为若干步骤并递归求解时,如果当前步骤没有合法选择,则函数将返回上一级递归调用,//八皇后问题//C[i]存的是第i行的皇后放在哪一列voidsearch(intcur){inti,j;if(cur==n)
tot
qq_41945366
·
2020-08-14 07:48
jzoj6541 Permutation (树上排列dp)
nusingnamespacestd;typedeflonglongll;constintN=5000+10;intn,mo;lljc[2*N],njc[2*N];intfinal[N],nex[N*2],to[N*2],
tot
jokerwyt
·
2020-08-14 07:14
题解
回溯法输出所有出栈序列
includeusingnamespacestd;inttot,res,sta,n;intr[2005],s[2005];voidrecall(intm){if(m==n+1){//若所有元素都入过栈,输出当前出栈序列
tot
Boss_Song
·
2020-08-14 06:23
洛谷 P2559 [AHOI2002]哈利·波特与魔法石
第三行有一个正整数c,c#include#include#include#include#defineMAXN10010usingnamespacestd;queueque;intS[8];ints,t,m,
tot
HJ921004
·
2020-08-14 06:05
【题解】洛谷P1144最短路计数 spfa
#include#include#includeusingnamespacestd;constintN=1e6+10,mod=1e5+3;intn,m,hd[N],
tot
,dis[N],vis[N],cnt
不进清北不改名
·
2020-08-14 06:07
洛谷
最短路问题
poj 3494 单调栈
intn,m,d[2020];intstack[2020],l[2020],r[2020];longlongres;voidcal(){inttot=0;for(inti=0;i0&&d[stack[
tot
sky_zdk
·
2020-08-14 05:54
ACM
poj
【凸包模板】
structnode{intx,y;}p[N],a[N];intn,
tot
;doubledis(nodea,nodeb){returnhypot(a.x-b.x,a.y-b.y);}intmulti(nodep0
Here_jiaxinwei
·
2020-08-14 04:17
凸包
51nod 1301 集合异或和
你需要构造两个整数集合X与Y,且需要满足以下要求:(1)对所有的xi∈X,满足1#include#include#includeusingnamespacestd;constintmod=1e9+7;intn,m,
tot
ShinyaLicone
·
2020-08-14 04:20
其它OJ
动规
C++
数位DP
洛谷 P1034 [NOIP2002 T4] 矩形覆盖
题目描述在平面上有n个点(n=
tot
;2.长方形数大于k;3.剩余点数小于剩余须加的长方形数;4.剩余点数等于剩余须加的长方形数,用已有的now值直接更新ans值,因为单个点面积为1;5.题目中要求的剪枝
ShinyaLicone
·
2020-08-14 04:11
NOIP
洛谷
dfs/bfs
bzoj1217: [HNOI2003]消防局的设立
include#include#defineN1005usingnamespacestd;structedge{intto,next;}e[2005];inthead[1005],f[1005],n,v,ans,
tot
zhouyuyang233
·
2020-08-14 00:49
辣鸡八中
贪心
第一篇,怎么增加SYN数据包的大小(syn flood攻击实验)
谢谢iphdr->
tot
_len总长度字段(16位)是指整个IP数据报的长度,以字节为单位。利用首部长度字段和总长度字段,就可以知道IP数据报中数据内容的起始位置和长度。
醇雾
·
2020-08-13 23:48
DDoS攻防学习
P2900 [USACO08MAR]土地征用 [斜率优化]
如果被包涵就直接剔除这个点显然取一段连续的是最优的,因此定义f[i]表示1--i的最小价值斜率优化搞一波,树形结合来写#include#defineN50050#defineLLlonglongusingnamespacestd;LLf[N],n,
tot
FSYo
·
2020-08-13 18:11
斜率优化
P3128 [USACO15DEC]最大流 [树上差分]
传送门点权差分,点加点加,lca减,fa[lca]减#include#defineN50050usingnamespacestd;intfirst[N],next[N*2],to[N*2],
tot
;intn
FSYo
·
2020-08-13 18:40
uva 11039
sizeof(vis));scanf("%d",&q);while(q--){intx;scanf("%d",&x);if(x>0)vis[x]=1;elsevis[-x]=-1;}intflag=0,
tot
sky_zdk
·
2020-08-13 18:02
UVA&&LA
算法竞赛入门经典训练指南
[c++]gcd(数论)
自己的一个小结文章目录题目描述输入输出样例输入样例输出提示思路看看代码有利于理解题目描述给定整数N,求1#defineLLlonglong#defineregregister#defineM10000000intn,
tot
Pi_UK(wjh)
·
2020-08-13 18:27
考试专用题
数论
神经网络举例(含卷积)------Pytorch
3,6))#把图片转换为tensor'''fromPILimportImagefromtorchvision.transformsimportToTensor,ToPILImageto_tensor=
ToT
轻羽羽
·
2020-08-13 16:51
PyTorch
算法练习--卡片游戏
1357426实现:functionf(n){vararr=newArray();for(vari=0;i1;){vartoThrow=arr[0];arr.splice(0,1);ret.push(
toT
mybwu_com
·
2020-08-13 16:25
洛谷 P1550 [USACO08OCT]打井Watering Hole
include#includeusingnamespacestd;constintmaxn=310*310;structnode{intx;inty;intv;}tu[maxn];intn,ans,num,
tot
M_ercury_
·
2020-08-13 15:23
===图论===
最小生成树
上一页
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
其他