题意:给你平面上3个不同的点A,B,C,问你能否通过找到一个旋转中心,使得平面绕该点旋转任意角度后,A到原先B的位置,B到原先C的位置。

只要A,B,C构成等腰三角形,且B为上顶点。那么其外接圆圆心即是一个合法的旋转中心。画个图很显然。

注意A,B,C三点共线时不可。

#include<cstdio>
using namespace std;
typedef long long ll;
struct Point{
ll x,y;
Point(const ll &x,const ll &y){
this->x=x;
this->y=y;
}
Point(){}
ll len2(){
return x*x+y*y;
}
void read(){
scanf("%I64d%I64d",&x,&y);
}
}a,b,c;
typedef Point Vector;
Vector operator - (const Point &a,const Point &b){
return Vector(a.x-b.x,a.y-b.y);
}
ll Cross(const Vector &a,const Vector &b){
return a.x*b.y-a.y*b.x;
}
int main(){
a.read();
b.read();
c.read();
if((a-b).len2()==(c-b).len2() && Cross(a-b,b-c)!=0){
puts("Yes");
}
else{
puts("No");
}
return 0;
}

【推导】Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) B. Arpa and an exam about geometry的更多相关文章

  1. 【推导】【暴力】Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) C. Five Dimensional Points

    题意:给你五维空间内n个点,问你有多少个点不是坏点. 坏点定义:如果对于某个点A,存在点B,C,使得角BAC为锐角,那么A是坏点. 结论:如果n维空间内已经存在2*n+1个点,那么再往里面添加任意多个 ...

  2. D. Arpa and a list of numbers Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)

    http://codeforces.com/contest/851/problem/D 分区间操作 #include <cstdio> #include <cstdlib> # ...

  3. Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)ABCD

    A. Arpa and a research in Mexican wave time limit per test 1 second memory limit per test 256 megaby ...

  4. Codeforces Round #432 (Div. 1, based on IndiaHacks Final Round 2017) D. Tournament Construction(dp + 构造)

    题意 一个竞赛图的度数集合是由该竞赛图中每个点的出度所构成的集合. 现给定一个 \(m\) 个元素的集合,第 \(i\) 个元素是 \(a_i\) .(此处集合已经去重) 判断其是否是一个竞赛图的度数 ...

  5. 【前缀和】【枚举倍数】 Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) D. Arpa and a list of numbers

    题意:给你n个数,一次操作可以选一个数delete,代价为x:或者选一个数+1,代价y.你可以进行这两种操作任意次,让你在最小的代价下,使得所有数的GCD不为1(如果全删光也视作合法). 我们从1到m ...

  6. Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) D

    Arpa has found a list containing n numbers. He calls a list bad if and only if it is not empty and g ...

  7. Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) C

    You are given set of n points in 5-dimensional space. The points are labeled from 1 to n. No two poi ...

  8. Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) B

    Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a,  ...

  9. Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) A

    Arpa is researching the Mexican wave. There are n spectators in the stadium, labeled from 1 to n. Th ...

随机推荐

  1. Windows下基于python3使用word2vec训练中文维基百科语料(一)

    在进行自然语言处理之前,首先需要一个语料,这里选择维基百科中文语料,由于维基百科是 .xml.bz2文件,所以要将其转换成.txt文件,下面就是相关步骤: 步骤一:下载维基百科中文语料 https:/ ...

  2. setsockopt 详解

    1. closesocket(一般不会立即关闭而经历TIME_WAIT的过程)后想继续重用该socket: BOOL bReuseaddr=TRUE; setsockopt(s,SOL_SOCKET  ...

  3. mysql in/no in/like

    % 任意字符 _ 任意一个字符 in (value,......) 在这里 not in (value,......) 不在这里 mysql> select 'a' not in (1,2,3, ...

  4. windows下常用快捷键(转)

    原文转自 https://blog.csdn.net/LJFPHP/article/details/78818696 win+E                 打开文件管器 win+D        ...

  5. Laravel 5.2 整合 Uploadify 上传图片

    前端: <!-- 引入CSS.JS --> <link rel="stylesheet" type="text/css" href=" ...

  6. OpenRCT2-ext

    https://github.com/RollingStar/RCT-Music-Patch https://github.com/seanfisk/rct2-game-objects https:/ ...

  7. 阿波罗11号登月飞船电脑控制系统源码(AGC)

    阿波罗11号登月飞船电脑控制系统源码(AGC) http://download.csdn.net/detail/downiis6/9574926 down url: https://github.co ...

  8. python string 对齐文本的几个方法

    用rjust().ljust()和center()方法对齐文本

  9. 集合类---Map

    Map常用的子类: 一.HashMap详解  1.特点 1)线程不安全.如果想要得到线程安全的HashMap,可以使用Collections的静态方法:Map map = Collections.sy ...

  10. 【模板】SPOJ FACT0 大数分解 miller-rabin & pollard-rho

    http://www.spoj.com/problems/FACT0/en/ 给一个小于1e15的数,将他分解. miller-rabin & pollard-rho模板 #include & ...