- 博客(11)
- 资源 (2)
- 收藏
- 关注
原创 Digital Roots
Problem DescriptionThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resultin...
2019-02-28 20:57:39 103
原创 u Calculate e
Problem DescriptionA simple mathematical formula for e iswhere n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively small values of n.Output...
2019-02-28 20:52:53 167
原创 Tempter of the Bone
Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He re...
2019-02-28 20:50:52 120
原创 Elevator
Problem DescriptionThe highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified ...
2019-02-28 20:48:09 129
原创 Let the Balloon Rise
Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest i...
2019-02-28 20:46:30 83
原创 Max Sum
Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 +...
2019-02-28 20:43:12 89
原创 A + B Problem II
Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of the input contains an integer T(1<=T<=...
2019-02-28 20:36:16 95
原创 A + B Problem
Problem DescriptionCalculateA + B.InputEach line will contain two integersAandB. Process to end of file.OutputFor each case, outputA + Bin one line.Sample Input1 1Sample Output...
2019-02-28 20:32:30 109
原创 PTA-L2-011 玩转二叉树
题目:给定一棵二叉树的中序遍历和前序遍历,请你先将树做个镜面反转,再输出反转后的层序遍历的序列。所谓镜面反转,是指将所有非叶结点的左右孩子对换。这里假设键值都是互不相等的正整数。输入格式:输入第一行给出一个正整数N(≤30),是二叉树中结点的个数。第二行给出其中序遍历序列。第三行给出其前序遍历序列。数字间以空格分隔。输出格式:在一行中输出该树反转后的层序遍历的序列。数字间以1个...
2019-02-28 20:03:38 127
原创 PTA-L2-006 树的遍历
题目:给定一棵二叉树的后序遍历和中序遍历,请你输出其层序遍历的序列。这里假设键值都是互不相等的正整数。输入格式:输入第一行给出一个正整数N(≤30),是二叉树中结点的个数。第二行给出其后序遍历序列。第三行给出其中序遍历序列。数字间以空格分隔。输出格式:在一行中输出该树的层序遍历的序列。数字间以1个空格分隔,行首尾不得有多余空格。输入样例:72 3 1 5 7 6 41...
2019-02-27 21:16:14 145
原创 PTA-L2-002 链表去重
题目:给定一个带整数键值的链表L,你需要把其中绝对值重复的键值结点删掉。即对每个键值K,只有第一个绝对值等于K的结点被保留。同时,所有被删除的结点须被保存在另一个链表上。例如给定L为 21→-15→-15→-7→15,你需要输出去重后的链表 21→-15→-7,还有被删除的链表 -15→15。输入格式:输入在第一行给出 L 的第一个结点的地址和一个正整数N(≤105...
2019-02-27 20:53:57 202
商店-商品-购物车简单项目
2019-11-16
android界面设计.zip
2019-08-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人