POJ 1675 Happy Birthday
来源:互联网 发布:刘毅22000怎么样 知乎 编辑:程序博客网 时间:2024/06/06 18:04
Happy Birthday!
Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 3352 Accepted: 791
Description
There are three berries on a round birthday cake. You are required to divide the cake into three identical parts such that each part contains exactly one berry. To make it easy, it is assumed that the radius of the berries is 0 and each part of the cake is a sector with 120 degrees. Any line that divides the cake should not go through any berry.
Input
The first line contains a single integer t (1 <= t <= 20) that indicates the number of test cases. Then follow the t cases. Each case contains exactly 7 integers r, x1, y1, x2, y2, x3 and y3. r is the radius of the cake, (xi, yi) is the coordinates of i-th berry. The center of the cake is at (0, 0) and it's confirmed that all the berries will be on the cake.
Output
For each case, output 'Yes' if there is a valid solution, 'No' otherwise.
Sample Input
22 1 1 -1 1 0 -110 0 9 1 8 -1 8
Sample Output
YesNo
Source
POJ Monthly--2004.06.27 srbga@POJ
- POJ 1675 Happy Birthday
- poj 1675 Happy Birthday!
- poj 1675 Happy Birthday!
- POJ 1675 Happy Birthday! 笔记
- Happy birthday!
- HAPPY BIRTHDAY
- HAPPY BIRTHDAY!!
- Happy Birthday :)
- Happy Birthday
- happy birthday!
- happy birthday
- Happy birthday
- Happy Birthday~
- happy birthday
- happy birthday
- Happy Birthday to 亮
- Happy Birthday To Me!
- Happy Birthday --- TT
- 开发人员一定要加入收藏夹的网站
- 数学之美 系列十六(上) 不要把所有的鸡蛋放在一个篮子里 -- 谈谈最大熵模型
- window 2003 登陆
- PetShop4.0 工厂模式及Profile Provider实现
- 2.1.3发送数据和接收数据
- POJ 1675 Happy Birthday
- 潜套类的理解
- Tomcat6集群 + Apache + Nginx均衡负载及其测试
- 在Struts 2中使用JSon ajax支持
- 常用资源网站
- 利用Irame传递大容量数据给另外一个页面
- 函数调用约定和堆栈
- linux中,文件所有者权限小于组权限时,权限会不会升级为组权限?
- android nine patch图片