箭头识别

该问题描述了一个关于在平面上寻找由三个点构成的最大箭头的条件。箭头必须满足特定的坐标顺序和长度、宽度比例。给定平面内的N个点,任务是找到能构成的最大箭头的尺寸。输入包含测试用例数量T和每个用例的点坐标,输出每个用例的最大箭头尺寸。当不存在箭头时,尺寸为-1。
摘要由CSDN通过智能技术生成
TimeLimit : 3000/1000ms (Java/Other)   Memory Limit : 65535/32768K(Java/Other)

Problem Description

Three pointsA(x1,y1), B(x2,y2) and C(x3,y3) form a arrow if and only if the followingconditions are fulfilled:
x1=x3<x2
y1<y2<y3
The length of the arrow(x2-x1) must not shorter than the width of the arrowy3-y1.
We define the size of an arrow as its length plus its width. Given N points inthe plane, what's the largest possible arrow can be formed from three of thegiven points.

Input

The first line ofthe input contains a positive integer T<=20 specifying the number of testcases to follow.
the first line of each test case contains a positive integerN(1<=N<=2000). Then follow N lines, each describes a point withcoodinates(xi,yi)(0<=xi,yi<=10^7).
It&#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值