2011年2月26日

摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=3783代码:#include<stdio.h>#include<string.h>#include<stdlib.h>int main(){ char s[101]; while(gets(s)!=NULL){ if(strcmp(s,"E")==0)break; int cnt1=0,cnt2=0,cnt3=0; int i,len; len=strlen(s); //printf(); for... 阅读全文
posted @ 2011-02-26 20:44 江南烟雨hust 阅读(125) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=3783代码:#include<stdio.h>#include<string.h>#include<stdlib.h>int main(){ char s[101]; while(gets(s)!=NULL){ if(strcmp(s,"E")==0)break; int cnt1=0,cnt2=0,cnt3=0; int i,len; len=strlen(s); //printf(); for... 阅读全文
posted @ 2011-02-26 20:44 江南烟雨hust 阅读(160) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1881代码:#include<stdio.h>#include<stdlib.h>struct node{//每场bg的信息数据结构定义; int h,l,t;//快乐度,持续时间、离开时间; }H[31];int cmp(const void *a,const void *b){//qsort函数的比较函数; return (*(node *)a).t-(*(node *)b).t;//升序排列; }int main(){ int N; while(scanf("%d 阅读全文
posted @ 2011-02-26 20:16 江南烟雨hust 阅读(182) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1881代码:#include<stdio.h>#include<stdlib.h>struct node{//每场bg的信息数据结构定义; int h,l,t;//快乐度,持续时间、离开时间; }H[31];int cmp(const void *a,const void *b){//qsort函数的比较函数; return (*(node *)a).t-(*(node *)b).t;//升序排列; }int main(){ int N; while(scanf("%d 阅读全文
posted @ 2011-02-26 20:16 江南烟雨hust 阅读(184) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1880AC代码:#include<stdio.h>#include<string.h>#include<stdlib.h>char s[100001][110],a[100001][25],b[100001][90];//放在主函数里面就是堆栈溢出!!!!!!!! int main(){ int i=0,j,k,len,count,N; while(gets(s[i])!=NULL){ if(strcmp(s[i],"@END@")==0)brea 阅读全文
posted @ 2011-02-26 18:25 江南烟雨hust 阅读(214) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1880AC代码:#include<stdio.h>#include<string.h>#include<stdlib.h>char s[100001][110],a[100001][25],b[100001][90];//放在主函数里面就是堆栈溢出!!!!!!!! int main(){ int i=0,j,k,len,count,N; while(gets(s[i])!=NULL){ if(strcmp(s[i],"@END@")==0)brea 阅读全文
posted @ 2011-02-26 18:25 江南烟雨hust 阅读(122) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1877代码:#include<stdio.h>#include<stdlib.h>int main(){ int m,A,B; while(scanf("%d",&m)!=EOF){ if(m==0)break; scanf("%d %d",&A,&B); int res=A+B; int r[50],count=0,i; while(res/m>0){ r[count++]=res%... 阅读全文
posted @ 2011-02-26 16:13 江南烟雨hust 阅读(142) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1877代码:#include<stdio.h>#include<stdlib.h>int main(){ int m,A,B; while(scanf("%d",&m)!=EOF){ if(m==0)break; scanf("%d %d",&A,&B); int res=A+B; int r[50],count=0,i; while(res/m>0){ r[count++]=res%... 阅读全文
posted @ 2011-02-26 16:13 江南烟雨hust 阅读(127) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1873代码:#include<stdio.h>#include<string.h>#include<stdlib.h>struct patient{//病人信息数据结构定义; int id;//病人编号; int prior;//病人优先级; }p[3][2001];//3个队列,对应3个医生; int main(){ int N; while(scanf("%d",&N)!=EOF){ int i,j,cnt=0;//记录病人编号; .. 阅读全文
posted @ 2011-02-26 15:44 江南烟雨hust 阅读(189) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1873代码:#include<stdio.h>#include<string.h>#include<stdlib.h>struct patient{//病人信息数据结构定义; int id;//病人编号; int prior;//病人优先级; }p[3][2001];//3个队列,对应3个医生; int main(){ int N; while(scanf("%d",&N)!=EOF){ int i,j,cnt=0;//记录病人编号; .. 阅读全文
posted @ 2011-02-26 15:44 江南烟雨hust 阅读(159) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1872代码:#include<stdio.h>#include<string.h>#include<stdlib.h>int main(){ int N; while(scanf("%d",&N)!=EOF){ char a[400][60],b[400][60]; int c[400],d[400],i,j,temp; int id[400];//记录按学生成绩稳定排序后的数据组号; for(i=0;i<N;i++){ ... 阅读全文
posted @ 2011-02-26 14:47 江南烟雨hust 阅读(113) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1872代码:#include<stdio.h>#include<string.h>#include<stdlib.h>int main(){ int N; while(scanf("%d",&N)!=EOF){ char a[400][60],b[400][60]; int c[400],d[400],i,j,temp; int id[400];//记录按学生成绩稳定排序后的数据组号; for(i=0;i<N;i++){ ... 阅读全文
posted @ 2011-02-26 14:47 江南烟雨hust 阅读(133) 评论(0) 推荐(0)

导航