用几何模板敲的,也有直接公式推的,追求短代码的可以点右上角小红了......

题意就是想想一个物体分别做绕某一点(给出坐标)旋转p度(给出角度)后,其位置等价于绕哪一点旋转多少度,输出该等价点及其等价角度。

其实就是找两个定点,然后看这两个定点旋转后到了哪,分别连接原点与旋转后的点会得到两条线段,两条线段垂直平分线的交点即是等价后绕其旋转的点,再将该交点与任一原点及其旋转后的点连接得到的夹角(咖啡色角)即等价后的旋转角度。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnMAAAGXCAIAAABX70FQAAAgAElEQVR4nO2dP28dN9a4b/fL2+xCNtItYsAQlAQJ0mynHwK1DmDghSwsrCK1AXUyFGyxKe6nSJE2yRcwbBdbqUrnzl/Cxe4HUDVvwZih+O9yZjhzDjkPIQi2HpHDmXulo2fIOWe33+/v7u7Cz2dnZ9GvQ+vSvz74u8JZQaFQKHQy3Q2Jdnd3l0LQivTq+r3CWUGhUCh0Mk1G1v1+nxkRWos+On4hclwoFAqFLkRxVmGKs7ZOr67fnz15d/bknapZQaFQQYqzClOctWl69uTdo+MXmciqcM5QKHRpirMKU5y1aXr25J111ugHry8UukGKswpTnLVp6jpr9AOjhUI3SHFWYYrTNE1LnNX+W8mcoVDo0hRnFaY4a9O03FmjkXWJWZljKbxWUOh2KM4qTHHWpmnorN43rOysrO9CoRrobq8pb8UGKTmYmqZX1+//+uDvV9fvHx2/SL2+hl5dv19hVvZYvK+gUEGKswpT3KJp6jpr9BvWX2c1x1J4raDQ7VDWWYUp66xN0/zuX5F1VigUKk5xVmGKszZNU87K3mAodMsUZxWmOGvTNHTW6N5g+3UNc4ZCoUtTnFWY4qxNU89Z88+zhvKq8IygUOh8irMKU5y1aTrqedYwuCo8IygUOp/irMIUZ22aZnIwuX1TcVfhGUGh0PkUZxWmOGvT1FtnDe/3en29yKrwjKBQ6HyKswpTnLVpevB51rAvzgqFdk/JwSRMyZXTND2Ygynsa3Ikmc8KzwgKhc6nOKswxVmbpmOdlXVWKHQLlHVWYco6a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CFGeFmoazQqHdUJxVmOKsUNNwVii0G4qzClOcFWoazgqFdkNxVmGKs0JNw1mh0G4ozipMcVaoaTgrFNoNJQeTMCUHE/SPdwI5mKDQXijOKkxxVqhpOCsU2g1lnVWYss4KNY11Vii0G4qzClOcFWoazgqFdkNxVmGKs0JNw1mh0G4ozipMcVaoaTgrFNoNxVmFKc4KNQ1nhUK7oTirMMVZoabhrFBoNxRnFaY4K9Q0nBUK7YbirMIUZ4WahrNCod1QcjAJU3IwQf94J5CDCQrtheKswhRnhZqGs0Kh3VDWWYUp66xQ01hnhUK7oTirMMVZoabhrFBoNxRnFaY4K9Q0nBUK7YbirMIUZ4WahrNCod1QnFWY4qxQ03BWKLQbirMKU5wVahrOCoV2Q3FWYYqzQk3DWaHQbijOKkxxVqhpOCsU2g0lB5MwJQcT9I93AjmYoNBeKM4qTHFW6BATVg2zgkKh0yjrrMKUdVbokIis4rOCQqHTKM4qTHFW6ICzQqF9UZxVmOKs0AFnhUL7ojirMMVZoQPOCoX2RXFWYYqzQgecFQrti/4fvOoZOGuspfAAAAAASUVORK5CYII=" alt="" />

附代码

 #include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
using namespace std;
#define ll long long
#define _cle(m, a) memset(m, a, sizeof(m))
#define repu(i, a, b) for(int i = a; i < b; i++)
#define repd(i, a, b) for(int i = b; i >= a; i--)
#define sfi(n) scanf("%d", &n)
#define sfl(n) scanf("%lld", &n)
#define pfi(n) printf("%d\n", n)
#define pfl(n) printf("%lld\n", n)
#define MAXN 6005
const double eps = 1e-;
const double inf = 1e50;
const double pi = acos(-1.0);
struct point
{
double x, y;
point() {}
point(double _x, double _y) : x(_x), y(_y) {}
point operator - (const point& ne) const
{
return point(x-ne.x, y-ne.y);
}
point operator + (const point& ne) const
{
return point(x+ne.x, y+ne.y);
}
};
struct line
{
point a, b;
line() {}
line(point _a, point _b):a(_a), b(_b) {}
};
point Rotate(point o, point p, double alpha) 求点o绕点o旋转alpha度(弧度)后的坐标值
{
point tp;
p.x -= o.x;
p.y -= o.y;
tp.x = p.x * cos(alpha) - p.y * sin(alpha) + o.x;
tp.y = p.y * cos(alpha) + p.x * sin(alpha) + o.y;
return tp;
} double len(point p1, point p2)
{
return (p1.x*p1.x-p2.x*p2.x)+(p1.y*p1.y-p2.y*p2.y);
}
point solve(point p11, point p12, point p21, point p22) //解方程就中垂线交点
{
double k1 = len(p11, p12);
double k2 = len(p21, p22);
if(fabs(p11.y - p12.y) < eps)
{
double a = (p11.x+p12.x)/;
double b = p11.y;
return point(a, b);
}
double tmp1 = (p21.y-p22.y)/(p11.y-p12.y);
double res1 = (k2/) - (k1/)*tmp1;
double tmp2 = (p21.x-p22.x) - (p11.x-p12.x)*tmp1;
double a = res1 / tmp2;
double b = ((k1/) - a*(p11.x-p12.x)) / (p11.y - p12.y);
return point(a, b);
}
inline double dmult(point a, point b)
{
return a.x * b.x + a.y * b.y;
}
inline double xmult(point o,point a,point b)
{
return (a.x - o.x) * (b.y - o.y) - (b.x - o.x)*(a.y - o.y);
}
double angle(point o, point s, point e) //求两线段夹角
{
point os = s-o, oe = e-o;
double bot = sqrt(dmult(os, os) * dmult(oe, oe));
double top = dmult(os, oe);
double cosfi = top/bot;
if(cosfi >= 1.0) return ;
if(cosfi <= -1.0) return -pi;
double fi = acos(cosfi);
if(xmult(o, s, e) > ) return fi;
else return *pi-fi;
}
double lsangle(line u, line v)
{
point o(, ), a = u.b - u.a, b = v.b - v.a;
return angle(o, a, b);
}
int main()
{
int T; scanf("%d", &T);
while(T--)
{
int n; scanf("%d", &n); point p1(-, ), p2(, -), p3(, ); //其实取两个点就可以了
point t1(-, ), t2(, -), t3(, );
double pp;
for(int i = ; i < n; i++)
{
double x, y, p;
scanf("%lf%lf%lf", &x, &y, &p);
if(fabs(p-0.0) < eps) continue;
point o(x, y);
p1 = Rotate(o, p1, p);
p2 = Rotate(o, p2, p);
p3 = Rotate(o, p3, p);
//printf("%lf %lf\n", p3.x, p3.y);
//pp += p;
}
if(fabs(p1.x - t1.x) < eps && fabs(p1.y - t1.y) < eps &&
fabs(p2.x - t2.x) < eps && fabs(p2.y - t2.y) < eps &&
fabs(p3.x - t3.x) < eps && fabs(p3.y - t3.y) < eps)
{
printf("%.10lf %.10lf %.10lf\n", 0.0, 0.0, 0.0);
continue;
}
point ans1 = solve(t1, p1, t2, p2);
if(fabs(ans1.x - 0.0) < eps) ans1.x = ;
if(fabs(ans1.y - 0.0) < eps) ans1.y = ;
//printf("%.10lf %.10lf %.10lf\n", ans1.x, ans1.y, pp);
line l1(ans1, t1), l2(ans1, p1);
double ang = lsangle(l1, l2);
printf("%.10lf %.10lf %.10lf\n", ans1.x, ans1.y, ang);
}
return ;
}

【几何模板加点小思路】hdu-4998 Rotate的更多相关文章

  1. HDU 4998 Rotate (计算几何)

    HDU 4998 Rotate (计算几何) 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=4998 Description Noting is more ...

  2. HDU 4998 Rotate --几何

    题意:给n个点(x,y,p),从1~n,一次每次所有点绕着第 i 个点(原来的)逆时针转pi个弧度,问最后所有点的位置相当于绕哪个点旋转多少弧度,求出那点X和弧度P 解法:直接模拟旋转,每次计算新的坐 ...

  3. HDU 4998 Rotate

    题意: n次旋转  每次平面绕ai点旋转pi弧度  问  最后状态相当于初始状态绕A点旋转P弧度  A和P是多少 思路: 如果初始X点的最后状态为X'点  则圆心一定在X和X'连线的垂直平分线上  那 ...

  4. hdu 4998 Rotate 点的旋转 银牌题

    Rotate Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Subm ...

  5. 过WAF的小思路

    过WAF的小思路 前言 最近在学习了一波CMS漏洞,尝试看了几个菠菜站,有宝塔WAF...向WHOAMI大佬取经回来后,绕过了一个WAF.觉得是时候要认真总结一下了:) 前期的过程 菠菜采用的是Thi ...

  6. HDU 5120 Intersection(几何模板题)

    题意:给定两个圆环,求两个圆环相交的面积. 思路:由于圆心和半径不一样,分了好多种情况,后来发现只要把两个圆相交的函数写好之后就不需要那么复杂了.两个圆相交的面积的模板如下: double area_ ...

  7. HDU 4998 (点的旋转) Rotate

    为了寻找等效旋转操作,我们任选两个点P0和Q0,分别绕这n个点旋转一定的角度后最终得到Pn和Qn 然后已知:P0和Pn共圆,Q0和Qn共圆.所以要找的等效旋转点就是这两个线段的垂直平分线交点O. 等效 ...

  8. hdu 4998

    http://acm.hdu.edu.cn/showproblem.php?pid=4998 这道题,在比赛的时候看了很久,才明白题目的大意.都怪自己不好好学习英语.后来经过队友翻译才懂是什么意思. ...

  9. 抓起根本(二)(hdu 4554 叛逆的小明 hdu 1002 A + B Problem II,数字的转化(反转),大数的加法......)

    数字的反转: 就是将数字倒着存下来而已.(*^__^*) 嘻嘻…… 大致思路:将数字一位一位取出来,存在一个数组里面,然后再将其变成数字,输出. 详见代码. while (a) //将每位数字取出来, ...

随机推荐

  1. poj 1543 Perfect Cubes(注意剪枝)

    Perfect Cubes Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 14901   Accepted: 7804 De ...

  2. js获取服务端IP及端口及协议

    alert("location:"+window.location); alert("href: "+window.location.href); alert( ...

  3. 利用hashtable和time函数加速Lisp程序

    程序功能是从一个英文文本中得到单词表,再得到押韵词表.即输出可能这样开始: a ameoeba alba samba marimba... 这样结束: ...megahertz gigahertz j ...

  4. POJ 1860 Currency Exchange (SPFA松弛)

    题目链接:http://poj.org/problem?id=1860 题意是给你n种货币,下面m种交换的方式,拥有第s种货币V元.问你最后经过任意转换可不可能有升值.下面给你货币u和货币v,r1是u ...

  5. 网络复习之TCP

    可靠传输的工作原理 1 停止等待协议 每发送完一个分组,就停止发送,等待对方确认.出现差错,超时重传.     1.1 暂时保留已发送的分组的副本     1.2 分组和确认分组必须进行编号     ...

  6. opennebula虚拟机启动失败

    问题1 故障现象: Wed Jan :: [DiM][I]: New VM state is ACTIVE. Wed Jan :: [LCM][I]: New VM state is PROLOG. ...

  7. ios8,xcode6 周边

    NSBundle.mainBundle().infoDictionary iOS 8中带按钮的推送代码 ") ){ application.registerForRemoteNotifica ...

  8. Oracle DataGuard 物理Standby 搭建(上)

    物理standby database 环境搭建 Arch asysnc Oracle Dataguard host IP Oracle_sid DB_unique_name FAL_server FA ...

  9. 解决用Eclipse开发Android程序时不能生成R.java的问题

    今天我照着Mars老师的视频教程开始学习Android程序开发. 但是,我的Eclipse死活不能生成R.java文件,新建的工程也不行. 然后我百度,百度出来的结果一般是说这样解决: 1.clean ...

  10. Codeforces Round #328 (Div. 2) C. The Big Race 数学.lcm

    C. The Big Race Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/592/probl ...