⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1481.cpp

📁 这是哈尔滨工业大学acmOJ的源代码
💻 CPP
字号:
/*  This Code is Submitted by wywcgs for Problem 1481 on 2006-01-12 at 05:05:13 */ 
#include <cstdio>

const int MAX = 256;

int main()
{
	int i, n;
	double x[MAX], y[MAX];
	
	while(scanf("%d", &n) != EOF) {
		double tx = 0, ty = 0;
		for(i = 0; i < n; i++) {
			scanf("%lf %lf", &x[i], &y[i]);
			tx += x[i]; ty += y[i];
			x[i] *= 2; y[i] *= 2;
		}
		for(i = 1; i < n; i += 2) tx -= x[i], ty -= y[i];
		printf("%d", n);
		for(i = 0; i < n; i++) {
			printf(" %.6lf %.6lf", tx, ty);
			tx = x[i] - tx; ty = y[i] - ty;
		}
		putchar('\n');
	}
	
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -