摘要: DescriptionA magic island Geraldion, where Gerald lives, has its own currency system. It uses banknotes of several values. But the problem is, the sys... 阅读全文
posted @ 2015-07-26 19:56 简约。 阅读(98) 评论(0) 推荐(0) 编辑
摘要: DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital l... 阅读全文
posted @ 2015-07-24 21:29 简约。 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Description某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数、... 阅读全文
posted @ 2015-07-23 22:07 简约。 阅读(146) 评论(0) 推荐(0) 编辑
摘要: DescriptionA friend of you is doing research on theTraveling Knight Problem (TKP)where you are to find the shortest closed tour of knight moves that v... 阅读全文
posted @ 2015-07-23 20:49 简约。 阅读(118) 评论(0) 推荐(0) 编辑
摘要: DescriptionTwo bored soldiers are playing card war. Their card deck consists of exactlyncards, numbered from1ton,all values are different. They divide... 阅读全文
posted @ 2015-07-22 14:37 简约。 阅读(113) 评论(0) 推荐(0) 编辑
摘要: DescriptionYou are given a string consisting of parentheses()and[]. A string of this type is said to becorrect:(a)if it is the empty string(b)if A and... 阅读全文
posted @ 2015-07-21 19:28 简约。 阅读(168) 评论(0) 推荐(0) 编辑
摘要: DescriptionColonel hasnbadges. He wants to give one badge to every of hisnsoldiers. Each badge has acoolness factor, which shows how much it's owner r... 阅读全文
posted @ 2015-07-19 21:20 简约。 阅读(126) 评论(0) 推荐(0) 编辑
摘要: DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calcul... 阅读全文
posted @ 2015-07-18 17:15 简约。 阅读(224) 评论(0) 推荐(0) 编辑
摘要: DescriptionThere is a permutation without two numbers in it, and now you know what numbers the permutation has. Please find the two numbers it lose.In... 阅读全文
posted @ 2015-07-18 15:19 简约。 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Description有三户人家共拥有一座花园,每户人家的太太均需帮忙整理花园。A 太太工作了5 天,B 太太则工作了4 天,才将花园整理完毕。C 太太因为正身怀六甲无法加入她们的行列,便出了90元。请问这笔钱如何分给A、B 二位太太较为恰当?A 应得多少元?90/(5+4)*5=$50 元?如果这... 阅读全文
posted @ 2015-07-17 19:15 简约。 阅读(169) 评论(0) 推荐(0) 编辑