2013年4月24日

UVa 10534 - Wavio Sequence LIS

摘要: Problem DWavio SequenceInput:Standard InputOutput:Standard OutputTime Limit:2 SecondsWavio is a sequence of integers. It has some interesting properties.·Wavio is of odd length i.e.L = 2*n + 1.·The first(n+1)integers of Wavio sequence makes a strictly increasing sequence.·The last(n+1 阅读全文

posted @ 2013-04-24 21:15 电子幼体 阅读(115) 评论(0) 推荐(0) 编辑

UVa 4256 - Salesmen dp

摘要: Traveling salesmen ofnhn. (the prestigious Korean internet company) report their current location to the company on a regular basis. They also have to report their new location to the company if they are moving to another location. The company keep each salesman's working path on a map of his wo 阅读全文

posted @ 2013-04-24 20:22 电子幼体 阅读(148) 评论(0) 推荐(0) 编辑

UVa 11584 - Partitioning by Palindromes 回文串dp

摘要: Problem H: Partitioning by PalindromesWe say a sequence of characters is apalindromeif it is the same written forwards and backwards. For example, 'racecar' is a palindrome, but 'fastcar' is not.Apartitionof a sequence of characters is a list of one or more disjoint non-empty groups 阅读全文

posted @ 2013-04-24 17:14 电子幼体 阅读(125) 评论(0) 推荐(0) 编辑

10635 - Prince and Princess LCS&LIS

摘要: Problem DPrince and PrincessInput:Standard InputOutput:Standard OutputTime Limit:3 SecondsIn ann x nchessboard, Prince and Princess plays a game. The squares in the chessboard are numbered1, 2, 3 ... n*n,as shown below:Prince stands in square1, makepjumps and finally reach squaren*n. He enters a squ 阅读全文

posted @ 2013-04-24 15:57 电子幼体 阅读(184) 评论(0) 推荐(0) 编辑

UVa 3882 - And Then There Was One 递推------------无力orz

摘要: Let's play a stone removing game.Initially,nstones are arranged on a circle and numbered1,...,nclockwise (Figure 1). You are also given two numberskandm. From this state, remove stones one by one following the rules explained below, until only one remains. In step 1, remove stonem. In step 2, lo 阅读全文

posted @ 2013-04-24 15:10 电子幼体 阅读(153) 评论(0) 推荐(0) 编辑

导航