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 |
dp. 内附详解。已知 (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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator