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

Re:取模的方法是错的,无论对多少取摸,给个简单的反例

Posted by glancer_bupt at 2010-03-24 23:30:51 on Problem 1014
In Reply To:取模的方法是错的,无论对多少取摸,给个简单的反例 Posted by:dashashi at 2009-12-07 15:42:13
我说呢,一直在想,这个模是如何确定的——就是想不出来!


> 假设对K取模。如果K是偶数,那么对于数据K+1 0 1 0 0 0,取模之后是无法分割的,但是实际上是可以的。答案是K/2+2。
> 
> 如果K是奇数(显然是不行的……也给个简单的反例),那么对于K+1 1 0 0 0 0,取模之后无法分割,答案也是K/2+2,(不过这里的K/2是把多出来的0.5舍去了的)
> 是测试数据太弱了

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