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不知是为什么,原来有这种原因导致RE我用归并排序 void Merge(int low,int mid,int high,char (*R)[50]) { int i=low,j=mid+1,k=0; char (*T)[50]=new char[high-low+1][50]; while(i<=mid&&j<=high){ strcpy(T[k++],(strcmp(R[i],R[j])<0)? R[i++]:R[j++]); } while(i<=mid){ strcpy(T[k++],R[i++]); } while(j<=high){ strcpy(T[k++],R[j++]); } for(i=low,k=0;i<=high;i++,k++){ strcpy(R[i],T[k]); } delete [] T; } delete [] T 没写所以RE了N次 对JudgeOnline这个编译系统不熟悉 经常RE不知是为什么,原来有这种原因导致RE Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator