SDT OJ 1334
摘要:#include #include #include struct stud{ char name[15][10]; int mark[10];}student;int main(){ int i,j,l; for(i=0;i0) { strcpy(student.name[11],student.name[j]); strcpy(student.name[j],student.name[j+1]); strcpy(student.name[j+1],stud...
阅读全文
posted @
2013-06-26 21:14
lie隼
阅读(153)
推荐(0) 编辑
p283-贪心-事件序列
摘要:#include //#define M 1000#define N 12void out(int select[],int n){ int i; printf("{0"); for(i=1;i=timestart) { select[i]=1; timestart=ent[i][1]; } i++;*/ if(begin[i]>=timestart) { select[i]=1; timestart=end[i]; ...
阅读全文
posted @
2013-06-22 21:17
lie隼
阅读(265)
推荐(0) 编辑
p281-贪心-删数问题
摘要:#include #include int main(){ int i,s,len; char a[100]; scanf("%s",a); scanf("%d",&s); while(s>0) { i=0; len=strlen(a); while(i<len&&a[i]<=a[i+1]) i++; while(i<len) { a[i]=a[i+1]; i++; } s--; } ...
阅读全文
posted @
2013-06-22 16:20
lie隼
阅读(140)
推荐(0) 编辑