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

直接暴力都能过啊

Posted by yygy at 2010-01-19 16:00:52 on Problem 3690
我是把每一个星座弄成一维的
拿第一个数据来说吧
3 3 2 2 2
*00
0**
*00

**
00

*0
**
把** 弄成**00插入Trie树中,对*0也做同样处理,然后做一下AC自动机
  00                       **
然后把*00弄成好多个n*p的矩形行行遍历。
     0**
     *00
这样的复杂度最坏应该是n*m*p最多有50000000吧,不过还是让我给过了
RP比较好

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