#include <iostream>
#include <iomanip>
#define MAXN 1000
using namespace std; struct node
{
double x;
double y;
}; node _node[MAXN]; double fun(double a,double b);
int main()
{
//freopen("acm.acm","r",stdin);
int n;
int i;
double tem_x;
double tem_y;
double x;
double y;
int sum;
while(cin>>n)
{
tem_x = ;
tem_y = ; for(i = ; i < n; ++ i)
{
cin>>_node[i].x;
cin>>_node[i].y;
} for(i = ; i < n-; ++ i)
{
if(i % == )
{
tem_x -= _node[i].x;
tem_y -= _node[i].y;
}
else
{
tem_x += _node[i].x;
tem_y += _node[i].y;
}
} tem_x *= ;
tem_y *= ;
x = fun(_node[n-].x*,-tem_x);
y = fun(_node[n-].y*,-tem_y);
cout<<n<<" ";
cout<<setiosflags(ios::fixed)<<setprecision()<<x<<" "<<y<<" ";
x = _node[].x* - x;
y = _node[].y* - y;
for(i = ; i < n; ++ i)
{
cout<<setiosflags(ios::fixed)<<setprecision()<<x<<" "<<y<<" ";
x = _node[i].x* - x;
y = _node[i].y* - y;
}
cout<<endl;
}
} double fun(double a,double b)
{
return (a+b)/2.0;
}
关注我的公众号,当然,如果你对Java, Scala, Python等技术经验,以及编程日记,感兴趣的话。
技术网站地址: vmfor.com