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

300题留念,谈谈做法

Posted by uncia at 2012-08-21 23:14:22 on Problem 3467
正宗做法貌似是线段树,感觉那样做每个更新复杂度为nlogn,而且不太好维护因此直接搞了,每种颜色分开搞,开始先统计出每种颜色方案数。由于某个元素颜色改变只会影响以当前行和当前列的元素为中心的cross,因此只需更新这些点变化后cross数目发生的改变即可
代码:http://shaidaima.com/source/view/11148

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