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 sjb358714 at 2010-08-07 09:51:56 on Problem 1032
生成方法:
5 = 2+3;
6 = 2+4;
7 = 3+4;
8 = 3+5;
9 = 2+3+4;
.
.
.
//以5 = 2+3为基础生成6,考虑将1加到哪个数字上,
1. 因为不能重复所以每次就找相差为二的数(6=2+4,加到2上),
2. 如果找不到就加到最大那个数上(5=2+3,加到3上),
3. 再者如果最小的数是3,且找到的相差为二的数是最大的更次大的,则将最大的减1,末尾补个2(如:8=3+5,9=2+3+4)。

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