编程介的小学生 2017-09-04 09:30 采纳率: 20.5%
浏览 751
已采纳

Cover More Circles

There are some circles on a plane. They may intersect or overlap.You are to place a circle q on this plane (its radium is fixed) and want to cover the maximum possible number of circles. A circle is covered by q if it lies fully inside q.

Input:

This problem contains multiple test cases! Each test case begins with a real number r(r tells the radium of q) and a positive number n(0<n<100,the number of circles on the plane).Then follows n lines ,each describe a circle. Each of the following line contains three real number , the first two describe the x-ax and y-ax of the center of circle,the last one represents for the radium of this circle. Input terminates with the EOF(end of file).

Output:

Output one integer telling the maximum number of circles q can cover in one line for each test case.

Sample Input:
2.0 1
0.0 0.0 2.0
4.0 2
0.0 0.0 2.0
0.0 1.0 1.0
Sample Output:
1
2

  • 写回答

2条回答

查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)