地址:http://acm.split.hdu.edu.cn/showproblem.php?pid=6206

题目:

Apple

Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)
Total Submission(s): 530    Accepted Submission(s): 172

Problem Description
Apple is Taotao's favourite fruit. In his backyard, there are three apple trees with coordinates (x1,y1), (x2,y2), and (x3,y3). Now Taotao is planning to plant a new one, but he is not willing to take these trees too close. He believes that the new apple tree should be outside the circle which the three apple trees that already exist is on. Taotao picked a potential position (x,y) of the new tree. Could you tell him if it is outside the circle or not?
 
Input
The first line contains an integer T, indicating that there are T(T≤30) cases.
In the first line of each case, there are eight integers x1,y1,x2,y2,x3,y3,x,y, as described above.
The absolute values of integers in input are less than or equal to 1,000,000,000,000.
It is guaranteed that, any three of the four positions do not lie on a straight line.
 
Output
For each case, output "Accepted" if the position is outside the circle, or "Rejected" if the position is on or inside the circle.
 
Sample Input
3
-2 0 0 -2 2 0 2 -2
-2 0 0 -2 2 0 0 2
-2 0 0 -2 2 0 1 1
 
Sample Output
Accepted
Rejected
Rejected
 
Source
 
思路:
  这题关键是找圆心,如果圆心知道了,后面的都好做了。
  圆心坐标公式,来自维基:
  

  这题精度要求高,直接用double or long double都会挂。

  做法有俩个:

  1.保留除法运算,那就只能用java的BigDecimal(好像叫这个)

  2.进行公式化简:

  

  所以这时只需要比较分子就好了,只需要大数模板。

  然而我知道怎么做还是wa一下午,依旧没过,不会java,用c++的大数模板写又写挂了。。。gg,心痛。

  这题还可以圆的反演做。

  没有代码贴了。

  

hdu6206 Apple的更多相关文章

  1. iOS: 在iPhone和Apple Watch之间共享数据: App Groups

    我们可以在iPhone和Apple Watch间通过app groups来共享数据.方法如下: 首先要在dev center添加一个新的 app group: 接下来创建一个新的single view ...

  2. 一道Apple公司(中国)的面试题目

    Apple在中国(上海)有公司业务,但是感觉主要是做测试工作的部门,主要是保障Apple的产品质量QE.面试的时候,面试官出了一道题目,我貌似曾今开过类似的题目,但是由于当场发挥不佳没有答出来.题目大 ...

  3. apple常用网址

    https://developer.apple.com/ https://itunesconnect.apple.com/ iTunes Connect Developer Guide https:/ ...

  4. Apple Pay 初探

    Apple Pay 一.概述 1.支付方式:Touch ID/ Passcode 2.设备要求:iPhone6以上(iphone:线上/线下 ipad:线上 watch:线下) 3.系统要求:iOS8 ...

  5. Apple、Google、Microsoft的用户体验设计原则

    轻巧的Apple 注重设计过程: 在设计过程中引入用户交互的5个目标: 了解您的目标客户 分析用户的工作流 构造原型系统 观察用户测试 制定观察用户准则 做出设计决定 避免功能泛滥 80% 方案 优秀 ...

  6. 【转】iOS开发 -- Apple Pay

    技术博客原地址:http://www.cnblogs.com/dashunzi/p/ApplePay.html#top 原技术博客中有源码和视频,有感兴趣的朋友可以研究一下! 一.什么是Apple P ...

  7. Apple的LZF算法解析

    有关LZF算法的相关解析文档比较少,但是Apple对LZF的开源,可以让我们对该算法进行一个简单的解析.LZFSE 基于 Lempel-Ziv ,并使用了有限状态熵编码.LZF采用类似lz77和lzs ...

  8. [css]我要用css画幅画(九) - Apple Logo

    接着之前的[css]我要用css画幅画(八) - Hello Kitty,这次画的是苹果公司的logo 这次打算将分析和实现步骤尽量详细的说一说. 其实之前的也打算详细讲分析和设计过程,不过之前的图比 ...

  9. [Erlang 0106] Erlang实现Apple Push Notifications消息推送

        我们的IOS移动应用要实现消息推送,告诉用户有多少条消息未读,类似下图的效果(笑果),特把APNS和Erlang相关解决方案笔记于此备忘.          上面图片中是Apple Notif ...

随机推荐

  1. SQLserver 设置自增为显式插入

    默认是状态是set IDENTITY_INSERT T2 off ,就是关闭了自动插入值的功能,为空时就会报错 ,,'') 报错: 消息 544,级别 16,状态 1,第 1 行当 IDENTITY_ ...

  2. 经典SQL面试题(转)

    http://www.cnblogs.com/kcher90/archive/2013/03/13/2957932.html 有三个表,如果学生缺考,那么在成绩表中就不存在这个学生的这门课程成绩的记录 ...

  3. linux_shell_find命令

    使用find查找文件 基本格式:find path expression 1.按照文件名查找 (1)find / -name httpd.conf #在根目录下查找文件httpd.conf,表示在整个 ...

  4. 在dropDownList中实现既能输入一个新值又能实现下拉选的代码

    aspx: <div id="selDiv" style=" z-index:100; visibility:visible; clip:rect(0px 110p ...

  5. php求数学对数

    php的对数函数并不是很强大 有自然对数 有10的对数的函数,不过没有自定义底的对数函数,所以自己写了一个 <?php function xsqrt($x, $value) { $count = ...

  6. recyclerView中的方法

    onCreateViewHolder(); onBindViewHolder(); getItemCount(); recyclerVIew中没有添加头布局和尾布局方法.可以用getItemViewT ...

  7. Python 打包程序

    一.打包成exe 1.安装pyinstaller #只要你能FQ连接https://pypi.python.org/pypi下载会很快,不用担心超时问题. https://pypi.python.or ...

  8. PMP 质量管理新7张图

    亲和图.关联图.系统图.矩阵图.网络图.pdpc.矩阵数据分析法

  9. ios 自定义UITableView中分组的标题sectionview

    //Section的标题栏高度 -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)sec ...

  10. MapRecude

    任务:分析通话记录,查处每个手机号码有哪些打过来的号码 13510921776 10086 13710148751 10086 13914248991 10086 13510921776 137101 ...