摘要: 排列Time Limit:1000MSMemory Limit:30000KTotal Submissions:15173Accepted:6148Description题目描述:大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序)列出,如n=3时,列出1 2 3,1 3 2,2 1 3,2 3 1,3 1 2,3 2 1六个排列。任务描述:给出某个排列,求出这个排列的下k个排列,如果遇到最后一个排列,则下1排列为第1个排列,即排列1 2 3…n。比如:n = 3,k=2 给出排列2 3 1,则它的下1个排列为3 1 2,下2个排列为3 2 1, 阅读全文
posted @ 2013-12-01 13:53 芷水 阅读(285) 评论(0) 推荐(0) 编辑
摘要: BombTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 5247Accepted Submission(s): 1815Problem DescriptionThe counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bom 阅读全文
posted @ 2013-12-01 11:58 芷水 阅读(174) 评论(0) 推荐(0) 编辑