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 |
好爽!!其实这题dfs可以过,我的就是,16ms,最重要的是中间加一步剪枝就是如果当前string 1 的pos == string 2 待检测的pos (也就是上次检查的pos+1),就一定匹配,直接pos++,检查下一个元素.. Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator