Codeforces Round #432 (Div. 2) B Arpa and an exam about geometry
来源:互联网 发布:喜马拉雅听书 知乎 编辑:程序博客网 时间:2024/06/07 11:48
题目链接:点击打开链接
即判断是否存在一个点d,使∠adb等于∠bdc
那么只要作ab,bc的中垂线判断其是否有交点
再判断ab,bc是否等长即可
AC代码如下:
#include <iostream>#include <cmath>using namespace std;struct point{ double x, y;};point a, b, c;double dis(point a, point b){ double temp=(a.x - b.x)*(a.x - b.x) + (a.y-b.y)*(a.y-b.y); return sqrt(temp);}int onLine(point a, point b, point c){ return (a.x-b.x)*(c.y-b.y)==(a.y-b.y)*(c.x-b.x);}int main(){ ios::sync_with_stdio(0); cin.tie(0); while(cin>>a.x>>a.y) { cin>>b.x>>b.y>>c.x>>c.y; if(!onLine(a,b,c)&&dis(a,b)==dis(b,c)) cout<<"Yes"<<endl; else cout<<"No"<<endl; } return 0;}
阅读全文
0 0
- Codeforces 851B && Round #432 Div. 2 B. Arpa and an exam about geometry
- Codeforces Round #432 (Div. 2) B Arpa and an exam about geometry
- Codeforces Round #432 B. Arpa and an exam about geometry
- Codeforces Round#432 B. Arpa and an exam about geometry
- Codeforces Round #432 B. Arpa and an exam about geometry
- Codeforces Round #432 (Div. 2) B. Arpa and an exam about geometry(数学水题)
- Div#432B Arpa and an exam about geometry
- Codeforces Round #432 Div2 B. Arpa and an exam about geometry
- codeforces Div#432 B Arpa and an exam about geometry(技巧)
- codeforces 851B Arpa and an exam about geometry
- codeforces 851 B. Arpa and an exam about geometry
- Codeforces 851 B Arpa and an exam about geometry
- B. Arpa and an exam about geometry
- codeforce 851 B Arpa and an exam about geometry(思路)
- Codeforces 851B. Arpa and an exam about geometry 计算几何,结论题
- Codeforces Round #383 (Div. 2)-A. Arpa’s hard exam and Mehrdad’s naive cheat
- Codeforces Round #383 (Div. 2) 742A Arpa’s hard exam and Mehrdad’s naive cheat
- Codeforces Round #425 (Div. 2)B. Petya and Exam
- Windows下安装配置pip
- 天猫总站JavaEE版本的实现(一):jdbc的学习
- 具有五层协议的计算机网络体系结构
- Android日夜间切换模式
- (学习笔记)抽象类和接口
- Codeforces Round #432 (Div. 2) B Arpa and an exam about geometry
- 使用Ctags进行代码阅读
- unity小地图的实现
- 宏定义日志输出
- 记录调试接口中遇到的问题
- C# 完整的UDP客户端代码 组播+单播 异步+同步
- ARP协议分析
- Python学习笔记(2)
- 人脸识别开始学习!苦苦苦