![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
LLL_yx
这个作者很懒,什么都没留下…
展开
-
POJ - 1426 Find The Multiple(bfs)
Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 200 and there原创 2017-08-08 22:24:27 · 174 阅读 · 0 评论 -
POJ - 3984 迷宫问题(bfs+打印路径)
定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。 Inp原创 2017-08-09 12:59:09 · 311 阅读 · 0 评论 -
HDU - 2612Find a way(bfs)
Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki. Yifenfei’s home is at the原创 2017-08-10 19:29:58 · 226 阅读 · 0 评论 -
codeforces#428(div2)C Journey(树上的dfs水题)
There are n cities and n - 1 roads in the Seven Kingdoms, each road connects two cities and we can reach any city from any other by the roads. Theon and Yara Greyjoy are on a horse in the first cit原创 2017-08-13 13:19:25 · 359 阅读 · 0 评论 -
HDU - 5925 Coconuts (离散化+dfs)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5925 题意:给你一个R*C的格子图,并给你n个坏点,问这些坏点把这个图分成了多少块,并求出每个块的大小。 思路:如果不看数据范围,这个题就是一个显然的dfs找联通块,但r和c都是1e9,n只有200,所以可以离散化一下。离散化之后就算最坏情况,即200个全都隔着一个放,也只有400*400。所以就...原创 2018-08-23 12:35:23 · 238 阅读 · 0 评论