上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 41 下一页
摘要: #include<stdio.h> #include<string.h> int fun(int number){ int i,temp; temp=1; for(i=1;i<=number;i++) temp*=i; return temp; } int main(){ int sum,num,t 阅读全文
posted @ 2015-04-14 18:31 wojiaohuangyu 阅读(6) 评论(0) 推荐(0)
摘要: 虽然比较简单,但是我还是很吃力的才做出来,参考大神的方法。。。 大概思路就是递归,先找出来第一个根,然后根据此根将左子树跟右子树分开,无论是后序还是中序依据根分开,然后再依次递归 #include<stdio.h> #include<string.h> //void deal(char right_ 阅读全文
posted @ 2015-04-14 18:13 wojiaohuangyu 阅读(7) 评论(0) 推荐(0)
摘要: 虽然这都题目简单,但还是花了我俩小时,总是找不到错误。。 本题目用到了栈 #include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> #include<stack> using namespace std; cha 阅读全文
posted @ 2015-04-11 09:21 wojiaohuangyu 阅读(8) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<string.h> #include<math.h> int main(){ int T,n,m,i,j,k,t,flag; scanf("%d",&T); while(T--){ scanf("%d",&m); int a[m]; memset 阅读全文
posted @ 2015-04-07 16:48 wojiaohuangyu 阅读(6) 评论(0) 推荐(0)
摘要: 看大神的代码看了好久,我自己感觉不太好理解 代码: #include<stdio.h> #include<string.h> #include<stack> #include<queue> using namespace std; char str[1200]; int fun(char ch){ 阅读全文
posted @ 2015-04-07 15:40 wojiaohuangyu 阅读(7) 评论(0) 推荐(0)
摘要: 有时候总感觉好迷茫,我已经大二了,再有两年就要毕业了,我能在大学里边做些什么,就这么过去了,就像大多数人一样???!!!!!! #include<stdio.h> #include<string.h> int main(){ int n; char str1[20],str2[1020]; int 阅读全文
posted @ 2015-03-31 15:18 wojiaohuangyu 阅读(8) 评论(0) 推荐(0)
摘要: 当我首先看到这道题目的时候,我看难度为3,想想一般的算法肯定会超时,但是也想不到其他的方法,于是我就用最笨的存数组的算法试了一下,果然不出我所料。 原谅我没有大神的耐心去一次一次的尝试,参考了大神的算法,果然用着舒服,妈的,看我这出息。。。。。 #include<stdio.h> #include< 阅读全文
posted @ 2015-03-30 22:16 wojiaohuangyu 阅读(5) 评论(0) 推荐(0)
摘要: 本题用到了了搜索和队列,第一次将这两个加起来写,有点吃力。。。。。。 队列相关知识:http://blog.csdn.net/zxy_snow/article/details/6118988 #include<stdio.h> #include<string.h> #include<queue> # 阅读全文
posted @ 2015-03-27 15:48 wojiaohuangyu 阅读(8) 评论(0) 推荐(0)
摘要: 费了我好长时间。。。。。 #include<stdio.h> #include<string.h> __int64 deal1(__int64 x,__int64 y){ __int64 temp; temp=1; while(y){ if(y % 2 == 1) temp = temp * x % 阅读全文
posted @ 2015-03-26 20:52 wojiaohuangyu 阅读(9) 评论(0) 推荐(0)
摘要: 这道题目看了好几个大神的做法,对打表的做法表示灰常佩服。。。。。。 这里是借鉴别人的一种做法 代码: #include<stdio.h> #include<string.h> bool num[9999999]; int prime[1000000]; void deal(){//对数据进行处理 i 阅读全文
posted @ 2015-03-23 21:33 wojiaohuangyu 阅读(6) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 41 下一页