文件名称:lift
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
呵呵,有一天我做了一个梦,梦见了一种很奇怪的电梯。大楼的每一层楼都可以停电梯,而且第i层楼(1<=i<=N)上有一个数字Ki(0<=Ki<=N)。电梯只有四个按钮:开,关,上,下。上下的层数等于当前楼层上的那个数字。当然,如果不能满足要求,相应的按钮就会失灵。例如:3 3 1 2 5代表了Ki(K1=3,K2=3,……),从一楼开始。在一楼,按“上”可以到4楼,按“下”是不起作用的,因为没有-2楼。那么,从A楼到B楼至少要按几次按钮呢?-Oh, one day I had a dream, a very strange elevator. Each floor of the building the elevator can be stopped, and the i-floor (1 < = i < = N) has a number Ki (0 < = Ki < = N). Lift only four buttons: on, off, up and down. Equal to the current upper and lower layers that the figure on the floor. Of course, if you can not meet the requirements, the corresponding button will not work. For example: 33125 represents the Ki (K1 = 3, K2 = 3, ... ...), starting from the first floor. The first floor, press the " on" can go to the 4th floor, press the " down" does not work, because there is no-2 floor. So, from A to B floor building at least according to several button?
(系统自动生成,下载前可以参看下载内容)
下载文件列表
lift.doc