cjweffort

博客园 首页 联系 订阅 管理
上一页 1 2 3 4 5 6 7 8 ··· 14 下一页

2013年3月14日

摘要: cars refueling problem:with greedy algorithmgo tohttp://blog.csdn.net/newner/article/details/8637065 阅读全文
posted @ 2013-03-14 10:13 cjweffort 阅读(104) 评论(0) 推荐(0) 编辑

摘要: //sort// 1025. PAT Ranking.cpp: 主项目文件。 #include "stdafx.h" #include #include #include using namespace std; const int N=30003; struct Info{ char id[14]; int score; int belongs,vRank; int rank; Info operator=(const Info &info){ strcpy(id,info.id); score=info.score; belongs=info.belongs.. 阅读全文
posted @ 2013-03-14 10:08 cjweffort 阅读(124) 评论(0) 推荐(0) 编辑

摘要: // 1027. Colors in Mars.cpp: 主项目文件。 #include "stdafx.h" #include void read(int *p){ scanf("%d",p); } void transfer(int num){ if(num==0){ printf("00"); return; } char aa[5],cnt=0; int tt=num/13; if(tt>=0&&tt=0&&tt<=9) aa[1]=tt+'0'; else aa[1 阅读全文
posted @ 2013-03-14 08:39 cjweffort 阅读(133) 评论(0) 推荐(0) 编辑

摘要: 1001. A+B Formathttp://blog.csdn.net/newner/article/details/86713281002. A+B forPolynomialshttp://blog.csdn.net/newner/article/details/86713301003 Emergencehttp://blog.csdn.net/newner/article/details/86551141004. CountingLeaveshttp://blog.csdn.net/newner/article/details/86551321005. Spell ItRighthtt 阅读全文
posted @ 2013-03-14 08:17 cjweffort 阅读(127) 评论(0) 推荐(0) 编辑

摘要: // 1009. Product of Polynomials.cpp: 主项目文件。 #include "stdafx.h" #include #include void read(double *aa, int n){ for(int i=0;i=0;i--){ if(sum[i]!=0) printf(" %d %.1lf",i,sum[i]); } printf("\n"); } return 0; } 阅读全文
posted @ 2013-03-14 08:10 cjweffort 阅读(133) 评论(0) 推荐(0) 编辑

摘要: // 1006. Sign In and Sign Out.cpp: 主项目文件。 #include "stdafx.h" #include #include const int N=1003; typedef struct Person{ char id[17]; char start[10],end[10]; }Person; Person person[N]; int n; void selectMinAndMax(){ char min[10],max[10]; int minf=0,maxf=0; strcpy(min,person[0].start); str. 阅读全文
posted @ 2013-03-14 08:09 cjweffort 阅读(171) 评论(0) 推荐(0) 编辑

摘要: // 1005. Spell It Right.cpp: 主项目文件。 #include "stdafx.h" #include #include #include #include #include using namespace std; map cmap; void operate(int sum){ if(sum==0){ puts("zero"); return; } int aa[4],cnt=0; memset(aa,0,sizeof(aa)); while(sum){ aa[cnt++]=sum%10; sum/=10; } for... 阅读全文
posted @ 2013-03-14 08:08 cjweffort 阅读(184) 评论(0) 推荐(0) 编辑

摘要: // 1002. A+B for Polynomials.cpp: 主项目 文件。 #include "stdafx.h" #include #include void read(double *aa, int n){ for(int i=0;i=0;i--){ if(sum[i]!=0) printf (" %d %.1lf",i,sum[i]); } printf("\n"); } return 0; } 阅读全文
posted @ 2013-03-14 08:03 cjweffort 阅读(142) 评论(0) 推荐(0) 编辑

摘要: // 1001. A+B Format.cpp: 主项目文件。 #include "stdafx.h" #include int main() { char str[11]; int a,b; while(~scanf("%d%d",&a,&b)){ int sum=a+b; if(sum==0){ printf("0\n"); continue; } if(sum=0;i--){ putchar(str[i]); if(i%3==0&&i!=0) putchar(','); } put 阅读全文
posted @ 2013-03-14 08:01 cjweffort 阅读(162) 评论(0) 推荐(0) 编辑

2013年3月13日

摘要: // 1028. List Sorting.cpp: 主项目文件。 #include "stdafx.h" #include #include #include using namespace std; const int N=100003; typedef struct Stu{ char id[7],name[9]; int score; }Stu; Stu stu[N]; int version; bool cmp(Stu m1,Stu m2){ if(version==1) return strcmp(m1.id,m2.id)<0; else if(versi 阅读全文
posted @ 2013-03-13 23:52 cjweffort 阅读(123) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 14 下一页