Classic
Clean & simple
Crystal
Glassmorphism + Neon
Cyberpunk
Neon glitch art
🚫
违规Action检测
禁止Use右键菜单
⚠️ 此Action已被系统记录
1

Texas Trip

📝 Solutions 🔵 仅限 C++
Problems Description
<p> After a day trip with his friend Dick, Harry noticed a strange pattern of tiny holes in the door of his SUV. The local American Tire store sells fiberglass patching material only in square sheets. What is the smallest patch that Harry needs to fix his door? </p> <p> Assume that the holes are points on the integer lattice in the plane. Your job is to find the area of the smallest square that will cover all the holes. </p>
Input格式
<p> The first line of input contains a single integer T expressed in decimal with no leading zeroes, denoting the number of test cases to follow. The subsequent lines of input describe the test cases. </p> <p> Each test case begins with a single line, containing a single integer n expressed in decimal with no leading zeroes, the number of points to follow; each of the following n lines contains two integers x and y, both expressed in decimal with no leading zeroes, giving the coordinates of one of your points. </p> <p> You are guaranteed that T &lt;= 30 and that no data set contains more than 30 points. All points in each data set will be no more than 500 units away from (0,0). </p> <h3> &nbsp; </h3>
Output格式
<p> Print, on a single line with two decimal places of precision, the area of the smallest square containing all of your points. An answer will be accepted if it lies within 0.1 of the correct answer. </p> <h3> &nbsp; </h3>
Sample
Sample Input 1
2 4 -1 -1 1 -1 1 1 -1 1 4 10 1 10 -1 -10 1 -10 -1
Sample Output 1
4.00 242.00
Submit Code
请先Login后Submit

🤖 AI 解题助手

OpenRouter
就绪
👋 你好!我是 AI 解题助手。
我已阅读了这problems题,可以帮你points析思路、提供Code示例。
🔓 完全Free · 无需消耗 Token