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 |
RE了无数次了!!!!大侠帮帮忙啊,是不是数据很变态哦????用的long long还是一样--!! #include<stdio.h> #include<stdlib.h> #define MIN(a,b) a<b?a:b #define MAX(a,b) a>b?a:b long long int DP_backpack(int* ,int,int,long long int**); int main() { int N,C; int* w; long long int **m; long long int max; int i=0; scanf("%d%d",&N,&C); w = (int*)malloc((N+1)*sizeof(int)); memset(w,0x00,sizeof(w)); m = (long long int**)malloc((N+1)*sizeof(long long int*)); for(i=0;i<=N;++i) { if(i>=1) scanf("%d",w+i); m[i] = (long long int*)malloc((C+1)*sizeof(long long int)); } memset(m,0x00,sizeof(m)); max = DP_backpack(w,C,N,m); //printf("%-I64d\n",max); 怎么这输出就RE,不输出就WA!!!! free(w); free(m); return 0; } DP_backpack(w,C,N,m){...} Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator