作业帮 > 英语 > 作业

英语翻译Given n points (xi,yi) (i = 1,2 ...n) in a plane,where a

来源:学生作业帮 编辑:拍题作业网作业帮 分类:英语作业 时间:2024/04/30 02:58:40
英语翻译
Given n points (xi,yi) (i = 1,2 ...n) in a plane,where all xi will be distinct.After connecting the n points with staight lines in order from the leftmost point to the rightmost point,the area below the lines is called coverage.Now,it's your job to calculate the maximum coverage area,if yi (i = 1,2 ...n) can be swapped arbitrarily.
Input
The first line of the input is an integer t (t
给定平面坐标上一系列点(xi,yi) (i = 1,2 ...n),xi各不相同,如果我们用直线段将这些点从左至右连接起来,这些线段下面区域的面积称作覆盖率.
现在假定yi (i = 1,2 ...n)的值可以任意互换,你的任务是找到最大可能的覆盖率.
输入:
输入第一行是一个正整数t,表示测试用例的数量
每个测试用例以一个正整数n开头(2