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 aoxboxcox at 2016-11-24 14:29:55 on Problem 3790
In Reply To:Re:hint Posted by:cz908640443 at 2012-11-27 16:54:40
(一)n为奇数的情况
显然只能拆出奇数个元素,且中间的元素必为奇数
(1)最中间数=1的情况
余下的左右两边放上(n-1)/2的所有拆法即可
(2)最中间数>=3的情况
把(n-2)的所有拆法里,最中间的数加2即可

(二)n为偶数的情况
(1)拆成偶数个元素
左右两边都是(n/2)的所有拆法
(2)拆成奇数个元素(最中间数必为偶数)
把(n-1)的所有拆法里,最中间的数加1即可

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