上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 99 下一页

2011年5月4日

用qsort Design T-Shirt

摘要: #include<stdio.h>#include<string.h>#include<stdlib.h>struct NODE{ int i; double sum;}T[100000];int m,n,k; int cmp1(const void *a,const void *b){ if( (*(NODE *)a).sum==(*(NODE *)b).sum) return (*(NODE ... 阅读全文

posted @ 2011-05-04 00:49 more think, more gains 阅读(123) 评论(0) 推荐(0) 编辑

Design T-Shirt

摘要: #include <stdio.h>#include <algorithm>using namespace std;struct Node{ int i; double sum;}T[10000];int n,m,k;bool cmp1(Node a,Node b){ if(a.sum== b.sum) return a.i < b.i; //值按降序,如果相等,标号按升序 return a.su... 阅读全文

posted @ 2011-05-04 00:30 more think, more gains 阅读(148) 评论(0) 推荐(0) 编辑

2011年5月3日

EXCEL排序

摘要: #include<stdio.h>#include<stdlib.h>#include<string.h>#include<algorithm>using namespace std;int l=1,N,M;struct node{ char stu[10]; char name[10]; int grade;}T[100010];int cmp1(const void *a,const void *b){ return strcmp((*(node *)a).stu,(*(node *)b).stu);}int cmp2(const void 阅读全文

posted @ 2011-05-03 20:48 more think, more gains 阅读(200) 评论(0) 推荐(0) 编辑

Fibonacci Again 不可小瞧的一道题。

摘要: #include<stdio.h>#include<stdlib.h>#include<string.h>__int64 F[1000110];int main( ){ int i,n; while(scanf("%I64d",&n)!=EOF) { memset(F,0,sizeof(F)); F[0] = 7, F[1] = 11; for(i=2;i<=n;i++) F[i] = F[i-1... 阅读全文

posted @ 2011-05-03 19:28 more think, more gains 阅读(124) 评论(0) 推荐(0) 编辑

AC Me

摘要: #include<stdio.h>#include<stdlib.h>#include<string.h>char ch[100010],visit[27];int dp[27];int main( ){ int len,i,j; while(gets(ch)) { len=strlen(ch); memset(dp,0,sizeof(dp)); for(i=0;i<26;i++) visit[i... 阅读全文

posted @ 2011-05-03 18:39 more think, more gains 阅读(132) 评论(0) 推荐(0) 编辑

上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 99 下一页

导航