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 cycpp at 2008-07-24 19:15:18 on Problem 3665
In Reply To:题目的意思!============================================================================ Posted by:majia5 at 2008-07-24 18:23:15
> 如果可以平均分给n-1个,那么就平均分,如果不能(有余数)
> 那么先平均分(取整就好了),然后把剩下的余数拿去从1...n开始分,注意这里说的played是这首歌,所以别开什么bool数组来标记饿.
> 还有如果余数比较多可能要循环的加
> 如果余数是3
> 对于
> 1
> 2
> 0<--played
> 来说
> 2
> 3
> 0<--played
> 显然余数还有1
> 那么就加到第一个,循环加
> 3
> 3
> 0<--played

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