 The skatepark's new ramps

Problem Description
The local skating park has been given a nancial incentive by the city to make the park interesting for skaters of all levels. The park wants to use the incentive to build a series of ramps, somewhat resembling a mountain range. When talking to some of the volunteers in the committee responsible for the project, you find out they're having diffculties deciding about the best con guration of the ramps. They know the number of ramps to be built, and for each ramp they agree on the range of the height for that ramp. They are still discussing exactly how high each ramp should be, since they can't a ord to have them all at their highest, but they do want to spend all of the budget. This is the most important issue in the debate: they can't agree whether they want the di erences between the ramps to be small, to give the full ride a more consistent feeling, or as big as possible, to create a more diverse set of challenges.You also notice they don't really have a good idea what the possibilities are, leaving them stranded in 'whatif' discussions. You decide to help them out by showing them the options they have, both the ones where the di erence between the highest and lowest ramp is kept as small as possible, as well as the one where that di erence is as much as possible. Since the committee is mainly bickering over the allowable di erences, you decide to start out by just presenting them the minimum and maximum di erencebetween the highest and lowest ramp. Luckily, the park has a lot of space, so you won't need to take the placement of the ramps into account. All ramps
have the same inclination, which is such that a ramp of height h will have a length 4h (measured at, not over the ramp).Input
The rst line of input consists of the integer number n, the number of test cases;
Then, for each test case:
A line with the integer number r (2 <=r<=10000), the number of ramps the park will place;
A line with the integer number m (0 <= m <=200000000 = 2*10^8), the number of cubic meters of concrete the park has money for;
r lines with two numbers, l and t (0.00 <=l <=t <= 100.00), separated by one space, the minimum and maximum height in meters of the rth ramp.You may assume all ramps are made entirely of concrete, and shaped as 1 meter wide prisms, with a triangle with two equal sides as base. A series of ramps within the given constraints and using all concrete is guaranteed to exist.
Output
For each test case, the output contains one line with two numbers, separated by one space: the minimum difference between the highest and lowest ramp and the maximum difference between the highest and the lowest ramp. These numbers are rounded to two decimals.Sample Input
1
3
36
1.00 4.00
1.00 4.00
1.00 4.00Sample Output
0.00 3.00
 博客 大学四年自学走来，这些私藏的实用工具/学习网站我贡献出来了
 博客 在中国程序员是青春饭吗？
 博客 springboot+jwt实现token登陆权限认证
 博客 技术大佬：我去，你写的 switch 语句也太老土了吧
 博客 女程序员，为什么比男程序员少？？？
 博客 总结了 150 余个神奇网站，你不来瞅瞅吗？
 博客 副业收入是我做程序媛的3倍，工作外的B面人生是怎样的？
 博客 MySQL数据库面试题（2020最新版）
 博客 如果你是老板，你会不会踢了这样的员工？
 博客 我入职阿里后，才知道原来简历这么写
 博客 程序员写出这样的代码，能不挨骂吗？
 博客 外包程序员的幸福生活
 博客 优雅的替换ifelse语句
 博客 离职半年了，老东家又发 offer，回不回？
 博客 2020阿里全球数学大赛：3万名高手、4道题、2天2夜未交卷
 博客 为什么你不想学习？只想玩？人是如何一步一步废掉的
 博客 男生更看重女生的身材脸蛋，还是思想？
 博客 为什么程序员做外包会被瞧不起？
 博客 当HR压你价，说你只值7K，你该怎么回答？
 博客 面试：第十六章：Java中级开发
 博客 早上躺尸，晚上干活：硅谷科技公司这么流行迟到？
 博客 面试阿里p7，被按在地上摩擦，鬼知道我经历了什么？
 博客 终于懂了TCP和UDP协议区别
 博客 Python爬虫，高清美图我全都要（彼岸桌面壁纸）
 博客 无代码时代来临，程序员如何保住饭碗？
 博客 面试了一个 31 岁程序员，让我有所触动，30岁以上的程序员该何去何从？
 博客 大三实习生，字节跳动面经分享，已拿Offer
 博客 程序员垃圾简历长什么样？
 博客 Java岗开发3年，公司临时抽查算法，离职后这几题我记一辈子
 博客 大胆预测下未来5年的Web开发