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 gemenhao at 2006-03-02 18:26:59 on Problem 1032
In Reply To:看看还能比这个简单么? 我瞎蒙的.... Posted by:jessekidddd at 2006-01-18 12:25:59
#include<stdio.h>
int main()
{
	int n,m,b,s;
	scanf("%d",&n);
	b=m=2,s=2-n;
	while(s+1<=-m) s+=++m;
	if(s<1-m) b++,s+=m++-1;
	for(n=b;n<=m;n++)
	printf("%d ",n>s+m?n+1:n); 
	return 0;
}
我这个简单多了,速度略慢!

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