摘要: 湘大OJ第1490题,Generating Random Numbers(题目链接)。Generating Random NumbersDescriptionAnyone who considers arithmetical methods of producing random digits is,of course, in a state of sin.- John von NeumannAs a talented mathematician, von Neumann invented a method to generate random numbers sequentially. .. 阅读全文
posted @ 2012-08-05 21:34 叶剑飞Victor 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 湘大OJ第1486题,Civil War(题目链接)。Civil WarDescription战争即和平,自由即奴役,无知即力量。——乔治.奥威尔 历史书上说,自从统治者Big Brother去世以后,大洋国就陷入了无休止的内战中,随时都可能有新的武装势力出现,随时都可能有战争发生。奇怪的是,每次战争都是在当前国内战斗力最强大的两股势力间进行,我们可以把每股武装势力的战斗力量化成一个值,每次战争都是在当前战斗力值最高的两股势力间进行。如果有多支势力战斗力值相同,则名字字典序大的在前(见下面第二组样例)。一场战争结束后,战斗力稍弱的那方被消灭,另一方也元气大伤,战斗力减弱为两支武装的战斗力... 阅读全文
posted @ 2012-08-05 21:20 叶剑飞Victor 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 湘大1492题,I, Robot(题目链接)。I, RobotDescriptionA robot must obey any orders given to it by human beings,except where such orders would conflict with the First Law.- Isaac AsimovThere is a robot trapped in the maze. Now you have to send out some instructions, telling it how to reach its destination.The .. 阅读全文
posted @ 2012-08-05 21:14 叶剑飞Victor 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 2011大纽约程序设计竞赛,D题 Decoding EDSAC Data(题目链接)。D ⋅ Decoding EDSAC DataThe world's first full-scale, stored-program, electronic, digital computer was the EDSAC (Electronic Delay Storage Automatic Calculator). The EDSAC had an accumulator-based instruction set, operating on 17-bit words(and 35-bit dou 阅读全文
posted @ 2012-08-05 20:55 叶剑飞Victor 阅读(244) 评论(0) 推荐(0) 编辑