dfs
£xilm€
这个作者很懒,什么都没留下…
展开
-
ROADS
N cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it : the road length and the toll that needs to be paid for the road (expressed in the number of coins).Bob and Alice used to live in the ci原创 2021-07-28 19:10:22 · 53 阅读 · 0 评论 -
2021-07-27
Recently, Peter saw the equationx0+2x1+4x2+...+2mxm=nx0+2x1+4x2+...+2mxm=n. He wants to find a solution(x0,x1,x2,...,xm)(x0,x1,x2,...,xm)in such a manner that∑i=0mxi∑i=0mxiis minimum and everyxixi(0≤i≤m0≤i≤m) is non-negative.InputThere are multi...原创 2021-07-27 09:51:23 · 103 阅读 · 0 评论 -
2021-05-14
这是一个简单的生存游戏,你控制一个机器人从一个棋盘的起始点(1,1)走到棋盘的终点(n,m)。游戏的规则描述如下:1.机器人一开始在棋盘的起始点并有起始点所标有的能量。2.机器人只能向右或者向下走,并且每走一步消耗一单位能量。3.机器人不能在原地停留。4.当机器人选择了一条可行路径后,当他走到这条路径的终点时,他将只有终点所标记的能量。如上图,机器人一开始在(1,1)点,并拥有4单位能量,蓝色方块表示他所能到达的点,如果他在这次路径选择中选择的终点是(2,4)点,当他到达(2,4)点时将拥有1原创 2021-05-14 15:21:52 · 283 阅读 · 0 评论