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 bellbird at 2009-10-04 17:54:40 on Problem 1014 and last updated at 2009-10-04 18:35:06
    首先取模算法都是模一个偶数,设为2n,那么构造数据2n+1 0 1 0 0 0,显然是可分的,但是取模算法会得到不可分的结果,虽然也能ac
    建议改用   if(a[i]>6) a[i]=a[i]%6+6

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