随笔分类 -  BFS题目集(注意点)

摘要:题目传送门 G逃脱 题目描述 这是mengxiang000和Tabris来到幼儿园的第四天,幼儿园老师在值班的时候突然发现幼儿园某处发生火灾,而且火势蔓延极快,老师在第一时间就发出了警报,位于幼儿园某处的mengxiang000和Tabris听到了火灾警报声的同时拔腿就跑,不知道两人是否能够逃脱险境 阅读全文
posted @ 2018-08-31 23:30 better46 阅读(515) 评论(1) 推荐(1)
摘要:题目传送门 J - Fire! Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escap 阅读全文
posted @ 2018-08-20 23:16 better46 阅读(209) 评论(0) 推荐(0)
摘要:题目传送门 HDU - 2612 Find a way Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many p 阅读全文
posted @ 2018-08-20 16:16 better46 阅读(160) 评论(0) 推荐(0)
摘要:题目传送门 Prime Path The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change th 阅读全文
posted @ 2018-08-20 13:18 better46 阅读(245) 评论(0) 推荐(0)
摘要:1棋盘问题 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔 阅读全文
posted @ 2018-08-14 23:08 better46 阅读(413) 评论(0) 推荐(0)
摘要:链接:https://www.nowcoder.com/acm/contest/157/E来源:牛客网 有一只可爱的老青蛙,在路的另一端发现了一个黑的东西,想过去一探究竟。于是便开始踏上了旅途 一直这个小路上有很多的隧道,从隧道的a进入,会从b出来,但是隧道不可以反向走。 这只青蛙因为太老了,所以很 阅读全文
posted @ 2018-08-11 10:54 better46 阅读(328) 评论(0) 推荐(0)
摘要:状压BFS 注意在用二维字符数组时,要把空格、换行处理好。 #include<stdio.h> #include<algorithm> #include<string.h> #include<queue> using namespace std; #define INF 0x3f3f3f3f int 阅读全文
posted @ 2018-05-07 12:36 better46 阅读(136) 评论(0) 推荐(0)