- 博客(14)
- 收藏
- 关注
原创 九度oj 素数 1047,1163,1040,1140
1047题目:http://ac.jobdu.com/problem.php?pid=1047#include #include #include #include #include #include #include #define ISYEAP(x) x%100!=0 && x%4==0 || x%400==0 ? 1:0 using namespace std;
2016-01-31 21:20:44 374
原创 九度oj 最大公约数(gcd)(这缩写!!!) 最小公倍数(lcm) 1056,1438,1439
1056题目:http://ac.jobdu.com/problem.php?pid=1056#include #include #include #include #include #include #include #define ISYEAP(x) x%100!=0 && x%4==0 || x%400==0 ? 1:0 using namespace std;i
2016-01-31 21:16:57 563
原创 九度oj 进制转换 1026,1118,1138,1194
1026题目:http://ac.jobdu.com/problem.php?pid=1026#include #include #include #include #include #include #include #define ISYEAP(x) x%100!=0 && x%4==0 || x%400==0 ? 1:0 using namespace std;
2016-01-31 21:07:08 325
原创 九度oj 数位拆解 1064
1064题目:http://ac.jobdu.com/problem.php?pid=1064#include #include #include #include #include #include #include #define ISYEAP(x) x%100!=0 && x%4==0 || x%400==0 ? 1:0 using namespace std;
2016-01-31 21:00:57 371
原创 九度oj 守型数 1183
1083题目:http://ac.jobdu.com/problem.php?pid=1083#include #include #include #include #include #include #include #define ISYEAP(x) x%100!=0 && x%4==0 || x%400==0 ? 1:0 using namespace std;
2016-01-31 20:58:16 374
原创 九度oj A+B 1010,1015
1010题目:http://ac.jobdu.com/problem.php?pid=1010#include #include #include #include #include #include #include #define ISYEAP(x) x%100!=0 && x%4==0 || x%400==0 ? 1:0 using namespace std;
2016-01-31 20:52:26 320
原创 九度oj 二叉排序树 1201,1009 c++
1201题目:http://ac.jobdu.com/problem.php?pid=1201#include #include #include #include #include #include #include #define ISYEAP(x) x%100!=0 && x%4==0 || x%400==0 ? 1:0 using namespace std;
2016-01-31 20:38:59 292
原创 九度oj 1078,1113,1176 二叉树
1078题目:http://ac.jobdu.com/problem.php?pid=1078大意是,告诉你前序遍历和中序遍历求后序遍历。大致思路,通过前序遍历我们可以很容易知道这个二叉树的根节点知道,之后根据中序遍历,我们可以知道那些节点是左子树,哪些节点是右子树。递归得解:#include #include #include #include #incl
2016-01-27 19:59:15 271
原创 九度 oj 1172,,107 优先队列的使用 (未理解优先队列)
http://ac.jobdu.com/problem.php?pid=1107http://ac.jobdu.com/problem.php?pid=1172代码差不多:#include #include #include #include #include #include #include #define ISYEAP(x) x%100!=0 && x%4==0
2016-01-27 15:27:13 241
原创 九度oj 1101 计算式的一种有趣解决思路
首先1101这题出的真缺少条件!!! 题目链接:http://ac.jobdu.com/problem.php?pid=1101 我就在想-1-2这种式子就通不过我(别人)的AC代码。 解题思路到是很赞!!! 设想这种情况,式子中只有+号,那么结果可以看成是若干数之和。实际情况下,不止+号,还有-,*,/号。-号可以看成是减号后一个数的负数,*号的操作方式是符号的前后两个数
2016-01-25 20:20:31 651
原创 scanf的疑惑 待解决
前一天做一道题,九度oj的1108,栈。 题目不难,很简单,吭哧吭哧敲完之后运行,整个人都斯巴达了。不仅仅是结果,而且运行的过程,我看到简直崩溃!!! 今天,2016年1月25号,在参(piao)考(qie)了别人的代码之后,尝试着把scanf("%c",&c);的地方全变成cin>>c;然后就对了。先把九度oj1108的题目贴上来:题目描述: 堆栈是一
2016-01-25 18:08:06 261
原创 九度oj 1153,1019 栈
一道简单的符号匹配题。主要是练练栈的一些应用。题目链接 http://ac.jobdu.com/problem.php?pid=1153#include #include #include #include #include #include #define ISYEAP(x) x%100!=0 && x%4==0 || x%400==0 ? 1:0#using nam
2016-01-23 15:13:21 247
原创 九度oj 1437 贪心
#include #include #include #include #include #define ISYEAP(x) x%100!=0 && x%4==0 || x%400==0 ? 1:0using namespace std;long long int arr[610];const double eps=1e-8;double Cmax;//油箱体积double D
2016-01-22 21:33:10 346
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人