Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
AC了 , 说说我的思想。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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator