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 hitrose at 2010-10-20 15:05:51 on Problem 1283
DP计算好之后利用矩阵压缩,因为计算出来的矩阵式下三角矩阵,可以用一个一维数组保存数据,下标的转换算式:D[i,j] = D[i*(i-1)/2+j].
这样能节省一半的空间~
AC之后320K 0ms~

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