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

dp. 内附详解。

Posted by denghongchao at 2009-09-05 08:47:38 on Problem 1745
已知 (a+b)%m = (a%m + b%m)%m;
用f[i-1][j] 表示前i-1行  出现过j 这个数。因为 m<=100. 用0 - 200 表示 -100 - +100;
由f[i-1][j] 可得 f[i][(j-100 + a[i]%m)%m + 100] = true;

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