摘要: Alice and Bob begin their day with a quick game. They first choose a starting number X0 ≥ 3 and try to reach one million by the process described belo 阅读全文
posted @ 2018-03-20 21:46 HazelNuto 阅读(211) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/948/problem/C C. Producing Snow Alice likes snow a lot! Unfortunately, this year's winter is already over, and she can't 阅读全文
posted @ 2018-03-11 11:15 HazelNuto 阅读(262) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/948/problem/A A. Protect Sheep Bob is a farmer. He has a large pasture with many sheep. Recently, he has lost some of th 阅读全文
posted @ 2018-03-11 11:02 HazelNuto 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.patest.cn/contests/gplt/L2-022 给定一个单链表 L1→L2→...→Ln-1→Ln,请编写程序将链表重新排列为 Ln→L1→Ln-1→L2→...。例如:给定L为1→2→3→4→5→6,则输出应该为6→1→5→2→4→3。 输入格式: 阅读全文
posted @ 2018-03-11 10:58 HazelNuto 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.patest.cn/contests/gplt/L2-016 呵呵。大家都知道五服以内不得通婚,即两个人最近的共同祖先如果在五代以内(即本人、父母、祖父母、曾祖父母、高祖父母)则不可通婚。本题就请你帮助一对有情人判断一下,他们究竟是否可以成婚? 输入格式: 输入第一 阅读全文
posted @ 2018-03-08 13:21 HazelNuto 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://www.patest.cn/contests/gplt/L2-004 一棵二叉搜索树可被递归地定义为具有下列性质的二叉树:对于任一结点, 其左子树中所有结点的键值小于该结点的键值; 其右子树中所有结点的键值大于等于该结点的键值; 其左右子树都是二叉搜索树。 所谓二叉搜索树 阅读全文
posted @ 2018-03-04 21:56 HazelNuto 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.patest.cn/contests/gplt/L1-006 一个正整数N的因子中可能存在若干连续的数字。例如630可以分解为3*5*6*7,其中5、6、7就是3个连续的数字。给定任一正整数N,要求编写程序求出最长连续因子的个数,并输出最小的连续因子序列。 输入格式 阅读全文
posted @ 2018-03-01 18:24 HazelNuto 阅读(384) 评论(0) 推荐(0) 编辑
摘要: Getting over it with HazelNut --> --> /* -----------... 阅读全文
posted @ 2017-12-23 02:58 HazelNuto 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Getting over it with HazelNut --> --> /* -----------... 阅读全文
posted @ 2017-12-23 02:07 HazelNuto 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Getting over it with HazelNut --> --> /* ------------------ M... 阅读全文
posted @ 2017-12-22 23:59 HazelNuto 阅读(93) 评论(0) 推荐(0) 编辑