hdu
少年白马
向阳奔跑,逆风成长
展开
-
2020年暑假ACM集训图论练习3【题解】
2020年暑假ACM集训图论练习3A :hdu1548 【A strange lift】 (Bfs&&Dijkstra)B hdu2544 【最短路】dijkstra模板题hdu2066 一个人的旅行 dijkstra模板题DEFGHIJKLMNOPQRSTA :hdu1548 【A strange lift】 (Bfs&&Dijkstra)题目大意 :这是一个发生在电梯里面的故事,给出起点和终点,求最少需要操作几次能够到达目的地,给出每层楼对应的数字,该数原创 2020-09-05 11:21:44 · 380 阅读 · 2 评论 -
如何开始刷题?(持续更新中)
搜索题(BFS&&DFS)搜索专题(进阶)图论练习1图论练习2——并查集与最小生成树练习题图论练习3——最短路密码:HNUCM_ACM原创 2020-08-22 17:37:43 · 283 阅读 · 4 评论 -
杭电1010 Tempter of the Bone (DFS+奇偶剪枝)
Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bone was a trap, and he tried desperately原创 2020-08-15 03:12:58 · 134 阅读 · 0 评论 -
杭电 1272 (并查集)
Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给你,让你帮忙判断她的设计图是否符合她的设计思路。比如下面的例子,前两个是符合条件的,但是最后原创 2020-08-10 20:05:50 · 166 阅读 · 0 评论 -
杭电 1242 Rescue (BFS+优先队列)
Problem DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison.Angel’s friends want to save Angel. Their task is: approach原创 2020-08-05 23:15:43 · 166 阅读 · 0 评论 -
杭电 2612 Find a way (双向BFS)
Problem DescriptionPass 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 countryside, but Merceki’s home is in t原创 2020-08-04 18:04:04 · 181 阅读 · 0 评论 -
杭电 1372 Knight Moves(最经典的BFS之模板题)
Problem DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard exactly once. He thinks that the原创 2020-08-04 11:08:41 · 360 阅读 · 0 评论 -
杭电 1241 Oil Deposits (DFS求连通图)
Problem DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides the land into numerous square plots. I原创 2020-08-02 10:35:54 · 132 阅读 · 0 评论 -
杭电 1312 Red and Black(BFS/DFS)
Problem DescriptionThere 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’t move on red tiles, he can move onl原创 2020-08-01 16:39:30 · 158 阅读 · 0 评论 -
杭电 1257 最少拦截系统(最长递增子序列模板题)
Problem Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了...原创 2020-05-02 16:24:32 · 194 阅读 · 0 评论 -
杭电 2602 Bone Collector——(裸)01背包、滚动数组
Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grave …...原创 2020-04-30 10:54:25 · 227 阅读 · 0 评论