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

o(n)的不会超啊

Posted by majia5 at 2008-10-09 16:32:15 on Problem 1936
In Reply To:为什么总是超时??? Posted by:dingdongsheng at 2008-10-09 15:11:19
lenb=strlen(b);
lena=strlen(a);
for(i=cur=0;i<len;i++)if(b[i]==a[cur])cur++;
printf("%s",cur==lena?"Yes":"No");

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