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

WA PE OLE 最后终于过了,不容易啊,原来少了个空格T-T

Posted by 15700764631 at 2016-01-01 11:13:48 on Problem 1939
#include"stdio.h"
int main()
{
	double a[5000],b[5000];
	int i,j,n;
	while(scanf("%d",&n)!=EOF)
	{
		for(i=0;i<n;i++)
			scanf("%lf%lf",&a[i],&b[i]);
		printf("%d ",n);
		for(i=0;i<n;i++)
		{
			j=i+1;
			if(j==n)j=0;
			printf("%lf %lf ",(a[i]+a[j])/2,(b[i]+b[j])/2);	
		}
		printf("\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