第一次广搜!HDU1548--A Strange Lift】的更多相关文章

一上来看见题目就用了深搜(因为只会深搜)果断内存超限(据说时间也会超限)无奈只好开始用广搜 其实广搜的思路和深搜有很多类似的地方 不过实现的过程中用到了队列 因此有点难以理解(好吧我个人认为) 这题是最基本的广搜了 只是一个二叉树 所以先画个二叉树出来看一下广搜的顺序…
A strange lift DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and down.When you at floor i,if you press the button "U…
A strange lift Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 64   Accepted Submission(s) : 29 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description There is a strange lif…
Problem Description There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and down.When you at floor i,if you press the button "UP"…
A strange lift Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 69   Accepted Submission(s) : 34 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description There is a strange lif…
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #define M 205 #define INF 0x3f3f3f3f using namespace std; int map[M][M]; int d[M], vis[M]; int n; int b, e; void Dijkstra(){ memset(d, 0x3f, sizeof(d)); mems…
题目链接 Problem Description There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and down.When you at floor i,if you press the button "UP…
http://acm.hdu.edu.cn/showproblem.php?pid=1548 A strange lift Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 11341    Accepted Submission(s): 4289 Problem Description There is a strange lift.T…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1548 There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and down.When you at floor i,if yo…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1548 A strange lift Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 21754    Accepted Submission(s): 7969 Problem Description There is a strange li…