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 * n)

Posted by jingtianzi at 2009-08-17 18:21:24 on Problem 1159 and last updated at 2009-08-17 18:23:02
这个题目如果想过的话很容易了 , 
估计大家都想到了 , 
正反求一次最长公共子序列 ,
得字符串和它反串的最长公共子序列为 k ,
 要求添加的个数用n - k就是了!
由于int 5000*5000超了内存 ,
所以可用short 搞定,哈哈!(不推荐使用)

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