CF975E Hag's Khashba

题目描述

按逆时针顺序给出一个凸多边形的 n 个顶点,初始第 1,2 个顶点被钉在了墙上 一共有 q 个操作,操作分为两种: 1 f t:解除第 f 个点的钉子,待图形在重力的作用下平衡之后,在第 t 个点处钉上一颗钉子 2 v:询问当第 v 个点的坐标。

输入格式

第一行两个整数 n (n

输出格式

对于每次询问输出两个实数表示坐标。 若您的答案为a,标准答案为b,则当a,b满足 ![](https://upload.cc/i1/2020/01/18/PlXTLV.png) 时可通过测试点。 **【样例解释】** 图中红色三角形为初始状态,绿色三角形是绕点(2,0)旋转后的三角形

说明/提示

In the first test note the initial and the final state of the wooden polygon. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF975E/f8978da0d59e4f05456975859a255315f1ec8aa6.png)Red Triangle is the initial state and the green one is the triangle after rotation around $ (2,0) $ . In the second sample note that the polygon rotates $ 180 $ degrees counter-clockwise or clockwise direction (it does not matter), because Hag's father makes sure that the polygon is stable and his son does not trick him.