永夜初晗凝碧天

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

导航

2011年7月17日 #

HDOJ 1754 I Hate It 解题报告

摘要: I Hate ItTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8782Accepted Submission(s): 3239Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。在每个测 阅读全文

posted @ 2011-07-17 20:56 ACShiryu 阅读(383) 评论(0) 推荐(0) 编辑

USACO 2.3.3 Zero Sum 解题报告

摘要: Zero SumConsider the sequence of digits from 1 through N (where N=9) in increasing order: 1 2 3 ... N.Now insert either a `+' for addition or a `-' for subtraction or a ` ' [blank] to run the digits together between each pair of digits (not in front of the first digit). Calculate the res 阅读全文

posted @ 2011-07-17 11:37 ACShiryu 阅读(446) 评论(0) 推荐(0) 编辑

USACO 2.3.2 Cow Pedigrees 解题报告

摘要: 分类:DP作者:ACShiryu时间:2011-7-17Cow PedigreesSilviu Ganceanu -- 2003Farmer John is considering purchasing a new herd of cows. In this new herd, each mother cow gives birth to two children. The relationships among the cows can easily be represented by one or more binary trees with a total of N (3 <= N 阅读全文

posted @ 2011-07-17 11:24 ACShiryu 阅读(513) 评论(0) 推荐(0) 编辑

2011年7月16日 #

USACO 2.3.1 Longest Prefix 解题报告

摘要: 今天完全不行啊,USACO只做了一题,今天也只刷了两题,USACO还卡题了Longest PrefixIOI'96The structure of some biological objects is represented by the sequence of their constituents denoted by uppercase letters. Biologists are interested in decomposing a long sequence into shorter ones calledprimitives.We say that a sequence 阅读全文

posted @ 2011-07-16 21:33 ACShiryu 阅读(635) 评论(0) 推荐(0) 编辑

标准模板库(STL)学习指南之List链表

摘要: 本文转载自天极网,原文地址:http://www.yesky.com/255/1910755.shtml.转载请注明什么是STL呢?STL就是Standard Template Library,标准模板库。这可能是一个历史上最令人兴奋的工具的最无聊的术语。从根本上说,STL是一些“容器”的集合,这些“容器”有list,vector,set,map等,STL也是算法和其他一些组件的集合。这里的“容器”和算法的集合指的是世界上很多聪明人很多年的杰作。 STL的目的是标准化组件,这样就不用重新开发,可以使用现成的组件。STL现在是C++的一部分,因此不用额外安装什麽。它被内建在你的编译器之内。因为S 阅读全文

posted @ 2011-07-16 16:25 ACShiryu 阅读(743) 评论(0) 推荐(0) 编辑

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) 编辑