?? 1480.cpp
字號:
/* This Code is Submitted by wywcgs for Problem 1480 on 2006-01-12 at 04:48:09 */
#include <cstdio>
int main()
{
double b[2], c[2], n[2];
int i, m;
while(scanf("%d", &m) != EOF) {
scanf("%lf %lf", &b[0], &b[1]);
c[0] = b[0]; c[1] = b[1];
printf("%d", m);
for(i = 0; i < m; i++) {
if(i != m-1) scanf("%lf %lf", &n[0], &n[1]);
else n[0] = b[0], n[1] = b[1];
printf(" %.6lf %.6lf", (n[0]+c[0])/2, (n[1]+c[1])/2);
c[0] = n[0]; c[1] = n[1];
}
putchar('\n');
}
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -