随笔分类 -  搜索

摘要:Description:You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend o... 阅读全文
posted @ 2015-11-19 14:55 搁浅の记忆 阅读(293) 评论(0) 推荐(0)
摘要:Problem Description:Following is the recursive definition of Fibonacci sequence:Fi=⎧⎩⎨01Fi−1+Fi−2i = 0i = 1i > 1Now we need to check whether a number ... 阅读全文
posted @ 2015-11-19 13:27 搁浅の记忆 阅读(230) 评论(0) 推荐(0)
摘要:Problem Description:As we all know, Harry Porter learns magic at Hogwarts School. However, learning magical knowledge alone is insufficient to become ... 阅读全文
posted @ 2015-11-03 11:36 搁浅の记忆 阅读(188) 评论(0) 推荐(0)
摘要:Description:Fat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this ... 阅读全文
posted @ 2015-09-27 11:44 搁浅の记忆 阅读(267) 评论(0) 推荐(0)
摘要:Joe works in a maze. Unfortunately, portions of the maze havecaught on fire, and the owner of the maze neglected to create a fireescape plan. Help Joe... 阅读全文
posted @ 2015-09-26 10:54 搁浅の记忆 阅读(141) 评论(0) 推荐(0)
摘要:Description:在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input:输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一... 阅读全文
posted @ 2015-09-25 23:24 搁浅の记忆 阅读(206) 评论(0) 推荐(0)
摘要:Description:You are given two pots, having the volume ofAandBliters respectively. The following operations can be performed:FILL(i) fill the poti(1 ≤i... 阅读全文
posted @ 2015-09-24 10:25 搁浅の记忆 阅读(228) 评论(0) 推荐(0)
摘要:Description:大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S... 阅读全文
posted @ 2015-09-22 11:49 搁浅の记忆 阅读(230) 评论(0) 推荐(0)
摘要:Description:Given a tree (a connected graph with no cycles), you have to find the farthest nodes in the tree. The edges of the tree are weighted and u... 阅读全文
posted @ 2015-08-18 14:46 搁浅の记忆 阅读(140) 评论(0) 推荐(0)
摘要:Description:Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t... 阅读全文
posted @ 2015-08-18 09:44 搁浅の记忆 阅读(224) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2015-07-23 18:25 搁浅の记忆 阅读(161) 评论(0) 推荐(0)