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

一点想法

Posted by HEU_Archer at 2009-09-12 08:46:50 on Problem 3401
我们可以定义一个合法序列S(也就是能最后消除成一个字符的序列):
1."A"和"B"是合法的
2.如果S是合法的,那么ASA和BSB是合法的,最后剩下的字符就和S剩下的字符一样
3.如果S1,S2和S3是合法的,并且S1与S3最后剩下的字符相等,那么S1S2S3是合法的,最后剩下的字符就和S2剩下的字符一样

接着我们可以通过上述规则进行dp
数据比较弱,写了2个程序一个错误的也能ac

提供一个数据:
abababbbb
1

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