九度教程
leizh007
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
九度教程第1题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=0C语言源码:#includeint main(){ int a[100],i,j,n,x; while(scanf("%d",&n)!=EOF) { for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<n-1;i++) {原创 2013-01-16 15:59:54 · 401 阅读 · 0 评论 -
九度教程第3题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=2C语言源码:#includevoid quicksort(int a[],int low,int high){ int key,i,j; i=low; j=high; key=a[low]; while(i<j) { while(i=key) j--; *原创 2013-01-16 16:53:36 · 247 阅读 · 0 评论 -
九度教程第7题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=6C语言源码:#include#includeint leap(int year){ if((year%4==0&&year%100!=0)||year%400==0) return 1; else return 0;}//判断是不是闰年int daynum(int y原创 2013-01-17 10:27:29 · 190 阅读 · 0 评论 -
九度教程第2题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=1C语言源码:#include#includetypedef struct student{ char name[100]; int age,score;}student;void quicksort(student stu[],int add[],int low,int hi原创 2013-01-16 16:29:34 · 485 阅读 · 1 评论 -
九度教程第4题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=3C语言源码:#include#include#includetypedef struct student{ char num[7]; char name[9]; int score;}student;student s[100000];int cmp1(const原创 2013-01-16 18:51:49 · 291 阅读 · 0 评论 -
九度教程第5题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=4C语言源码:#include#include#includeint cmp(const void *a,const void *b){ return (*(char *)a-*(char *)b);}int main(){ char s[201]; int n; wh原创 2013-01-16 19:15:09 · 196 阅读 · 0 评论 -
九度教程第30题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=29C语言源码:#include#includetypedef struct Huffmantree{ int weight,lchild,rchild,parent;}Huffmantree;int depth( Huffmantree H[],int n,int x){原创 2013-01-31 16:24:18 · 288 阅读 · 0 评论 -
九度教程第28题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=27C语言源码:#includeint main(){ int n,i,top,a[10005],x; char s[100]; scanf("%d",&n); while(n) { top=0; for(i=1;i<=n;i++) { scanf("%s原创 2013-01-31 11:01:38 · 241 阅读 · 0 评论 -
九度教程第29题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=28C语言源码://这个题不是跟第27题一模一样嘛#include#includeint Precede(char a,char b){ int p[5][5]={{-1,-1,-1,-1,1},{-1,-1,-1,-1,1},{1,1,-1,-1,1},{1,1,-1,-1,1},原创 2013-01-31 15:13:23 · 339 阅读 · 2 评论 -
九度教程第6题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=5C语言源码:#includeint leapyear(int year){ if((year%4==0&&year%100!=0)||year%400==0) return 1; else return 0;}int day(int year,int month,in原创 2013-01-16 22:21:08 · 208 阅读 · 0 评论 -
九度教程第9题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=8C语言源码:#includeint leap(int year){ if((year%4==0&&year%100!=0)||year%400==0) return 1; else return 0;}void date(int num,int year,int *mo原创 2013-01-17 13:08:18 · 235 阅读 · 0 评论 -
九度教程第11题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=10C语言源码:#includeint a[1000002];int main(){ int n,m,i,k,j; while(scanf("%d %d",&n,&m)!=EOF) { for(i=1;i<1000002;i++) a[i]=0; for(i=1;i原创 2013-01-17 15:52:09 · 169 阅读 · 0 评论 -
九度教程第15题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=14C语言源码:#include#includeint main(){ int n,i,center,j,len; char a[90][90]; char p,q; while(scanf("%d %c %c",&n,&p,&q)!=EOF) { center=(n+1原创 2013-01-17 18:38:46 · 203 阅读 · 0 评论 -
九度教程第19题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=18C语言源码:#includeint main(){ int n,k,i,a[100],num; while(scanf("%d",&n)!=EOF) { while(n) { n--; scanf("%d",&k); for(i=0;i<k;i++)原创 2013-01-17 22:13:06 · 203 阅读 · 0 评论 -
九度教程第20题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=19C语言源码:#include#includeint cmp(const void *a,const void *b){ return *(int *)a-*(int *)b;}int search(int a[],int n,int x){ int low,high,ke原创 2013-01-17 22:41:10 · 223 阅读 · 0 评论 -
九度教程第21题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=20C语言源码:#include#includetypedef struct room{ int j,f; float w;}room;int cmp(const void *a,const void *b){ room *aa=(room *)a; room *bb=(原创 2013-01-18 08:26:48 · 199 阅读 · 0 评论 -
九度教程第8题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=7C语言源码:#includeint leap(int year){ if((year%4==0&&year%100!=0)||year%400==0) return 1; else return 0;}int daynum(int year,int month,int原创 2013-01-17 12:22:02 · 180 阅读 · 0 评论 -
九度教程第10题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=9C语言源码:#includeint main(){ int a[101],n,i,score; scanf("%d",&n); while(n) { for(i=0;i<=100;i++) a[i]=0; for(i=1;i<=n;i++) { scan原创 2013-01-17 15:15:11 · 166 阅读 · 0 评论 -
九度教程第12题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=11C语言源码:#includeint main(){ int i,n,m,book[201],person[201]; while(scanf("%d %d",&n,&m)!=EOF) { for(i=1;i<=m;i++) book[i]=0; for(i=1;i原创 2013-01-17 16:06:04 · 207 阅读 · 0 评论 -
九度教程第14题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=13C语言源码:#includeint main(){ int h,i,j; while(scanf("%d",&h)!=EOF) { for(i=1;i<=h;i++) { j=1; while(j<=2*h-2*i) { printf(" ")原创 2013-01-17 16:34:53 · 193 阅读 · 0 评论 -
九度教程第31题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=30C语言源码:#includetypedef struct Huffmantree{ int weight,lchild,rchild,parent;}Huffmantree;int depth(Huffmantree H[],int n,int i){ int d; d=原创 2013-01-31 23:11:49 · 409 阅读 · 1 评论 -
九度教程第32题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=31C语言源码:#include#include#includetypedef struct BiTree{ char data; BiTree *lchild,*rchild;}BiTree;BiTree *create(char a[],char b[],int m,in原创 2013-02-01 18:19:42 · 294 阅读 · 0 评论 -
九度教程第34题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=33C语言地址:#include#includeint depth(int n){ return (int)(log(n)/log(2));}int main(){ int i,n,a[1002],d; while(scanf("%d",&n)!=EOF) { for原创 2013-02-01 23:42:08 · 429 阅读 · 0 评论 -
九度教程第36题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=35C语言源码:#include#include#includetypedef struct Bitree{ int data; struct Bitree *lchild,*rchild;}Bitree;Bitree *create(Bitree *t,int n){原创 2013-02-02 12:34:50 · 451 阅读 · 0 评论 -
九度教程第37题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=36C语言源码:#include#includeint main(){ int a,b,k,n; scanf("%d %d %d",&a,&b,&k); while(a!=0||b!=0) { n=(int)pow(10,k); if(a%n==b%n) prin原创 2013-02-02 14:48:37 · 224 阅读 · 0 评论 -
九度教程第38题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=37C语言源码:#includeint main(){ int n; while(scanf("%d",&n)!=EOF) { if(n>0&&n<10) { if((n*n)%10==n) printf("Yes!\n"); else prin原创 2013-02-02 15:01:50 · 183 阅读 · 0 评论 -
九度教程第40题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=39C语言源码:#includeint is(int a,int b){ if((a%10==b/1000)&&(a/10%10==b%1000/100)&&(a/100%10==b%100/10)&&(a/1000==b%10)) return 1; else return原创 2013-02-02 15:50:02 · 278 阅读 · 0 评论 -
九度教程第42题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=41C语言源码:#includeint root(int n){ int num=0; while(n) { num+=n%10; n/=10; } return num;}int main(){ int n,i; char s[1000]; scanf("原创 2013-02-02 16:39:02 · 329 阅读 · 0 评论 -
九度教程第13题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=12C语言源码:#includeint a[10001];int main(){ int i,n,m,low,high,j; while(scanf("%d %d",&n,&m)!=EOF) { for(i=0;i<=n;i++) a[i]=1; for(i=1;i原创 2013-01-17 16:16:09 · 172 阅读 · 0 评论 -
九度教程第17题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=16C语言源码:#includeint main(){ int a[201],n,i,x; while(scanf("%d",&n)!=EOF) { for(i=0;i<n;i++) scanf("%d",&a[i]); scanf("%d",&x); i=0;原创 2013-01-17 19:27:36 · 188 阅读 · 0 评论 -
九度教程第18题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=17C语言源码:#include#includetypedef struct student{ char number[100],name[100],gender[100],age[100];//数组要开大,要不过不了}student;int main(){ int n,i,原创 2013-01-17 21:36:20 · 193 阅读 · 0 评论 -
九度教程第23题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=22C语言源码:#include#includeint cmp(const void *a,const void *b){ return *(double *)a-*(double *)b;}int main(){ int c,n,v,w,i,num; double p[1原创 2013-01-18 09:21:08 · 232 阅读 · 0 评论 -
九度教程第24题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=23C语言源码:#include#includeint cmp(const void *a,const void *b){ return *(int *)a>*(int *)b?-1:1;}int main(){ int i,n,a[601],L,len; while(sc原创 2013-01-18 09:53:16 · 230 阅读 · 0 评论 -
九度教程第45题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=44C语言源码:#include#includeint main(){ char s[40]; int a[40],t[200],i,len,k,x,top,b[40]; while(scanf("%s",s)!=EOF) { top=0; k=0; getchar原创 2013-02-03 14:16:08 · 320 阅读 · 0 评论 -
九度教程第46题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=45C语言源码:#includeint main(){ int a[8],n,i,top; while(scanf("%d",&n)!=EOF) { top=0; if(n==0) printf("0\n"); else { while(n) {原创 2013-02-03 14:26:22 · 271 阅读 · 0 评论 -
九度教程第48题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=47C语言源码:#includeint max(int a,int b){ if(b==0) return a; else return max(b,a%b);}int main(){ int a,b,c; while(scanf("%d %d",&a,&b)!=E原创 2013-02-03 14:58:42 · 292 阅读 · 0 评论 -
九度教程第49题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=48C语言源码:#include#includelong long gcd(long long a,int b){ return b==0?a:gcd(b,a%b);}int main(){ long long n,m,s,a,i; while(scanf("%lld",&原创 2013-02-03 15:24:59 · 113 阅读 · 0 评论 -
九度教程第49题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=48C语言源码:#include#includelong long gcd(long long a,int b){ return b==0?a:gcd(b,a%b);}int main(){ long long n,m,s,a,i; while(scanf("%lld"原创 2013-02-03 15:25:19 · 200 阅读 · 0 评论 -
九度教程第50题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=49C语言源码:#include#includeint judge(int n){ int i; i=2; while(i<=(int)sqrt(n)) { if(n/i*i==n) return 0; i++; } return 1;}int main原创 2013-02-03 15:36:36 · 171 阅读 · 0 评论 -
九度教程第52题
题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=51C语言源码:#includeint s[10005],top;void pri(){ int i,num; s[top++]=2; num=3; while(top<10000) { for(i=0;i<top;i++) if(num/s[i]*s[i]==nu原创 2013-02-03 17:14:57 · 207 阅读 · 0 评论
分享