bfs||bfs
文章平均质量分 72
abns
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
1076 2条不相交的路径
1076 2条不相交的路径 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注给出一个无向图G的顶点V和边E。进行Q次查询,查询从G的某个顶点V[s]到另一个顶点V[t],是否存在2条不相交的路径。(两条路径不经过相同的边)(注,无向图中不存在重边,也就是说确定起点和终点,他们之间最多只有1条路)Input第1行:2个数M ...原创 2018-08-18 10:39:59 · 258 阅读 · 0 评论 -
51nod 1109 01组成的N的倍数
1109 01组成的N的倍数基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题给定一个自然数N,找出一个M,使得M > 0且M是N的倍数,并且M的10进制表示只包含0或1。求最小的M。例如:N = 4,M = 100。Input输入1个数N。(1 <= N <= 10^6)Output输出符合条件的最小的M。In...原创 2018-08-16 18:02:41 · 189 阅读 · 0 评论 -
51nod 1625 夹克爷发红包
1625 夹克爷发红包 基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 收藏 关注在公司年会上,做为互联网巨头51nod掌门人的夹克老爷当然不会放过任何发红包的机会。 现场有n排m列观众,夹克老爷会为每一名观众送出普通现金红包,每个红包内金额随机。 接下来,夹克老爷又送出最多k组高级红包,每组高级红包会同时给一排或一列的人派发 ,...原创 2018-08-11 16:31:50 · 129 阅读 · 0 评论 -
Cow Picnic
The cows are having a picnic! Each of Farmer John's K (1 ≤ K ≤ 100) cows is grazing in one of N (1 ≤ N ≤ 1,000) pastures, conveniently numbered 1...N. The pastures are connected by M (1 ≤ M ≤ 10,000) ...原创 2018-08-01 13:20:41 · 283 阅读 · 0 评论 -
poj1979Red and Black
There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can'...原创 2018-08-01 11:34:26 · 125 阅读 · 0 评论 -
HDU 1016 Prime Ring Problem
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.Note: the number of f...原创 2018-08-24 10:06:44 · 150 阅读 · 0 评论 -
Hdu 1026 Ignatius and the Princess I(bfs记录路径优先队列)
Ignatius and the Princess ITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22105 Accepted Submission(s): 7127Special Judge Problem Desc...原创 2018-08-24 11:22:25 · 130 阅读 · 0 评论 -
B. Labyrinth(BFS 记忆化搜索)
time limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou are playing some computer game. One of its levels puts you in a maze consistin...原创 2018-12-17 13:48:18 · 360 阅读 · 0 评论
分享