摘要: Contest 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 popula 阅读全文
posted @ 2017-03-11 20:43 琴影 阅读(235) 评论(0) 推荐(0) 编辑
摘要: Give a natural number n (1 <= n <= 500000), please tell the summation of all its proper divisors. Definition: A proper divisor of a natural number is 阅读全文
posted @ 2017-03-11 20:27 琴影 阅读(298) 评论(0) 推荐(0) 编辑
摘要: Among grandfather��s papers a bill was found: 72 turkeys $_679_ The first and the last digits of the number that obviously represented the total price 阅读全文
posted @ 2017-03-11 20:17 琴影 阅读(252) 评论(0) 推荐(0) 编辑
摘要: As part of an arithmetic competency program, your students will be given randomly generated lists of from 2 to 15 unique positive integers and asked t 阅读全文
posted @ 2017-03-11 20:05 琴影 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 1 typedef struct node{ 2 int val; 3 struct node *left, *right; 4 }TreeNode; 5 //求二叉树的节点个数。 6 int GetNodeNum(TreeNode *pRoot){ 7 if(pRoot == NULL) 8 return 0; 9 ... 阅读全文
posted @ 2017-03-11 19:47 琴影 阅读(371) 评论(0) 推荐(0) 编辑
摘要: 题目1184:二叉树遍历 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:4167 解决:1690 题目描述: 编一个程序,读入用户输入的一串先序遍历字符串,根据此字符串建立一个二叉树(以指针方式存储)。例如如下的先序遍历字符串:ABC##DE#G##F###其中“#”表示的是空格,空格字 阅读全文
posted @ 2017-03-11 17:03 琴影 阅读(2088) 评论(0) 推荐(0) 编辑