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
lake
POJ 2386
Lake
Counting
链接:http://poj.org/problem?id=2386 DFS 的入门级题目....依次递归8个方向即可: #include <iostream> //#include<cstdio> using namespace std; char data[105][105]; int n,m; void dfs(int
·
2015-11-13 01:09
count
POJ 2253, Frogger
Submissions: 7844 Accepted: 2685 DescriptionFreddy Frog is sitting on a stone in the middle of a
lake
·
2015-11-13 01:56
poj
BZOJ 3385: [Usaco2004 Nov]
Lake
Counting 数池塘
题目 3385: [Usaco2004 Nov]
Lake
Counting 数池塘 Time Limit: 1 Sec Memory Limit: 128 MB
·
2015-11-13 01:21
USACO
【首先膜拜大湿】poj-2386-
Lake
Counting-DFS模板题
Lake
Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 
·
2015-11-12 22:11
count
四款主流手机音乐播放器横评
测试歌曲音乐格式:MP3 320KB CBR 测试歌曲曲目:Dark Moor - 《Swan
Lake
·
2015-11-12 21:51
播放器
as far as用法
They walked as far as the
lake
. 他们一直走到湖边。 2. 尽 ...;就 ... I'll help
·
2015-11-12 19:48
用法
[ios]如何分组具有 UICollectionReusableView (使用 JSON) 的单元格
我填充一个Rails应用程序(http://obscure-
lake
-7450.herokuapp.com/upcoming.json)从JSON与我的应用程序。
Joycecsdn
·
2015-11-12 17:00
poj 2386:
Lake
Counting(简单DFS深搜)
Lake
Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 
·
2015-11-12 15:42
count
CSRF——攻击与防御
CSRF——攻击与防御 author:
lake
2 0x01 什么是CSRF攻击 CSRF是Cross Site Request Forgery的缩写(也缩写为
·
2015-11-11 09:10
CSRF
35+雪花Logos设计灵感
snowflake-logos-ideas-17134.html VailMexico – MORE INFO Montana Ski – MORE INFO Salt
Lake
·
2015-11-11 09:21
logo
35+雪花Logos设计灵感
www.goodfav.com/35-snowflake-logos-ideas-17134.html VailMexico – MORE INFO Montana Ski – MORE INFO Salt
Lake
·
2015-11-11 08:55
logo
POJ 3620 Avoid The Lakes
# include <cstdio> # include <cstring> # define N 100 + 15 int n, m, k; char
lake
·
2015-11-11 07:22
poj
POJ 之2386
Lake
Counting
Lake
Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20003  
·
2015-11-11 00:42
count
POJ 2386
Lake
Counting【BFS】
题意:给出一个矩形,问有多少块连通的W 当找到W的时候,进行广搜,然后将搜过的W变成点,直到不能再搜,进行下一次广搜,最后搜的次数即为水塘的个数 看的PPT里面讲的是种子填充法。 种子填充算法: 从多边形区域的一个内点开始,由内向外用给定的颜色画点直到边界为止。如果边界是以一种颜色指定的,则种子填充算法可逐个像素地处理直到遇到边界颜色为止 对于这一题: 先枚举矩阵中的每一个元素,当元素为W
·
2015-11-10 23:26
count
POJ 2386
Lake
Counting_steven 解题心得
原题: Description Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares.
·
2015-11-10 22:45
count
NYOJ 30
View Code 1 /* 2 思路: 3 枚举 + 贪心 4 首先枚举只在前 i 个
Lake
钓鱼(1<=i<=n) 5 因为每段路上只走一次 那么总时间减去
·
2015-11-08 16:59
OJ
CSRF——攻击与防御
CSRF——攻击与防御 author:
lake
2 0x01 什么是CSRF攻击 CSRF是Cross Site Request Forgery的缩写(也缩写为
·
2015-11-08 16:32
CSRF
POJ2253——Floyed——Frogger
Description Freddy Frog is sitting on a stone in the middle of a
lake
.
·
2015-11-07 10:58
poj
Godaddy创始人:成就亿万富翁的10条规则
(Kohlberg Kravis Roberts)和银湖合伙人(Silver
Lake
Partners)接近达成收购,收购价达20亿美元。一旦该收购成功,GoDad
·
2015-11-07 10:21
add
Lake
Counting 算法 第四集
本题还是一个关于深度优先搜索和递归的算法题,原题如下:有一个大小为N*M的园子,雨后积起了水,八连通被认为是连接在一起的,请求出园子里总共有多少洼?(八连通指的是下图中相对W的*的部分)**** w****限制条件:N,M #include #defineMAX_N100 usingnamespacestd; charfield[MAX_N+1][MAX_N+1]; intN,M; voidIsc
monaso
·
2015-11-02 20:00
C++
c
算法
递归
PAT Saving James Bond - Easy Version
Saving James Bond - Easy Version Assume that the
lake
is a 100 by 100 square one.
·
2015-10-31 19:58
version
POJ 2253 Frogger(最短路的变形)
17842 Accepted: 5818 Description Freddy Frog is sitting on a stone in the middle of a
lake
·
2015-10-31 12:49
poj
(Relax DFS专题1.2)POJ 2386
Lake
Counting(使用DFS来计算有多少坨东西是连通的)
题目大意:有N*M的矩阵稻田,'W'表示有积水的地方, '.'表示是干旱的地方,问稻田内一共有多少块积水,根据样例很容易得出,积水是8个方向任一方向相连即可。 题目大意:有N*M的矩阵稻田,'W'表示有积水的地方, '.'表示是干旱的地方,问稻田内一共有多少块积水,根据样例很容易得出,积水是8个方向任一方向相连即可。 题目大意:有N*M的矩
·
2015-10-31 10:19
count
poj2253
Submissions: 11350 Accepted: 3805 Description Freddy Frog is sitting on a stone in the middle of a
lake
·
2015-10-31 09:58
poj
《挑战》2.1 POJ 2386
Lake
Counting (简单的dfs)
1 # include<cstdio> 2 # include<iostream> 3 4 using namespace std; 5 6 # define MAX 123 7 8 char grid[MAX][MAX]; 9 int nxt[8][2] = { {1,0},{0,-1},{-1,0},{0,1},{1,1},{1,
·
2015-10-31 09:11
count
poj2386
Lake
Counting(简单DFS)
转载请注明出处:http://blog.csdn.net/u012860063?viewmode=contents 题目链接:http://poj.org/problem?id=1562 ---------------------------------------------------------------------------------------------------
·
2015-10-31 09:50
count
用手机控制服务器
近日在
lake
2 的blog 看到以下文章: 好像标题有点吓人,其实也就是利用WAP+WebShell。
·
2015-10-29 08:17
服务器
POJ 2253 Frogger
Description : Freddy Frog is sitting on a stone in the middle of a
lake
.
·
2015-10-24 09:36
poj
POJ 2386
Lake
Counting DFS
LakeCountingTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 24735 Accepted: 12498DescriptionDuetorecentrains,waterhaspooledinvariousplacesinFarmerJohn'sfield,whichisrepresentedbyarectangleofNxM
zp___waj
·
2015-10-23 20:00
C++
poj
DFS
HDU 1245 Saving James Bond
将第一次可以到达的点加入到SPFA的队列之中,并设定相应的d[]及step[]的值,其余的d[i]和step[i]都初始化成INF,之后便求出到各个点的最短路以及最短的步数,最后再扫描一遍所有点,把可以跳出
lake
·
2015-10-21 13:12
James
pku2386
Lake
Counting 数湖(简单深搜)
同 pku1562 Oil Deposits 油田合并(简单深搜) 输入: 10 12 W........WW. .WWW.....WWW ....WW...WW. .........WW. .........W.. ..W......W.. .W.W.....WW. W.W.W.....W. .W.W......W. ..W.......W.输出:3 代码:
·
2015-10-21 10:12
count
Lake
Counting (POJ No.2386)
有一个大小为N*M的园子,雨后积起了水,八连通的积水被认为是链接在一起的求出园子里一共有多少水洼? *** *W* *** /** *进行深度优先搜索,从第一个W开始,将八个方向可以到达的 W修改为 . *每次进行深度优先搜索的时候就将链接的水坑换成了. *进行的深度优先搜索的次数就是水坑数 */ #include<stdio.h> #inclu
·
2015-10-21 10:47
count
POJ ——2386
Lake
Counting(DFS)
LakeCountingTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 24697 Accepted: 12475DescriptionDuetorecentrains,waterhaspooledinvariousplacesinFarmerJohn'sfield,whichisrepresentedbyarectangleofNxM
wuxiushu
·
2015-10-20 13:00
算法
ACM
poj
DFS
简单题
Lake
Counting(POJ-2386)
题目链接:http://poj.org/problem?id=2386题目大意:计算出相连的'W'有多少块所需算法:深度优先搜索(DFS)主要思路:从任意的W开始,不停地把邻接的8个点用'.'代替。一次DFS后与一开始的W连接的所有W就被换成了'.',计数加1,继续DFS直到图中无W。算法复杂度:O(8*N*M)=O(N*M)代码如下:1#include 2 3constintMAX_N=10
llhthinker
·
2015-09-28 19:00
基础DFS-
Lake
Counting
题目大意:找坑,八连通(八个方向都可以认为坑是连通的),求解有几个坑解题思路:基本DFS,遍历每个坑,递归把(遍历找每个连通的坑)每个联通的‘W’变成‘.’,DFS调用几次就是有几个坑#include #include usingnamespacestd; intN,M; charfield[1000][1000]; voiddfs(intx,inty) { field[x][y]='.'; fo
wxyfennie
·
2015-09-22 21:00
POJ 2385
Lake
Counting (dfs_连通性)
DescriptionDuetorecentrains,waterhaspooledinvariousplacesinFarmerJohn'sfield,whichisrepresentedbyarectangleofNxM(1 #include #include usingnamespacestd; intn,m; charmap[111][111]; voiddfs(inti,intj) {
h1021456873
·
2015-09-13 16:00
Grass Gis 峡谷堰塞湖预测模型r.
lake
剖析--湖心灌水洪泛算法
它有400多个地质分析模块,今天我们剖析一下r.
lake
算法。1.堰塞湖预测建模r.
lake
能做什么如下图1左为一张地形栅格图,也是最常见的2D平面图。
crazyquhezheng
·
2015-08-27 23:00
Gis
Gis
GRASS
r.lake
堰塞湖建模
湖区预测
POJ 2386
Lake
Counting(dfs)
Description给你一个m*n的矩阵表示一块田地,上面的’W’代表积水,’.’表示干地,问这块田地里面的积水能汇聚成几片水洼Input第一行为两个整数m,n表示水洼行列数,之后为一个m*n矩阵Output输出水洼数SampleInput1012SampleOutput3Solution简单dfs变形,遇到水洼将其变成‘.’后向周边搜索直至找不到‘W’位置,这样一来dfs的次数即为水洼数Cod
V5ZSQ
·
2015-08-27 09:00
POJ 2386
Lake
Counting
链接:http://poj.org/problem?id=2386LakeCountingTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:24263Accepted:12246DescriptionDuetorecentrains,waterhaspooledinvariousplacesinFarmerJohn'sfield,whichisr
Silenceneo
·
2015-08-23 10:00
poj
DFS
Poj 2386
Lake
Counting
clickhere~~***LakeCounting*** TimeLimit:1000MSMemoryLimit:65536K TotalSubmissions:24201Accepted:12216 Description Duetorecentrains,waterhaspooledinvariousplacesinFarmerJohn'sfield,whichisrepresent
qingshui23
·
2015-08-17 19:00
DFS
POJ 2386
Lake
Counting
题目链接:http://poj.org/problem?id=2386解题思路:搜索大水题。。。AC代码:#include #include usingnamespacestd; intn,m; chara[110][110]; voiddfs(intx,inty){ if(x=n||y=m||a[x][y]=='.') return; a[x][y]='.'; dfs(x-1,y); dfs
piaocoder
·
2015-08-11 17:00
搜索
poj 2386
Lake
Counting(深搜)
题目地址题目大意:有一个大小为N*M的园子,雨后积了很多水。八连通的积水被认为是在一起的。请求出园子里共有多少个水洼?(八连通是指相邻的八个方向)解题思路:找到一个‘W’对其周围也是‘W’的进行深搜,深搜的次数即为八连通的块数#include#include#include#include#include#include#include#include#include#include#includ
booyoungxu
·
2015-07-26 10:52
ACM
Google Interview - Flowing Water
Given a N*N matrix contains lakes, each
lake
is represented by an elevation.
yuanhsh
·
2015-06-15 09:00
interview
Google Interview - Flowing Water
Given a N*N matrix contains lakes, each
lake
is represented by an elevation.
yuanhsh
·
2015-06-15 09:00
interview
Lake
greeted tepidlyCalenda
CloquetreferendumfocusesonbuildingneedsHomenewsFriday'sweatherforDuluthandtheNorthland:Flurriestoday,moreWomensVonMillerJerseysnowtonightHeadlinesDuluthCityCounciltotakeupstadium,trailandgolfcourseimp
lluggg854
·
2015-06-03 13:00
Little
Lake
is an experim
AnnArbor'sLittleLakeFreeSchoolwilloffernovelapproachtoeducationthisfallWhenMelissaPalmawasseekingschoolsforhertwochildren,shefoundplentyofoptionsinAnnArbor.Butnoneofthoseschools,PalmaandhusbandRodolfo
lluggg848
·
2015-05-27 11:00
the paved path with the
lake
ArticlesaboutWhittierNarrowsRecreationAreaAlakesidehikeatWhittierNarrowsRecreationAreaFebruary21,2014ByCharlesFlemingThisisaverypleasanturbanoasisintheBlackStrassAnna120mmmidstofwhatis,formanyAngeleno
lluggg824
·
2015-04-29 13:00
Lake
Counting -- DFS(深搜)
TimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:22424Accepted:11300DescriptionDuetorecentrains,waterhaspooledinvariousplacesinFarmerJohn'sfield,whichisrepresentedbyarectangleofNxM(1 #include #defin
u012965373
·
2015-04-19 11:00
Lake
Counting-DFS
LakeCountingTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 22269 Accepted: 11226DescriptionDuetorecentrains,waterhaspooledinva
bao_libra
·
2015-04-06 17:00
poj 2386
Lake
counting
只需要用到DFS就行了,算搜索中比较直接的,前面也写过一体类似的,DFS和BFS只是一种策略,只是搜索。 #include usingnamespacestd; intN,M; charmaze[101][101]; voiddfs(intx,inty) { //将现在所在的位置替换为‘.’ maze[x][y]='.'; //循环遍历可以移动的八个方向 intdx,dy; for(dx=-1;
hujian_
·
2015-03-30 21:00
Algorithm
ACM
poj
DFS
上一页
9
10
11
12
13
14
15
16
下一页
按字母分类:
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
其他