编程介的小学生 2017-08-24 03:52 采纳率: 20.5%
浏览 811
已采纳

Egg Painting

Marjar wants to play egg-painting. It needs to peel off some part of the egg shell and take out the yolk, and then paint a picture on the egg shell. But Marjar don't want to destroy the yolk. This seems quite difficult for him to take the yolk out. He decides to make a hole that is a spherical polygon consisting of n arcs of the great circles connecting n vertices. But he didn't know whether the yolk could come out or not from the hole he created on the egg shell. Your task is helping him to determine whether the hole is big enough. His egg is a sphere with radius R while the yolk is also a sphere with radius r inside the egg.

Input

There are multiple test cases. The first line of input contains an integer T (0 < T ≤ 50) indicating the number of test cases. Then T test cases follow.

The first line of each test case contains 3 integers n, R and r(0 < n ≤ 50, 0 < r ≤ R ≤ 10000). Then n lines follow, telling the vertices of the hole in counterclockwise order when viewing from outside the egg. Each of the n lines contains 2 real numbers, each of which contains at most 2 digits after the decimal point, indicating the longitude and the latitude of the vertex. The longitude and the latitude are measured in degree. The longitude will be in (180, 180] while the latitude will be in [-90, 90]. It is guaranteed that the spherical polygon will not cross itself.

Output

For each test case, output "Yes" if it is possible to take out the yolk from through the hole in one line. Otherwise output "No".

Sample Input

1
3 10 1
0 0
90 0
0 90
Sample Output

Yes

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-09-04 15:48
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料