跳到正文

题解

题解:P10520 [XJTUPC2024] 榕树之心

science94约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年10月29日
篇幅
约 1 分钟
题目
P10520

版本

  1. v1当前

照着给出的公式写即可。

C++
#include<cstdio>
#include<cmath>
int a[200000];
int main(){
	double x_,y_;
	int x,y;
	scanf("%d %d",&x,&y);
	x_=x*0.5+y*0.5;
	y_=sqrt(3)/2*x-sqrt(3)/2*y;
	printf("%.6lf %.6lf",x_,y_);
	return 0;
}
原文