上一页 1 2 3 4 5 6 7 ··· 9 下一页
  2015年1月26日
摘要: #include #include #define M 1000int size;typedef struct Fushu{ int a; int b;}Fushu;void fupop(Fushu *c){ int i,t=0; int max=c[0].a*c[0].a+... 阅读全文
posted @ 2015-01-26 17:43 赛亚人 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 在一个数组中如果并且,则称和为一对逆序对,请设计算法计算数组中的逆序对数,要求算法的时间复杂度为O(n*log(n))。 阅读全文
posted @ 2015-01-26 15:26 赛亚人 阅读(111) 评论(0) 推荐(0) 编辑
  2015年1月25日
摘要: #include#includetypedef struct Node{ int curadd; int data; int nextadd;}Node;int main(){ int n,k,firstadd,i,num,j; Node *a,temp; int c; while(scanf("%... 阅读全文
posted @ 2015-01-25 22:59 赛亚人 阅读(177) 评论(0) 推荐(0) 编辑
摘要: #include #include void Reverse(char *str,int low,int high){ char e; while(low<high) { e=str[low]; str[low]=str[high]; st... 阅读全文
posted @ 2015-01-25 22:45 赛亚人 阅读(111) 评论(0) 推荐(0) 编辑
摘要: #includetypedef struct X_L{ double x; double y;}X_L;int main(){ X_L v1,v2; double a,b; while(scanf("%lf%lf%lf%lf",&v1.x,&v1.y,&v2.x,&v2.y)!=EOF) { a=... 阅读全文
posted @ 2015-01-25 16:29 赛亚人 阅读(134) 评论(0) 推荐(0) 编辑
摘要: #include#includevoid reverse(char *s,int low,int high){ char t; while(low<high) { t=*(s+low); *(s+low)=*(s+high); *(s+high)=t; low++; high--; }}i... 阅读全文
posted @ 2015-01-25 16:04 赛亚人 阅读(219) 评论(0) 推荐(0) 编辑
摘要: #include#includeint main(){ char str[81],e; int i,len; while(gets(str)!=NULL) { len=strlen(str); for(i=0;i<len/2;i++) { e=str[i]; str[i]=str[le... 阅读全文
posted @ 2015-01-25 14:43 赛亚人 阅读(131) 评论(0) 推荐(0) 编辑
摘要: #include#includeint issubstring(char *s1,char *s2){ int i=0,j; int len2=strlen(s2); while(s1[i+len2-1]!='\0') { for(j=0;s2[j]!='\0';j++) if(s1[i+j]... 阅读全文
posted @ 2015-01-25 14:35 赛亚人 阅读(185) 评论(0) 推荐(0) 编辑
摘要: #includeint main(){ char e,str[80]; int i; while(gets(str)!=NULL) { e=getchar(); if(e=='\n') scanf("%c",&e); i=0; while(str[i]!='\0'){ if(str[i]... 阅读全文
posted @ 2015-01-25 13:39 赛亚人 阅读(161) 评论(0) 推荐(0) 编辑
摘要: #includevoid output(char *str){ int i=0; int j; while(str[i]!=' '&&str[i]!='\0') i++; if(str[i]==' ') output(str+i+1); if(str[i]==' ') printf(" "); fo... 阅读全文
posted @ 2015-01-25 13:26 赛亚人 阅读(107) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页