BFS
junior19
abcde
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ2251:Dungeon Master(三维迷宫)
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south原创 2017-01-09 22:16:08 · 290 阅读 · 0 评论 -
CodeChef:Skiing(优先队列 & BFS)
Chef and Hasan went for skiing in a rectangular field, the field can be represented as a grid of N rows and M columns, rows are numbered from 1 to N starting from top, columns are numbered from 1 to原创 2017-11-25 12:17:12 · 396 阅读 · 0 评论 -
CFgym:Painting the Wall(BFS)
"B" Painting the Wall Time limit 2 seconds Memory limit 256 megabytes Little girl Masha is looking at the wall in her room. The wall is tiled with square tiles, bu原创 2017-07-16 21:27:00 · 333 阅读 · 0 评论 -
CF793B:B Igor and his way to work(DFS & BFS)
B. Igor and his way to work time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Woken up by the alarm clock Igo原创 2017-05-29 14:18:54 · 449 阅读 · 0 评论 -
CF788C:The Great Mixing(背包bitset & bfs)
C. The Great Mixing time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Sasha and Kolya decided to get drunk wit原创 2017-04-26 14:42:30 · 683 阅读 · 0 评论 -
CFgym:Treasure Island(搜索 & 思维)
A. Treasure Island time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Pirate John Silver has found a map depic原创 2017-05-12 15:50:42 · 664 阅读 · 0 评论 -
POJ1465:Multiple(BFS)
reference:http://blog.youkuaiyun.com/u013480600/article/details/26458435 Multiple Time Limit: 1000MS Memory Limit: 32768K Total Submissions: 7682 Accepted: 1717 Descripti原创 2017-03-24 17:59:52 · 334 阅读 · 0 评论 -
UVA11624:Fire!(BFS + 优化)
题意:J为人的位置,F(可能有多个)为火源,每1s火源都在往四周扩散,人每秒走一步,求最少走几步到地图边缘,若不能输出IMPOSSIBLE。 思路:先BFS求出火到达每个点的时间,再BFS求出人逃离的时间。 # include # include # include using namespace std; int n, m; char map[1001][1001]; int fire原创 2017-02-03 16:56:01 · 262 阅读 · 0 评论 -
POJ3278:Catch That Cow(BFS)
Catch That Cow Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 82031 Accepted: 25785 Description Farmer John has been informed of the location of a fugit原创 2017-01-16 16:27:17 · 237 阅读 · 0 评论 -
POJ1426: Find The Multiple(bfs,同余定理)
Find The Multiple Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 28780 Accepted: 11935 Special Judge Description Given a positive integer n, write a原创 2017-01-10 17:40:51 · 305 阅读 · 0 评论 -
BZOJ4242:水壶(BFS & 最小生成树)
4242: 水壶 Time Limit: 40 Sec Memory Limit: 512 MB Submit: 946 Solved: 241 [Submit][Status][Discuss] Description JOI君所居住的IOI市以一年四季都十分炎热著称。 IOI市是一个被分成纵H*横W块区域的长方形,每个区域都是建筑物、原野、墙壁之一。建筑物的区域有P个,编号原创 2018-01-22 18:06:47 · 405 阅读 · 0 评论
分享