摘要: 卡拉兹(Callatz)猜想已经在1001中给出了描述。在这个题目里,情况稍微有些复杂。当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数。例如对n=3进行验证的时候,我们需要计算3、5、8、4、2、1,则当我们对n=5、8、4、2进行验证的时候,就可以直接判定卡拉兹猜... 阅读全文
posted @ 2015-11-15 12:12 Traveller_Leon 阅读(397) 评论(0) 推荐(0) 编辑
摘要: “答案正确”是自动判题系统给出的最令人欢喜的回复。本题属于PAT的“答案正确”大派送 —— 只要读入的字符串满足下列条件,系统就输出“答案正确”,否则输出“答案错误”。得到“答案正确”的条件是:1. 字符串中必须仅有P, A, T这三种字符,不可以包含其它字符;2. 任意形如 xPATx 的字符串都... 阅读全文
posted @ 2015-11-15 11:27 Traveller_Leon 阅读(2151) 评论(0) 推荐(1) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include"jsoncpp/json.h" 10 using namespace std; ... 阅读全文
posted @ 2015-11-12 19:23 Traveller_Leon 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 题目描述Description我们要求找出具有下列性质数的个数(包含输入的自然数n):先输入一个自然数n(n 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 1... 阅读全文
posted @ 2015-10-21 09:16 Traveller_Leon 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 听着裁判倒计时比赛结束,看着全场鲜艳的气球,今天的结果是the last result i can image。 过几天给校赛出题,去年此时的我,还从来没有过竞赛的经验,只因为在大学开学前看了一点点c语言,会输出hello world就想去竞赛了,通过不方便的方式总算接触到了科协,然后能听学长... 阅读全文
posted @ 2015-10-19 22:53 Traveller_Leon 阅读(274) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionIt's yet another festival season in Gensokyo. Little girl Alice planned to pick mushrooms in five mountains. She brought five bags ... 阅读全文
posted @ 2015-10-12 16:15 Traveller_Leon 阅读(227) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionLike everyone, cows enjoy variety. Their current fancy is new shapes for pastures. The old rectangular shapes are out of favor; new... 阅读全文
posted @ 2015-10-11 16:06 Traveller_Leon 阅读(234) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionI like playing game with my friend, although sometimes looks pretty naive. Today I invent a new game called LianLianKan. The game i... 阅读全文
posted @ 2015-10-08 22:52 Traveller_Leon 阅读(336) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionAlice and Bob's game never ends. Today, they introduce a new game. In this game, both of them have N different rectangular cards re... 阅读全文
posted @ 2015-10-08 14:40 Traveller_Leon 阅读(258) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionElves are very peculiar creatures. As we all know, they can live for a very long time and their magical prowess are not something t... 阅读全文
posted @ 2015-10-03 18:31 Traveller_Leon 阅读(213) 评论(0) 推荐(0) 编辑