摘要: 题目链接 Description Final Pan likes prime numbers very much. One day, he want to find the super prime numbers.A prime numbers $n$($n$>4) is a super prime 阅读全文
posted @ 2016-02-02 20:21 ACMSaga 阅读(220) 评论(0) 推荐(0)
摘要: 题目链接 Problem Description 约19世纪末,在欧州的商店中出售一种智力玩具,在一块铜板上有三根杆,最左边的杆上自上而下、由小到大顺序串着由64个圆盘构成的塔。目的是将最左边杆上的盘全部移到右边的杆上,条件是一次只能移动一个盘,且不允许大盘放在小盘的上面。现在我们改变游戏的玩法,不 阅读全文
posted @ 2016-02-02 20:08 ACMSaga 阅读(328) 评论(0) 推荐(0)
摘要: 题目链接 Problem Description 可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的 阅读全文
posted @ 2016-01-31 13:19 ACMSaga 阅读(410) 评论(0) 推荐(0)
摘要: 题目链接 Problem Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, 阅读全文
posted @ 2016-01-30 16:25 ACMSaga 阅读(165) 评论(0) 推荐(0)
摘要: 题目链接 Problem Description A while ago I had trouble sleeping. I used to lie awake, staring at the ceiling, for hours and hours. Then one day my grandmo 阅读全文
posted @ 2016-01-30 15:56 ACMSaga 阅读(356) 评论(0) 推荐(0)
摘要: Time Limit: 1 Sec Memory Limit: 128 MB Description 有一个长度为n的字符串(只包含小写字母),操作m次,每次操作交换两个字母,输出最终字符串。 Input 多组输入,每组第一行为n,m表示字符串长度和操作数,1<n,m<=100000第二行为长度n的 阅读全文
posted @ 2016-01-29 13:11 ACMSaga 阅读(376) 评论(0) 推荐(0)
摘要: 题目链接 Problem Description Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会.魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C 阅读全文
posted @ 2016-01-28 22:33 ACMSaga 阅读(191) 评论(0) 推荐(0)
摘要: 题目链接 Problem Description Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For 阅读全文
posted @ 2016-01-28 22:26 ACMSaga 阅读(158) 评论(0) 推荐(0)
摘要: 题目链接 Problem Description Now,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100;Now please try your l 阅读全文
posted @ 2016-01-28 22:17 ACMSaga 阅读(247) 评论(0) 推荐(0)
摘要: 题目链接 题解:题意为给出一个N*M的矩阵,然后(i∗2,j∗2) (i,j=0,1,2...)的点处是数字,两个数字之间是符号,其他位置是‘#’号。 但不知道是理解的问题还是题目描述的问题,数据中还有类似1#1这种数据存在,因此WA了4次,加上了一句代码后,马上AC了,该行代码在下文以斜粗体标出。 阅读全文
posted @ 2016-01-28 14:22 ACMSaga 阅读(190) 评论(0) 推荐(0)