Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

铁一般的事实证明:string库中的memset不比自己写的快。

Posted by NeverWin at 2008-10-09 20:51:16 on Problem 1089
自己写的:
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator