Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
我也是啊,不过我用pascalIn Reply To:在自己的机器上很对啊 为什么总是Runtime Error? Posted by:00412088 at 2005-03-05 03:17:14 > C语言的: > > #include<stdio.h> > #include<stdlib.h> > > main() > { > int n,i,j; > int **d; > scanf("%d",&n); > d=malloc(n*sizeof(int *)); > for(i=0;i<n;i++) > { > d[i]=malloc(i*sizeof(int)); > for(j=0;j<=i;j++) > scanf("%d",&d[i][j]); > } > for(i=n-2;i>=0;i--) > for(j=0;j<=i;j++) > d[i][j] += d[i+1][j]>d[i+1][j+1]?d[i+1][j]:d[i+1][j+1]; > printf("%d\n",**d); > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator