| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
WA PE OLE 最后终于过了,不容易啊,原来少了个空格T-T#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator