永夜初晗凝碧天

本博客现已全部转移到新地址,欲获取更多精彩文章,请访问http://acshiryu.github.io/

导航

2011年7月15日 #

USACO 2.2.4 Party Lamps 解题报告

摘要: Party Lamps IOI 98To brighten up the gala dinner of the IOI'98 we have a set of N (10 <= N <= 100) colored lamps numbered from 1 to N.The lamps are connected to four buttons:Button 1: When this button is pressed, all the lamps change their state: those that are ON are turned OFF and those 阅读全文

posted @ 2011-07-15 21:01 ACShiryu 阅读(485) 评论(0) 推荐(0) 编辑

USACO 2.2.3 Runaround Numbers解题报告

摘要: Runaround NumbersRunaround numbers are integers with unique digits, none of which is zero (e.g., 81362) that also have an interesting property, exemplified by this demonstration:If you start at the left digit (8 in our number) and count that number of digits to the right (wrapping back to the first 阅读全文

posted @ 2011-07-15 20:47 ACShiryu 阅读(452) 评论(0) 推荐(0) 编辑

USACO 2.2.2 Subset Sums解题报告

摘要: 分类:DP,递推,记忆化搜索作者:ACShiryu时间:2011-7-15Subset Sums JRMFor many sets of consecutive integers from 1 through N (1 <= N <= 39), one can partition the set into two sets whose sums are identical.For example, if N=3, one can partition the set {1, 2, 3} in one way so that the sums of both subsets are i 阅读全文

posted @ 2011-07-15 20:29 ACShiryu 阅读(1315) 评论(0) 推荐(0) 编辑