Nova
Problem Description
The Lich is a powerful hero that he can kill a wisp with his skill Frost Nova. The Burning Legion wants to conquer the forest so they sent some liches to kill all the wisps. A lich can kill a wisp once he could see the wisp and the wisp in his attack range. So the lich can attack a wisp when the distance between them is less than or equal to specific R and no trees are on the segment between the lich and wisp. Each lich has a cool down time that once he used Frost Nova he has to wait a few seconds for the next attack. Different liches may have different attack range and cool down time. The Lich King is the leader of the Burning Legion and he wants to arrange the attack order so the liches can wipe out all the wisps as soon as possible.
Input
The first line consists of an integer T, indicating the number of test cases.
The first line of each case consists of three integers N, M, K, indicating the number of lich, the number of wisps and the number of trees. The next N lines, each line consists of four integers x, y, r, t indicating the coordinate of that a lich, the radius of the attack range that lich’s Frost Nova can reach and the value of cool down time. The next M lines, each line consists of two integers x, y indicating the coordinate of each wisp. The last K lines, each line consists of three integers x, y, r, indicating the coordinate and radius of a tree. A lich cannot attack a wisp if the segment between them has a common point with the tree. The lich, wisp and trees will not overlap with each other.
Output
Output the minimum time lich need to kill all the wisps on a single line, or -1 if lich cannot kill all the wisps.
Constrains
0 < T <= 20
0 <= N, M, K <= 200
-10000 <= x, y <= 10000
0 <= r, t <= 10002
Sample Input
1
2 3 1
-100 0 100 3
100 0 100 5
-100 -10
100 10
110 11
5 5 10
Sample Output
5
- 点赞
- 写回答
- 关注问题
- 收藏
- 复制链接分享
- 邀请回答
1条回答
为你推荐
- 安装nova时出现错误。
- 云计算
- 2个回答
- openstack创建实例成功但是启动实例报错
- 无法弄清楚如何在二进制Web套接字中使用缓冲区
- IT行业问题
- 计算机技术
- it技术
- 编程语言问答
- 互联网问答
- 1个回答
- relatableQuery()用于Laravel Nova中同一模型上的两个资源字段
- 如何在db中存储输入类型的可用选项:select menu,radiobutton和checkbox?
- 从表更新密码
- php
- 2个回答
- Atom - IDE包 - 查找引用不起作用(PHP)
- 使用递归函数来模拟多维数组
- php
- 1个回答
- Laravel,如何在使用belongsToMany时过滤行?
- 使用REST API修改Openstack项目配额
- php
- openstack
- 2个回答
- 从输入通过ajax获取变量到外部php
- php
- javascript
- 3个回答
- Laravel找不到“Class'Zttp \ Zttp'找不到”但它是由作曲家安装的
- Nova Relatable Filtering - 如何过滤company_id与位置company_id匹配的用户
- java 解析xml文件遇到这种结构怎么解析
- kolla安装单节点openstack ocata版本过程中报错
- docker
- 3个回答
- opentack检查cells和placement API是否正常
- nova
- openstack
- 2个回答
- Nova
- less
- nova
- lines
- as
- 1个回答
- Inlay Cutters
- each
- lines
- numbers
- 1个回答
- bind_address可以设定多个ip吗?
- 跪求大神告诉我为什么我的popupwindow与左边框有空隙
- android
- 4个回答