Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

AC了 , 说说我的思想。

Posted by jiangliwu at 2012-04-16 09:37:09 on Problem 2600
1.先设定一个起点, 求得最后一个点后与起点比较。
2.如果不行, 取他们中点作为起点继续1步。
3.知道两个精度

我用复数旋转,毫无压力。
point getnp(point ori, point cen, double angle)  //向量cen->ori绕cen旋转逆时针旋转angle弧度
{
	//复数平面向量旋转
	point v;
	v.x = ori.x - cen.x;
	v.y = ori.y - cen.y;
	point res;
	res.x = v.x*cos(angle) - v.y*sin(angle) + cen.x;
	res.y = v.x*sin(angle) + v.y*cos(angle) + cen.y;
	return res;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator