会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
GabyGoole
人类充满了热情, 医药,法律,商业,工程,这些都是高贵的理想,并且是维生的必需条件,但是诗、美、浪漫、爱,这些才是我们生存的原因
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
4
5
6
7
8
9
10
11
12
···
15
下一页
2015年6月25日
链表的声明及操作
摘要: View Code以上使用数组做的以下使用链表#include#includetypedef struct Node *PtrToNodetypedef PtrToNode Listtypedef PtrToNode Positionstruct Node{ ElementType Eleme...
阅读全文
posted @ 2015-06-25 16:28 Gabyler
阅读(1242)
评论(0)
推荐(0)
2015年6月24日
最大子列和
摘要: //计算最大子列和,T(n)=O(n^2)#include #include //一旦由i确定左端,thisSum就从左端往右加,加一个值更新一次thisSum//当第二个数作为左端时,thisSum要归0,因为这代表着第二种序列int main(){ int a[n]; int i,j...
阅读全文
posted @ 2015-06-24 14:16 Gabyler
阅读(477)
评论(0)
推荐(0)
2015年6月23日
秦九韶算法
摘要: //计算多项式a0+a1*x+a2*x^2+...+an*x^n#include #include int main(){ int ar[n]; for(i=0;i=0;i--) { p = p*x + a[i]; } return 0;}View Cod...
阅读全文
posted @ 2015-06-23 21:30 Gabyler
阅读(134)
评论(0)
推荐(0)
poj3673---双重for循环
摘要: #include #include #include #define MAX 15int main(){ int i,j,sum=0; char s1[MAX],s2[MAX]; scanf("%s %s",s1,s2); for(i=0; i<strlen(s1); i++...
阅读全文
posted @ 2015-06-23 16:44 Gabyler
阅读(125)
评论(0)
推荐(0)
poj3650---将一个字符串中的特定字符转换
摘要: #include #include #includeint main(){ char str[100]; int i; while(gets(str) != NULL) { if(str[0] == '#') break; f...
阅读全文
posted @ 2015-06-23 16:26 Gabyler
阅读(183)
评论(0)
推荐(0)
poj3589---判断两个数有多接近
摘要: #include #include int main(){ char s1[6],s2[6]; int a,b,i,j,n; scanf("%d",&n); while(n--) { a=0;b=0; scanf("%s %s",s1,s2)...
阅读全文
posted @ 2015-06-23 15:51 Gabyler
阅读(356)
评论(0)
推荐(0)
poj3507---去掉最小值和最大值
摘要: #include #include int main(){ while(1) { int i,sum=0,max=0,min=999,t; for(i=0; i max) max=t; if(t < min)...
阅读全文
posted @ 2015-06-23 13:17 Gabyler
阅读(144)
评论(0)
推荐(0)
2015年6月20日
poj3100---求根问题
摘要: 题意:a的n方=b,a这个整数与b开n方的值相近,分别向上取整和向下取整,同时n方,b一定介于这两个整数之间,然后比较这两个数与b的距离,取最近的收获:c++的cei和floor函数在c中的向上取整和向下取整函数为:double a;(int)a --向下取整 (int)a+1 ---向上...
阅读全文
posted @ 2015-06-20 14:15 Gabyler
阅读(244)
评论(0)
推荐(0)
poj3094---对字符串的处理
摘要: #include #include #includeint main(){ char str[260]; int len,i,sum; while(gets(str) != NULL && str[0] != '#') { sum=0; len=s...
阅读全文
posted @ 2015-06-20 12:09 Gabyler
阅读(95)
评论(0)
推荐(0)
poj3086---数论
摘要: #include #include int T(int n){ int sum=0,i; for(i=1;i<=n;i++) { sum+=i; } return sum;}int main(){ int n,tmp,k,cout=0; sca...
阅读全文
posted @ 2015-06-20 11:36 Gabyler
阅读(121)
评论(0)
推荐(0)
上一页
1
···
4
5
6
7
8
9
10
11
12
···
15
下一页
公告