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 |
铁一般的事实证明:string库中的memset不比自己写的快。自己写的: 1.void memset(char *a,char b,int c){while (c--)*(a++)=b;} 344ms Accepted 2.void memset(char *a,char b,int c){for (int i=0;i<c;i++)a[i]=b;} 344ms Accepted 用string库: #include <string.h> 360ms Accepted Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator