- 博客(14)
- 收藏
- 关注
原创 二叉树的非递归遍历
#include<iostream>#include<stack>#include<cstdlib>using namespace std;typedef struct BiTree{ char ch; struct BiTree *lchild,*rchild;}BiTree,*pBiTree;void BuildBiT...
2019-03-18 20:46:49
723
原创 二叉树的递归遍历
typedef struct BiTNode //创建树的节点并声明根节点指针{ char data; struct BiTNode *lchild,*rchild;}BiTNode,*BiTree;void CreateBiTree(BiTree &T) //先序序列建立二叉树{ char ch; scanf("%c",&ch); ...
2016-11-08 15:45:51
385
原创 你需要管理员权限...
Win+R -> 输入gpedit.msc -> 计算机配置-> windows设置 -> 安全设置 -> 本地策略 -> 安全选项 -> 用户账户控制:以管理员批准模式运行所有管理员(双击) -> 已禁用
2016-09-04 22:43:35
1730
原创 hdu2608 0or1(找规律)
DescriptionSolving problem is a interesting thing. Yifenfei like to slove different problem,because he think it is a way let him more intelligent. But as we know,yifenfei is weak in math. When he co...
2016-08-26 09:34:43
339
原创 HDU 5428 The Factor(分解质因子)
Problem DescriptionThere is a sequence of n positive integers. Fancycoder is addicted to learn their product, but this product may be extremely huge! However, it is lucky that FancyCoder only needs ...
2016-08-22 15:10:55
384
原创 HDU 5150 Sum Sum Sum
DescriptionWe call a positive number P-number if there is not a positive number that is less than and the greatest common divisor of these two numbers is bigger than 1.Now you are given a seque...
2016-08-16 10:10:00
433
原创 HDU 4715 Difference Between Primes
DescriptionAll you know Goldbach conjecture.That is to say, Every even integer greater than 2 can be expressed as the sum of two primes. Today, skywind present a new conjecture: every even integer ca...
2016-08-16 09:47:28
398
原创 hdu4548 美素数
Description 小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。 问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美素数。 给定一个区间,你能计算出这个区间内有多少个美素数吗?Input第一行输入一个正整数T,表示总共有T组数...
2016-08-16 08:57:35
266
原创 POJ 1142 Smith Numbers
DescriptionWhile skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University,noticed that the telephone number of his brother-in-law H. Smith had the following peculi...
2016-08-15 16:41:30
339
原创 HDU 3641 Treasure Hunting(阶乘素因子分解+二分)
DescriptionZstu_yhr is a very curious person who fell in love with math when he was in elementary school phase. When he entered the middle school, he learned Multiplication and Power Multiplication....
2016-08-08 08:14:20
352
3
原创 HDU 1316 How Many Fibs?(递推,大数相加)
DescriptionRecall the definition of the Fibonacci numbers:f1 := 1 f2 := 2 fn := fn-1 + fn-2 (n>=3) Given two numbers a and b, calculate how many Fibonacci numbers are in the range [...
2016-07-31 18:55:24
255
原创 SGU 106 The equation(扩欧)
DescriptionThere is an equation ax + by + c = 0. Given a,b,c,x1,x2,y1,y2 you must determine, how many integer roots of this equation are satisfy to the following conditions : x1<=x<=x2, y...
2016-07-31 10:46:05
231
原创 POJ 1061 青蛙的约会(扩欧)
Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰...
2016-07-29 09:38:53
389
原创 CF 394B Very Beautiful Number(逆推)
DescriptionTeacher thinks that we make a lot of progress. Now we are even allowed to use decimal notation instead of counting sticks. After the test the teacher promised to show us a "very beautiful...
2016-07-27 09:56:52
353
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人