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

Re:WA的同学看看下面这样的数据对吗?

Posted by xinghun4 at 2007-09-09 16:32:40 on Problem 2406
In Reply To:WA的同学看看下面这样的数据对吗? Posted by:amisleeping at 2007-08-12 20:49:38
> ab
> aaab
> 本人WA就是因为没有考虑 next[len],和len 对应的字符是否相等的情况.
> 第二组数据中
> 
> next[1]=0;
> next[2]=1;
> next[3]=2;
> next[4]=3;
> 因为 4,和 next[4]=3,所对应的字符不相等,所以不能用 len/(len-next[len])得到结果,如果不相等应该输出1.
非常感谢你的提示,wa很久了,终于ac啦

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