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 |
memset比循环快,这种情况可能是你的数组开的很大,对于每组case,memset要全部清空,而循环只需要清0 to m+1,case数很多时memset就超时了In Reply To:奇怪ing!!!! Posted by:windbells at 2004-11-04 16:49:03 > 这样写memset(num[i%2],0,sizeof(num[i%2]));超时 > > 改为这样就AC了 > for(j=0;j<=m+1;j++) > num[i%2][j][0]=num[i%2][j][1]=0; > why??????? > Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator