2011年4月10日

摘要: Shortest SubsequenceTime Limit: 1000msMemory Limit: 65536kbDescriptionLogicalmars has a friend who is very superstitious. He thinks randomly written sequence is not that "random", which he explains that you write them according to your sub-consciousness. He kept writing random numbers day 阅读全文
posted @ 2011-04-10 21:28 咕咕咪 阅读(128) 评论(0) 推荐(0)
 
摘要: Problem C: reverse order 1Time Limit: 1 Sec Memory Limit: 128 MBSubmissions: 545 Solved: 95DescriptionHere is a sequence a1..n, which is a disordered sequence from 1 to N. If i < j and ai > aj, then <i, j> is called a pair of inversion. And b1..n-1 is defined as follows, bk is the number 阅读全文
posted @ 2011-04-10 10:36 咕咕咪 阅读(103) 评论(0) 推荐(0)

2011年4月9日

摘要: 汉诺塔VTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 728Accepted Submission(s): 441Problem Description用1,2,...,n表示n个盘子,称为1号盘,2号盘,...。号数大盘子就大。经典的汉诺塔问题经常作为一个递归的经典例题存在。可能有人并不知道汉诺塔问题的典故。汉诺塔来源于印度传说的一个故事,上帝创造世界时作了三根金刚石柱子,在一根柱子上从下往上按大小顺序摞着64片黄金圆盘。上帝命令婆罗门把圆 阅读全文
posted @ 2011-04-09 21:25 咕咕咪 阅读(127) 评论(0) 推荐(0)