编程介的小学生 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条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器