![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
BFS
狠人王
怀着一颗热情的心,追随自己的梦想!
展开
-
codeForces 242C.King's Path(BFS)
C. King’s Pathtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe black king is standing on a chess field consisting of 109 rows and 109 ...原创 2019-08-03 08:24:32 · 138 阅读 · 0 评论 -
DFS&BFS模板
DFSint n,m,x,y,sum;char a[25][25];int dir[4][2]={{1,0},{-1,0},{0,1},{0,-1}},vis[25][25];void dfs(int x,int y){ int xx,yy; sum++; vis[x][y]=1; if(a[x][y]=='x') return; ...原创 2019-08-16 09:42:23 · 168 阅读 · 0 评论 -
【POJ】-3278- Catch That Cow (BFS)
Problem DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a po...原创 2019-08-16 11:02:32 · 80 阅读 · 0 评论