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:如果MME

Posted by woniuAC at 2009-08-25 16:31:29 on Problem 1159
In Reply To:Re:如果MME Posted by:runformydream at 2009-08-20 10:24:11
> 这种方法确实不错,但是写的时候如果按常规的话,会MME
> 所以可以用滚动数组来实现避免MME
> if(p[i]==s[j]){
>                      data[i%2][j]=data[(i-1)%2][j-1]+1;
>                  }else{
>                      data[i%2][j]=max(data[i%2][j-1],data[(i-1)%2][j]);
>                  }
> 这样只要开到data[2][N]就可以了
无限ORZ!!!!!!!!!!!!!

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