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
Vis
OpenJudge noi 2971抓住那头牛(POJ 3278)
includeconstintmaxn=110000;usingnamespacestd;queueq;intstep[maxn];boolvis[maxn];intn,k;voidbfs(){q.push(n);step[n]=0;
vis
Loi_black
·
2020-08-19 08:49
bfs
=====复习=====
NOI OpenJudge 2971:抓住那头牛 BFS
include#include#include#includeusingnamespacestd;intN,K;boolvis[100010q;intbfs(intx){q.push((T){x,0});
vis
LOI_DawnKing-
·
2020-08-19 08:07
搜索
水题
NOIP2010 引水入城 解题报告(bfs+dp)
整体思路:先将沿河的所有城市加入队列,进行bfs,然后看能不能做到每个城市都有水,如果不能则直接输出即可,若能操作顺序如下:以每一个近水点为原点搜一下,求出每个可建蓄水池位置建造蓄水池后的最大影响范围(记得
vis
嘉庆帝
·
2020-08-19 07:28
NOIP2010
NOIP模拟
DP+BFS
【洛谷P1608】路径统计(最短路计数模板)
那么对于i的每条出边,如果zdl[i]+val=zdl[
vis
],说明还有另外若干条可以从i到达
vis
的路径,因此cnt[
vis
]+=cnt[i]大概是下图这样的一个意思当然,如果zdl[i]+val#
Android66666
·
2020-08-19 06:00
Tableau
Vis
- Intersection Filter
IntroIfyouusedTableaubefore,youwillknowthatthefiltersinTableauareunion/orselection.Let’stakethetablebelowforexample.Ifyouaregoingtocreateafilterandselectproducta&b,tableauwillshowclientA,B,CandEinstea
chaoran_liu
·
2020-08-18 20:25
数据可视化
拓扑排序判断回路
#includeusingnamespacestd;intn,m,h[100010],
vis
[100010],cnt=0,t[10010],in[100010];vectorv[100010];structnode
2020/3/16
·
2020-08-18 19:08
拓扑排序
java实现有向图DFS遍历的基本方法
packageapp;importjava.util.Scanner;//importjava.util.Queue;classTu2{publicstaticintmaxn=100;staticboolean[]
vis
萌新渣渣
·
2020-08-18 18:04
java
Python开源人脸识别库,识别率达99.38%!内附教程+源码分享
dlib:http://dlib.net/数据测试库LabeledFacesintheWild:http://
vis
-www.cs.u
喜欢打酱油的老鸟
·
2020-08-18 17:32
人工智能
2018.11.02 洛谷P2661 信息传递(拓扑排序+搜索)
includeusingnamespacestd;constintN=2e5+5;intn,du[N],nxt[N],ans=0x3f3f3f3f;boolvis[N];inlineintdfs(intp,intlen){if(
vis
weixin_30622107
·
2020-08-18 17:05
org.apache.cxf.binding.soap.SoapFault: Could not initialize class
定位到mapper.xml中的错误deletetraining.dbo.patient_visitwherepat_
vis
_num=#{_parameter}添加了这个就会报错然后测试,将里面的代码注释
雨迹无魂
·
2020-08-18 17:54
MyBatis
BUG
简要介绍 LFW dataset
人脸识别领域最重要的数据集合是lfw:网址:http://
vis
-www.cs.umass.edu/lfw/lfw数据集是为了研究非限制环境下的人脸识别问题而建立。
枯木寒岩
·
2020-08-18 17:38
人脸识别
车站分级[拓扑排序]
传送门每次出现的车站的级别一定比没出现的高,所以没出现的向出现了的连边然后拓扑排序找一个最长的路径因为最多n^2个边,所以复杂度O(n^2)#include#defineN1005usingnamespacestd;intn,m,ans,
vis
FSYo
·
2020-08-18 16:27
拓扑排序
树形dp详细解析
inttot=0;inthead[MAX_N],nxt[MAX_N进入for循环:v=1,w=5->if判断不成立,进入dfs(1)3.
vis
[1]=1->进入for循环:v=5,w=6->if判断不成立
Pinaoo
·
2020-08-18 16:06
洛谷 P1983 车站分级 拓扑排序
include#include#includeusingnamespacestd;constintN=1000+1;constintINF=10000+233;queueQ;intA[N],ok[N],
vis
EM-LGH
·
2020-08-18 15:23
vc工程内存泄露检测方法
借助
Vis
genganpeng
·
2020-08-18 14:42
C++
visual studio 2019 不能使用xunit进行测试
micxxxx.netcore.app3.1.0-rtm.19565.2runtime.win-x86.micxxxx.netcore.app.deps.jsonxunitadapter解决办法:安装完整的
vis
大聪
·
2020-08-18 14:59
.Net
Core
ASP.NET
Big Mart Sales:预测销售结果 |Python
训练集的数据形式如下:变量描述如下:Item_Identifier:产品编号Item_Weight:产品重量Item_Fat_Content:产品是否低脂肪Item_
Vis
长弓瑾瑜
·
2020-08-18 14:19
Python数据分析项目
P1347 排序(拓扑排序)
首先记录所有的点和所有点的入度(在连边时顺便求得的入度),if(
vis
[aa]!=1)
vis
[aa]=1,tot++;//tot记录的是目前能算得上点(因为是
a8613585
·
2020-08-18 14:34
NOIP2015信息传递
longint;i:longint;dfn,low,z,size:array[0..200010]oflongint;last,pre,other:array[0..200010]oflongint;
vis
Eirlys_North
·
2020-08-18 13:35
noip复赛=A=
tarjan
基于二维矩阵的深搜(dfs)和广搜(bfs)python实现
defbfs(start,matrix):"""广搜"""n=len(matrix)queue=[]queue.append(start)
vis
=[[Falsefor_inrange(n)]for_inrange
AivenZ
·
2020-08-18 13:39
算法与数据结构
【P4017 最大食物链计数】拓扑排序
=0;#definemaxn5010#definemaxe500010#definemod80112002structEdge{intto,nxt;}edge[maxe];inthead[maxn],
vis
柯微
·
2020-08-18 13:52
图论
洛谷——P1347 排序
include#include#defineN110usingnamespacestd;inta,b,n,m,s,sum,tot,head[N],in[N],inn[N],p[N];boolv,unpd,
vis
weixin_34384557
·
2020-08-18 13:32
洛谷 P1983 车站分级 拓扑排序
include#include#includeusingnamespacestd;constintN=1000+1;constintINF=10000+233;queueQ;intA[N],ok[N],
vis
EM-LGH
·
2020-08-18 13:23
拓扑排序
基于二维矩阵的深搜dfs和广搜bfs Java实现
与传统bfs不同的数据结构:graph(二维矩阵图)
vis
(二维标记,标记对应位置是否访问过)direction(存行走方向,比如往左走就是{0,-1},表示i不变,j减一嘛,同理右{0,1},上{-1
AivenZ
·
2020-08-18 13:23
算法与数据结构
HDU2874
include#include#include#defineN10005#defineM1000005usingnamespacestd;intcnt_e,cnt_q,head_e[N],head_q[N],
vis
AAAAAugust
·
2020-08-18 08:38
LCA
UVA 11762 Race to 1 dp+概率
include#includeusingnamespacestd;constintmaxn=1e6+10;constintmaxc=1e5;doublef[maxn];intprime[maxc],num,
vis
knownothing
·
2020-08-18 08:37
数论*
UVa818 - Cutting Chains
打开的铁环足够把剩下的铁环串成串(没打开的铁环的连通量#include#definemin(a,b)(a)2)returntrue;}returnfalse;}booldfs(ints,intnow,intfa){
vis
BEconfidence
·
2020-08-18 08:05
UVA
uva 11762 dp
RujiaLiu#include#include#includeconstintmaxn=1000000+10;doublef[maxn];intremoved[maxn],primes[maxn],
vis
Tczxw
·
2020-08-18 08:12
HDU 2874 LCA
includeusingnamespacestd;constintmaxn=1E5+10;constintmaxm=maxn*2;constintmaxq=2E6+10;intn,m,q,dis[maxn],
vis
Tczxw
·
2020-08-18 08:12
LeetCode 79 单词搜索
//记录起点,然后dfsclassSolution{int[]dx={-1,0,1,0};int[]dy={0,1,0,-1};intn;intm;boolean[][]
vis
;publicbooleanexist
TIMELIMITE
·
2020-08-18 08:40
LeetCode
数组
dfs
Java
[2016ACM多校] HDU5724 博弈论 SG
AC代码C#include#include#defineLEN20intsg[1=0)returnsg[s];inti,np;boolvis[LEN=LEN)break;
vis
Burning1108
·
2020-08-18 08:08
acm-icpc
HDU4614
#include#include#include#includeusingnamespacestd;constintmaxn=100010;structpoint{intl,r,flag,
vis
;//
vis
wzj792506536
·
2020-08-18 07:34
杭电2013暑假多校第二场
图论—BFS
顶点数,边数vectorG[MAXV];//邻接表boolvis[MAXV]={false};//访问标记数组voidBFS(intu){queueq;//创建队列qq.push(u);//将顶点入队
vis
zmqgeek
·
2020-08-18 07:49
算法
图论—DFS
constintMAXV=1000;//最大顶点数intn,m,G[MAXV][MAXV]={0};//邻接矩阵boolvis[MAXV]={false};//标记数组voidDFS(intu,intdepth){
vis
zmqgeek
·
2020-08-18 07:49
算法
2017蓝桥杯整理
includeusingnamespacestd;stringdata[10];intans;intvis[10][10];//标记boolsolve(inti,intj){if(i9||j9)returntrue;if(
vis
小熊迪帝
·
2020-08-18 06:49
数论.素数筛
maxn+1];/*isPrime[i]true表示i为素数*/voideratos(intn){inti,j;isPrime[0]=isPrime[1]=false;for(i=2;in)break;
vis
marine origin
·
2020-08-18 06:18
数论
AtCoder-ABC-171题解(A~E)
Code:intmain(){charc;cin>>c;if(c>='A'&&cmp,
vis
;intmain(){intn;n=read();intk;k=read();rep(i,1,n){q[i]=
Quuns
·
2020-08-18 06:16
ACM
AtCoder
统计图的连通分支数
includeusingnamespacestd;constintMAXV=1000010;//最大顶点数vectorAdj[MAXV];//邻接表intn;//顶点数boolvis[MAXV];//如果顶点i已被访问,则
vis
weixin_42104573
·
2020-08-18 05:19
图
算法笔记
连通问题
defineMAXN100005usingnamespacestd;#defineinf0x3f3f3f3fvectorg[MAXN];intcolor[MAXN],dfn[MAXN],low[MAXN],stck[MAXN],
vis
tαOαo
·
2020-08-18 05:31
强连通分量&双连通
学习笔记--图论DFS,联通分量,时间戳
101112intdfs_clock;13intpre[maxn];14intpost[maxn];15intcc[maxn];16intcurrent_cc=0;17voiddfs(intu)18{19//pre2021
vis
weixin_33889665
·
2020-08-18 04:38
$spfa-dfs$优化板子
\(spfa-dfs\)优化板子快速判断是否存在负环(没负环时不要作死用)boolspfa(intu){
vis
[u]=1;for(registerinti=head[u];i;i=nxt[i]){intv
weixin_30840253
·
2020-08-18 04:02
Dijkstra算法(最短路;例题HDU2112)
.找到离起始点最近的节点从这个点松弛,并标记3.松弛,如果出现s->m>s->k->m,则将dis[m]松弛为dis[k]+G[k][j]核心代码:voidDijkstra(intn){memset(
vis
weixin_30823227
·
2020-08-18 04:29
邻接表割点、割边
#include#include#include#includeusingnamespacestd;#defineN10000vectorG[N+10];intlow[N+10],num[N+10],
vis
vagebird
·
2020-08-18 03:15
图论相关(代码)
某校赛题(bfs+状态压缩)
个城市表示着火了,然后选p个城市(p#include#include#include#includeusingnamespacestd;constintN=105;intfire[N],n,m,l,p,
vis
路小白_zZ
·
2020-08-18 03:24
ACM-隐式图搜索
线性筛选素数法(O(n)复杂度)
voidget_prime(){intnum=0;memset(
vis
,false,sizeof(
vis
));for(inti=2;i
风儿--zsj
·
2020-08-18 03:19
小知识
杭电oj2680 Choose the best route(did逆图)
#include#include#include#defineINF0x3f3f3f3fusingnamespacestd;intmap[1010][1010],dis[1010],
vis
[1010];
zhenzhenjiajia888
·
2020-08-18 02:46
图论——最短路径
最短路、KMP、MST、并查集、线段树
vis
[j]&&min(d[j]))拿来刷新到其他点的距离如果d[v]+mp[v][j]usingnamespacestd;#definemaxn1000100intnt[10010],a[maxn],
Aczy156
·
2020-08-18 02:10
ACM
P2752 [USACO4.3]街道赛跑Street Race
因此我萌枚举每个点进行bfs(对于点的删除处理方法很多,这里窝的方法是在bfs前就把该点的
vis
设为true,酱紫似乎很好写呢,也不会浪费时间复杂度)---------------------
MMMyrcellaaa
·
2020-08-18 01:34
图论——搜索
【模板】求欧拉回路
摘自李煜东《算法竞赛进阶指南》#includeconstintN=1e5+10,M=1e6+10;structEdge{intv,nx;}e[M];intn,m,hd[N],
vis
[M],tot,top
不进清北不改名
·
2020-08-18 01:56
模板
【DFS】数池塘
那么这里用的是DFS遍历8个方向,递归完成后
vis
是不用还原成0的,我之前的思路是将'W'变为'.'。每做完一次kcount,那么数量就加一。
qq_41513352
·
2020-08-18 01:32
上一页
15
16
17
18
19
20
21
22
下一页
按字母分类:
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
其他