随笔分类 -  poj

[poj1191][noi99]棋盘分割
摘要:棋盘分割Description 将一个8*8的棋盘进行如下分割:将原棋盘割下一块矩形棋盘并使剩下部分也是矩形,再将剩下的部分继续如此分割,这样割了(n-1)次后,连同最后剩下的矩形棋盘共有n块矩形棋盘。(每次切割都只能沿着棋盘格子的边进行) 原棋盘上每一格有一个分值,一块矩形棋盘的总分为其所含各格分值之和。现在需要把棋盘按上述规则分割成n块矩形棋盘,并使各矩形棋盘总分的均方差最小。均方差,其中平均值,xi为第i块矩形棋盘的总分。请编程对给出的棋盘及n,求出O'的最小值。 Input 第1行为一个整数n(1 < n < 15)。第2行至第9行每行为8个小于100的非负整数,表 阅读全文
posted @ 2011-07-09 08:36 I WILL BE BETTER. 阅读(349) 评论(0) 推荐(0)
【poj3259】Wormholes
摘要:DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that is BEFORE you entered the wormhole! Each of FJ's farms comprises N (1 ≤ N ≤ 500) field 阅读全文
posted @ 2011-02-26 15:54 I WILL BE BETTER. 阅读(192) 评论(0) 推荐(0)
【poj1860】Currency ExchangeDescription
摘要:DescriptionSeveral currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There can be several points specializing in the same pair of currencies. Each point has its own ex 阅读全文
posted @ 2011-02-25 17:48 I WILL BE BETTER. 阅读(243) 评论(0) 推荐(0)
[ST][poj3264]Balanced Lineup
摘要:DescriptionFor the daily milking, Farmer John'sNcows (1 ≤N≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows. To... 阅读全文
posted @ 2010-11-07 18:08 I WILL BE BETTER. 阅读(238) 评论(0) 推荐(0)
【poj1008】Maya Calendar
摘要:DescriptionDuring his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, professor discovered that the Maya civilization used a 3... 阅读全文
posted @ 2010-10-31 15:41 I WILL BE BETTER. 阅读(640) 评论(0) 推荐(0)
【poj1007】DNA Sorting
摘要:DescriptionOne measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence ``DAABEC'', this measu... 阅读全文
posted @ 2010-10-29 17:50 I WILL BE BETTER. 阅读(783) 评论(1) 推荐(0)
【poj1006】Biorhythms
摘要:DescriptionSome people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they ha... 阅读全文
posted @ 2010-10-29 17:48 I WILL BE BETTER. 阅读(836) 评论(0) 推荐(0)
【poj1005】I Think I Need a Houseboat
摘要:DescriptionFred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking by... 阅读全文
posted @ 2010-10-29 17:47 I WILL BE BETTER. 阅读(342) 评论(0) 推荐(0)
【poj1004】Financial Management
摘要:DescriptionLarry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfolio ... 阅读全文
posted @ 2010-10-29 17:46 I WILL BE BETTER. 阅读(302) 评论(0) 推荐(0)
【poj1003】Hangover
摘要:DescriptionHow far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicular t... 阅读全文
posted @ 2010-10-29 17:44 I WILL BE BETTER. 阅读(203) 评论(0) 推荐(0)
POJ题目
摘要:我刚刚有将poj从开头做的想法,于是,开始了。poj1000 A+B Problem 不用说了poj1001Exponentiation 求高精度幂 将数字不断乘以10直到为整数为止,快速幂算法,最后加小数点,注意处理底数或指 数是零的情况。poj1002487-3279 将无关字符删去,使用字母树存储,都是7层,输出的时候从0开始递归输出即可。poj1003Hangover 数学题 迭代相加。p... 阅读全文
posted @ 2010-10-29 17:42 I WILL BE BETTER. 阅读(179) 评论(0) 推荐(0)
【poj1002】487-3279
摘要:Description企业喜欢用容易被记住的电话号码。让电话号码容易被记住的一个办法是将它写成一个容易记住的单词或者短语。例如,你需要给滑铁卢大学打电话时,可以拨打TUT-GLOP。有时,只将电话号码中部分数字拼写成单词。当你晚上回到酒店,可以通过拨打310-GINO来向Gino's订一份pizza。让电话号码容易被记住的另一个办法是以一种好记的方式对号码的数字进行分组。通过拨打必胜客的&ldqu... 阅读全文
posted @ 2010-10-22 17:38 I WILL BE BETTER. 阅读(284) 评论(0) 推荐(0)
【poj1001】求高精度幂
摘要:Description对数值很大、精度很高的数进行高精度计算是一类十分常见的问题。比如,对国债进行计算就是属于这类问题。现在要你解决的问题是:对一个实数R( 0.0 < R < 99.999 ),要求写程序精确计算 R 的 n 次方(Rn),其中n 是整数并且 0 < n <= 25。InputT输入包括多组 R 和 n。 R 的值占第 1 到第 6 列,n 的值占第 8 ... 阅读全文
posted @ 2010-10-22 17:36 I WILL BE BETTER. 阅读(313) 评论(0) 推荐(0)