【链接】h在这里写链接


【题意】


给你3个点A,B,C
问你能不能将纸绕着坐标轴上的一点旋转。使得A与B重合,B与C重合

【题解】


这3个点必须共圆。
则A,B,C不能为一条直线。否则无解。
共圆之后.角AOB必须等于角BOC.也即等价于|AB|=|AC|
(圆周角定理)
判断|AB|==|AC|之后,判断一下B是不是A和C的中点,就能排除在一条线上的情况。
(中点只会涉及到整数。可以避免double的误差)

【错的次数】


3

【反思】


能用整数判断,都尽量用整数判断。
整数不会有误差!

【代码】

/*

*/
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <cstdlib>
#include <cmath>
#include <bitset>
using namespace std;
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define rep1(i,a,b) for (int i = a;i <= b;i++)
#define rep2(i,a,b) for (int i = a;i >= b;i--)
#define mp make_pair
#define pb emplace_back
#define fi first
#define se second
#define ld long double
#define ms(x,y) memset(x,y,sizeof x)
#define ri(x) scanf("%d",&x)
#define rl(x) scanf("%lld",&x)
#define rs(x) scanf("%s",x)
#define rf(x) scnaf("%lf",&x)
#define oi(x) printf("%d",x)
#define ol(x) printf("%lld",x)
#define oc putchar(' ')
#define os(x) printf(x)
#define all(x) x.begin(),x.end()
#define Open() freopen("F:\\rush.txt","r",stdin)
#define Close() ios::sync_with_stdio(0)
#define sz(x) ((int) x.size())
#define ld long double typedef pair<int,int> pii;
typedef pair<LL,LL> pll; //mt19937 myrand(time(0));
//int get_rand(int n){return myrand()%n + 1;}
const int dx[9] = {0,1,-1,0,0,-1,-1,1,1};
const int dy[9] = {0,0,0,-1,1,-1,1,-1,1};
const double pi = acos(-1.0);
const int N = 110; LL ax,ay,bx,by,cx,cy; LL sqr(LL x){
    return x*x;
} LL dis(LL x1,LL y1,LL x2,LL y2){
    return sqr(x2-x1)+sqr(y2-y1);
} int main(){
    //Open();
    //Close();
    cin >> ax >> ay >> bx >> by >> cx >> cy;
    LL C = dis(ax,ay,bx,by);
    LL A = dis(bx,by,cx,cy);
    LL B = dis(ax,ay,cx,cy);
    if (C==A){
        if ( (ax+cx)==2*bx && (ay+cy)==2*by)
            puts("No");
        else
            puts("Yes");
    }else
        puts("No");
    return 0;
}

【Codeforces Round #432 (Div. 2) B】Arpa and an exam about geometry的更多相关文章

  1. 【Codeforces Round #432 (Div. 1) B】Arpa and a list of numbers

    [链接]h在这里写链接 [题意] 定义bad list是一个非空的.最大公约数为1的序列.给定一个序列,有两种操作:花费x将一个元素删除.花费y将一个元素加1,问你将这个序列变为good list所需 ...

  2. 【Codeforces Round #432 (Div. 2) A】 Arpa and a research in Mexican wave

    [链接]h在这里写链接 [题意] 在这里写题意 [题解] t<=k,输出t t>=n,输出k-t+n 其他情况都是k [错的次数] 0 [反思] 在这了写反思 [代码] /* */ #in ...

  3. 【Codeforces Round #432 (Div. 1) A】 Five Dimensional Points

    [链接]点击打开链接 [题意] 给你n个5维的点. 然后让你以其中的某一个点作为起点a. 另选两个点b,c. 组成向量a->b,a->c 如果所有的a->b和a->c的夹角都是 ...

  4. 【Codeforces Round #420 (Div. 2) C】Okabe and Boxes

    [题目链接]:http://codeforces.com/contest/821/problem/C [题意] 给你2*n个操作; 包括把1..n中的某一个数压入栈顶,以及把栈顶元素弹出; 保证压入和 ...

  5. 【Codeforces Round #420 (Div. 2) B】Okabe and Banana Trees

    [题目链接]:http://codeforces.com/contest/821/problem/B [题意] 当(x,y)这个坐标中,x和y都为整数的时候; 这个坐标上会有x+y根香蕉; 然后给你一 ...

  6. 【Codeforces Round #420 (Div. 2) A】Okabe and Future Gadget Laboratory

    [题目链接]:http://codeforces.com/contest/821/problem/A [题意] 给你一个n*n的数组; 然后问你,是不是每个位置(x,y); 都能找到一个同一行的元素q ...

  7. 【Codeforces Round #423 (Div. 2) C】String Reconstruction

    [Link]:http://codeforces.com/contest/828/problem/C [Description] 让你猜一个字符串原来是什么; 你知道这个字符串的n个子串; 且知道第i ...

  8. 【Codeforces Round #423 (Div. 2) B】Black Square

    [Link]:http://codeforces.com/contest/828/problem/B [Description] 给你一个n*m的格子; 里面包含B和W两种颜色的格子; 让你在这个格子 ...

  9. 【Codeforces Round #423 (Div. 2) A】Restaurant Tables

    [Link]:http://codeforces.com/contest/828/problem/A [Description] 有n个组按照时间顺序来餐馆; 每个组由一个人或两个人组成; 每当有一个 ...

随机推荐

  1. VirtualBox内刚刚安装完CentOS6.9和7系统,无法调整屏幕的分辨率,也无法设置共享文件夹。解决的方法就是安装VirtualBox客户端增强包。

    VirtualBox内刚刚安装完CentOS6.9和7系统,无法调整屏幕的分辨率,也无法设置共享文件夹.解决的方法就是安装VirtualBox客户端增强包. 1.若直接安装客户端增强包会得到如下提示: ...

  2. 昼猫笔记--什么是DOM

    昼猫笔记--给你带来不一样的笔记 不止是笔记 更多的是思考 Hello,大家好,昼猫,今天来加深下DOM 什么DOM呢?它的全称叫 Document Object Model 通过全称可以知道它是 文 ...

  3. BZOJ3105: [cqoi2013]新Nim游戏(Xor线性无关组)

    Description 传统的Nim游戏是这样的:有一些火柴堆,每堆都有若干根火柴(不同堆的火柴数量可以不同).两个游戏者轮流操作,每次可以选一个火柴堆拿走若干根火柴.可以只拿一根,也可以拿走整堆火柴 ...

  4. Centos/RHEL :How to add,delete and display LVM tags

    1. 什么是LVM标签? 在你想开机启动时让逻辑卷被激活可用时,添加lvm标签是一个不错的选择.lvm标签允许那些被预先标记的实现这样的效果. 2. 配置文件 配置文件/etc/lvm/lvm.con ...

  5. 学习TF:《TensorFlow机器学习实战指南》中文PDF+英文PDF+代码

    从实战角度系统讲解TensorFlow基本概念及各种应用实践.真实的应用场景和数据,丰富的代码实例,详尽的操作步骤,带你由浅入深系统掌握TensorFlow机器学习算法及其实现. <Tensor ...

  6. 学习NLP:《精通Python自然语言处理》中文PDF+英文PDF+代码

    自然语言处理是计算语言学和人工智能之中与人机交互相关的领域之一. 推荐学习自然语言处理的一本综合学习指南<精通Python自然语言处理>,介绍了如何用Python实现各种NLP任务,以帮助 ...

  7. Yeslab 华为安全HCIE-第五门-防火墙攻击防范技术

    Yeslab 华为安全HCIE-第五门-防火墙攻击防范技术 课程目录 Yeslab华为安全HCIE-第五门-防火墙攻击防范技术(8篇)\1_单包攻击防范.aviYeslab华为安全HCIE-第五门-防 ...

  8. Swift学习笔记(3)--基本运算符

    基本运行符: +(加法.正数) - (减法.负数) *  (乘法) / (除法) % (求余)  : 在Swift中,求余可以是浮点数求余. &&(逻辑与) || (逻辑或) ^ (逻 ...

  9. Starting nagios:This account is currently not available.

    解决方式: 又一次安装php 再重新启动apache 再启动nagios 再訪问:http://ip/nagios 我的问题就是 解决的.

  10. CF(438D) The Child and Sequence(线段树)

    题意:对数列有三种操作: Print operation l, r. Picks should write down the value of . Modulo operation l, r, x. ...