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

终于AC!贡献基本思路

Posted by wlh_flame at 2008-09-30 17:18:23 on Problem 1009
使用的方法比较垃圾,代码量很大,考虑到时间限制仅仅进行了两个方向的优化:

1. 行方向上的稳定图像(即相对值不需要改动的情况)
如:
i行:  ...AAAAAAAAAAAAAAAAAAAAAAAAA...
i+1行:...BBBBBBBBBBBBBBBBBBBBBBBBB...
i+2行:...CCCCCCCCCCCCCCCCCCCCCCCCC...
含有这种模块的可以跳过计算,加速

2. 连续的图像块,较大如:
i行:    ...开始为A
i+1行:  全是A
若干行:  ...
i+x行:  全是A
i+x+1行:停止为连续的A..

这种情况,内部相对编码的结果都是0

其他情况则必须计算编码结果(各个方向上差的绝对值的最大值)。

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