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:谁知道112B是怎么编的!(附148的,不能减了)

Posted by cxb24 at 2007-04-02 22:19:52 on Problem 1032
In Reply To:谁知道112B是怎么编的!(附148的,不能减了) Posted by:majia001 at 2006-07-11 16:52:19
> main(){int i,n,m=2,a[49];scanf("%d",&n);while((n-=a[m-2]=m++)>=0);for(i=m-=4;n+m+3;){a[i]++;n--;if(!i--)i=m;}for(i=-1;++i-m-1;)printf("%d ",a[i]);}

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