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
oil
1011-
Oil
Deposits
1.题意:1011-OilDeposits2.题意:@一块为油田,若他的其他8个方向存在另一块油田(即@的其他8个方向有另外的一个@),那么就把他们看成是一大块油田,问所给样例中有几块油田?3.思路:DFS应用。这个题不是树的结构,DFS问题用递归解决,首先就是递归出口,当一块油田被搜索过了,或者搜索越界了,或者搜索不满足条件了,就停止,然后就是搜索其他8个方向,用二重for循环 均从-1到1,
houhouhhh
·
2016-04-24 22:00
搜索
1011
Oil
Deposits
ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandintonum
yjz_sdau
·
2016-04-24 15:00
1011
Oil
Deposits
1011OilDeposits题意:一个m*n的地图,其中要么是*,要么是@,对于@代表油田,横、竖、斜连着的成为一个块,问总共有多油田。思路:深搜,逐点搜索,对于不满足题意的点,返回上一层,继续搜索,直至所有点搜索完成。#include#includeusingnamespacestd;boolvisit[111][111];charmap[111][111];intdir[8][2]={{-1
diyutianxie
·
2016-04-22 18:00
Oil
Deposits
ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandintonum
qq_27478063
·
2016-04-22 16:00
Oil
Deposits
ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandintonum
tansanity
·
2016-04-22 13:00
ACM
Oil
Deposits 深度优先搜素油田
TheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandintonumeroussquareplots.I
mRango
·
2016-04-21 21:00
DFS 搜索 Problem 1011
Oil
Deposits 探索石油储量
ProblemID:1011 OilDeposits简单题意:给出一个m*n的region,*代表无油,@代表一个Oilpocket。如果两个@在横向或纵向或斜向相邻,则这两个@属于同一个Oildeposit。求Oildeposit的总数。解题思路形成过程:用数字来代替*和@,0代表无油,1代表一个Oilpocket。将它们存放至数组中。 利用DFS从第一行第一列开始依次遍历,进入递归语
q1169917
·
2016-04-20 19:00
算法
搜索
ACM
DFS
深搜
HDU 4185
Oil
Skimming(匈牙利算法)
OilSkimmingTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):1822 AcceptedSubmission(s):754ProblemDescriptionThankstoacertain"green"resourcescompany,ther
aozil_yang
·
2016-04-19 00:00
C语言
oil
deposits——广搜
OilDepositsProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthe
StubbornAccepted
·
2016-04-16 20:00
oil
deposits——深搜
OilDepositsProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthe
StubbornAccepted
·
2016-04-16 19:00
搜索—Problem_1011-
Oil
Deposits
搜索—Problem_1011-OilDeposits题意搜索石油块问题。题目说明,@代表有石油,*代表没有石油,而在一个有石油的地方它的周围8个方向的地方如果也有石油,那么这2块则石油是属于一块。,给出图,问图中有几块石油田。解题思路使用DFS搜索,首先搜索图中第一个出现@的位置,然后对其8个方向进行搜索,并对搜索过的为@进行标记,直到一次搜索结束则油田总数加一,最后的总数即为所求的石油的方块数
hero5201
·
2016-04-15 15:00
搜索
UVa 572
Oil
Deposits
Description经典floodfill…Hint记得判断边界Code#include #include #include #include usingnamespacestd; intm,n; constintmaxm=100+9; constintmaxn=100+9; constintdx[8]={0,0,1,1,1,-1,-1,-1}; constintdy[8]={1,-1,0,1,
YYecust
·
2016-04-10 12:00
【BZOJ1177】[Apio2009]
Oil
【前缀和】【分类讨论】
【题目链接】一开始想搞三个单调队列跑,似乎会T,没思路,看了发题解,吓傻。【trinkle的题解】读入优化会RE,于是贡献了一发RE.../*Pigonometry*/ #include #include usingnamespacestd; constintmaxn=1505; intn,m,k,s[maxn][maxn],a[maxn][maxn],b[maxn][maxn],c[max
BraketBN
·
2016-04-06 09:00
11
Oil
Deposits
简单题意给出一个地图,其中要么是*要么是@,对于@,横、竖、斜连着的成为一个块,问总共有多个@块解题思路形成过程深度优先搜索,首先找到第一个@并以他为起点深搜,直到不能搜索为止,为一个块,之后在找到下一个@,在进行深搜,直到整个地图搜索完,为了避免重复,设置一个标记地图,对进行搜索过的点进行标记。感想老师上课讲的思路很清楚,不过自己写出来,总有些地方考虑不周AC代码#include#include
qq_33720032
·
2016-04-05 20:00
深度优先搜索
POJ 1562
Oil
Deposits,zoj1709
OilDepositsTimeLimit:1000MS MemoryLimit:10000KTotalSubmissions:15216 Accepted:8261DescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonel
xiaolonggezte
·
2016-04-05 20:00
C++
算法
DFS
hdu 1241
Oil
Deposits
ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandintonum
zyq_19960204
·
2016-04-04 11:00
HDU-1241-
Oil
Deposits
HDU-1241-OilDeposits题目链接:HDU-1241题目思路:在一个矩阵里,有些格子是‘@’,有些不是,相邻(上、下、左、右、左上、右上、左下、右下)的格子如果也是‘@’,那么他们属于同一个矿井,问总共有多少个矿井。题目思路:DFS,求连通块个数。以下是代码:#include #include #include #include #include #include #include
loy_184548
·
2016-04-01 12:00
HDU
DFS
1241
HDOJ 1241
Oil
Deposits(BFS)
ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandintonum
u013555159
·
2016-03-26 07:00
HDOJ 1241
Oil
Deposits(BFS)
ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandintonum
u013555159
·
2016-03-25 23:00
HDOJ 1241
Oil
Deposits(BFS)
ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandintonum
u013555159
·
2016-03-25 23:00
HD_1241
Oil
Deposits(DFS)
ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandintonum
eagle_or_snail
·
2016-03-22 20:00
搜索
ACM
深搜
HDU 1241/UVa572
Oil
Deposits(DFS&BFS)
OilDepositsTimeLimit:2000/1000ms(Java/Other) MemoryLimit:65536/32768K(Java/Other)TotalSubmission(s):2 AcceptedSubmission(s):2ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsibleforde
hurmishine
·
2016-03-22 18:00
oil
Deposits
hdu1241
Uva572
Oil
Deposits(dfs/bfs)
OilDepositsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):21818 AcceptedSubmission(s):12582ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresp
nuc_Sheryl
·
2016-03-19 11:00
Oil
Deposits
TimeLimit:1000msMemoryLimit:32768KB64-bitintegerIOformat:Javaclassname:SubmitStatusPID:334TheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelarg
acm_hmj
·
2016-03-18 22:00
C++
算法
搜素
什么是长元音和短元音
一、长元音就是a,e,i,o,u的“名称音”以及单词out,
oil
中的两个元音。至少有7个。二、短元音就是[e],[i],[u],box中的“o”音,反v,还有梅花形的音标,一共是6个。
天蚕宝衣
·
2016-03-18 19:00
uva 572
oil
deposits——yhx
OilDeposits TheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandintonumerouss
Orion_7
·
2016-03-13 14:00
深搜算法:倒油/面向对象的思想来做
下面为JAVA实现代码:主类:packagecn.hncu.
oil
.dfs1; importcn.hncu.
oil
.common.Bucket; importcn.hncu.
oil
.common.DumpCase
qq_26525215
·
2016-03-13 02:00
java
算法
面向对象
HDU 1241
Oil
Deposits (搜索水题)
HDU1241找连通集数量。注意第三个测试样例第一行后面多了一个空格,忽略即可。#include #include #include #include usingnamespacestd; intm,n; charmap[110][110]; intdir[8][2]={1,1,0,1,1,0,-1,-1,-1,0,0,-1,1,-1,-1,1}; voiddfs(intx,inty){ if(x
Strokess
·
2016-03-11 18:00
ZOJ 1709
Oil
Deposits(DFS)
OilDepositsTimeLimit:2Seconds MemoryLimit:65536KBTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcre
wchhlbt
·
2016-03-07 00:00
算法
ACM
ZOJ
poj
bfs
HDU 1241
Oil
Deposits
OilDepositsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):21513 AcceptedSubmission(s):12413ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresp
yao1373446012
·
2016-03-05 16:00
实时油价接口 按城市检索加油站
"E97#","0#","CNG","89#","90#","93#","97#","LNG","-20#",接口名称:实时油价接口接口平台:聚合数据接口地址:http://apis.juhe.cn/
oil
免费api接口
·
2016-02-22 15:00
油价API
实时油价
HDU 1241
Oil
Deposits
简单的dfs。。不过要规定条件,不然会wa。。有点奇怪。。照理说走出map就没有@了。。恩。。以后多多关注边界吧!#include intn,m; charmap[110][110]; intmove[8][2]={{1,0},{-1,0},{0,1},{0,-1},{1,1},{-1,-1},{-1,1},{1,-1}}; voiddfs(inti,intj) { for(intk=0;k=0&
qq_32995183
·
2016-02-20 16:00
DFS
汽车过沙漠问题【学习笔记】
1#include 2intmain() 3{ 4floatk; 5floatdis,
oil
;//dis表示距离终点的距离,1000-dis表示距离起点的距离。
华山青竹
·
2016-02-17 17:00
HDU 1241
Oil
Deposits(DFS模板题)
ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandintonum
tomorrowtodie
·
2016-02-12 01:00
算法
DFS
杭电
hdu 1241
Oil
Deposits
ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandintonum
LeeHolmes
·
2016-02-06 14:00
搜索
HDU
Oil
Deposits(水)
搜索第一题,直接模拟搜索就可以了dx和dy分别表示上下左右四个方向的搜索画个坐标轴就可以理解然后判断是否为*或者超出边界,搜索完之后记得标记为*表示已搜索过递归求解#include#include#defineN111charstr[N][N];inta,b;intdx[8]={1,1,0,-1,-1,-1,0,1};intdy[8]={0,1,1,1,0,-1,-1,-1};voidbfs(in
Diom
·
2016-02-04 17:12
acm
搜索
搜索
HDU 1241
Oil
Deposits(DFS)
题目链接ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandint
ACMSaga
·
2016-02-03 17:00
HDU 1241
Oil
Deposits(DFS)
题目链接ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectangularregionoflandatatime,andcreatesagridthatdividesthelandint
ACMSaga
·
2016-02-03 17:00
HDU1241
Oil
Deposits
原题地址:http://acm.hdu.edu.cn/showproblem.php?pid=1241题目大意:给一块油田,有油的是@,没油的是*,油田可以通过上下左右和对角线相连,问一共有几块连通的油田。由于数据很少(100*100)所以可深搜可广搜,以下是广搜的做法:从头开始遍历全图,每碰到一个没有标记过的油田就开始广搜,把搜过的都记上标记,然后油田总数加1。。#include #includ
qq_29480875
·
2016-01-31 14:00
例题6-12 UVA
Oil
Deposits油田
简单的DFS和那个上篇POJ一样的题目!#include #include #include usingnamespacestd; constintmaxn=100+10; intN,M; charmep[maxn][maxn]; voiddfs(intx,inty){ mep[x][y]='*'; for(intdx=-1;dx=0&&nx=0&&ny>N>>M&&N&&M){ getchar(
aozil_yang
·
2016-01-29 20:00
C语言
DFS
uva
HDU 1241
Oil
Deposits bfs
题目链接:OilDeposits这种水题还来写我是拒绝的。但是。记录吧。陷入对于编程无感的状态、1/* 2首先它水然后做过了。但是就是没有一点思路应该怎么做。被王sir嫌弃好失落。 3然后。我大腿启示我。 4直接搜呗。从所有可能的点随便找一个,搜。走过的路径就标记上,然后,再从剩下的找。直到所有的点都标记完就可以了、 5我T_T、总是不能自己想出思路来、 6*/ 7 8#includ
小小八
·
2016-01-28 22:00
HDU1241
Oil
Deposits
简单的广搜题目与大家分享一下代码。。#include #include #include #include #include usingnamespacestd; chara[105][105]; intsum=0,m,n; intdir[8][8]={{0,1},{0,-1},{1,0},{-1,0},{1,1},{1,-1},{-1,1},{-1,-1}}; voidbfs(intx,in
qq_32866009
·
2016-01-18 19:00
HDU
uva572
Oil
Deposits
题意:寻找“@”构成八连通的块数。思路:深搜入门水题#include usingnamespacestd; constintinf=0x7fffffff; intcnt,v[110][110],n,m,nxt[8][2]={-1,-1,-1,0,-1,1,0,1,1,1,1,0,1,-1,0,-1}; charM[110][110]; voiddfs(intx,inty) { v[x][y]=1;
yexiaohhjk
·
2016-01-15 19:00
【hdu】1241-
Oil
Deposits(DFS)(水)
OilDepositsCrawlinginprocess...CrawlingfailedTimeLimit:1000MS MemoryLimit:32768KB 64bitIOFormat:%I64d&%I64uSubmitStatusDescriptionTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingunde
wyg1997
·
2015-12-24 18:00
杭电1241
Oil
Deposits(搜索题)
OilDepositsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):19973 AcceptedSubmission(s):11475ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresp
mengxiang000000
·
2015-12-11 16:00
搜索
杭电
1241
搜索
Oil
Deposits
OilDepositsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):19962 AcceptedSubmission(s):11465ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresp
yangyuhang11
·
2015-12-10 20:00
hdu 1241
Oil
Deposits(DFS)
OilDepositsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):19924 AcceptedSubmission(s):11436ProblemDescriptionTheGeoSurvCompgeologicsurveycompanyisresp
Xwxcy
·
2015-12-06 15:00
天然的排毒方法:油拔
Oil
Pulling
文丨@悦活健康日记悦悦一直很注重自己的口腔保健,不仅仅是因为要防止蛀牙,更因为口腔的健康和我们的整体健康密切相关。中医里讲,齿为骨之余,而肾主骨,牙齿的坚固与否其实也是间接反映了你的肾功能的好坏,而口腔环境的健康直接关系到牙齿的健康问题。要知道口腔中的细菌是参与人体各处循环的,因而口腔卫生不注意会引起一些身体其他方面的疾病,尤其是心血管方面的问题。英国的科学家做过相关研究发现:如果不是一天刷2次牙
悦活健康日记
·
2015-11-22 15:17
hdu 4185
Oil
Skimming 二分匹配
#include #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; constintMAXN=601*601+10; constintMAXM=601*601*2; structEdge { in
xinag578
·
2015-11-20 15:00
Oil
Deposits(HD_1241)BFS
题目描述:见杭电OJhttp://acm.hdu.edu.cn/showproblem.php?pid=1241题目思路:题目大意为求油田的连通分量,可以用两个for循环遍历整个图,当遇到为油田时,分量数加一,并且使用DFS将相连的油田标记为已走过,最后输出分量总数。代码如下:#include"stdio.h"#include"string.h"#include"iostream"usingnam
Keeping111
·
2015-11-20 09:00
遍历
DFS
杭电
连通分量
上一页
3
4
5
6
7
8
9
10
下一页
按字母分类:
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
其他