{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"MD","content":"二维平面上有 N 个点,其中第 i 个点位于 (xi , yi) 上。 可以有多个点共享相同的坐标。 两个不同点之间可能的最大曼哈顿距离是多少?\n 这里,两点 (xi , yi) 和 (xj , yj) 之间的曼哈顿距离定义为 |x i − xj| + |yi − yj| .\n\n\u003c/hr\u003e\n\n关于曼哈顿距离定义\n\n曼哈顿距离是种使用在几何度量空间的几何学用语,用以标明两个点在标准坐标系上的绝对轴距总和。\n\n![img](https://img-blog.csdnimg.cn/2020091512071118.png)\n\n图中红线代表曼哈顿距离,绿色代表欧氏距离,也就是直线距离,而蓝色和黄色代表等价的曼哈顿距离。"}},{"title":"Constraints","value":{"format":"MD","content":"\n- $2≤N≤2×10^5$\n- $1≤x_i,y_i≤10^9$\n- 输入中的所有值都是整数。\n\n"}},{"title":"Input","value":{"format":"MD","content":"输入以以下格式从标准输入给出:\nN\nx1 y1\nx2 y2 \n: \nxN yN"}},{"title":"Output","value":{"format":"MD","content":"输出计算结果"}},{"title":"Sample Input 1","value":{"format":"MD","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e3\n1 1\n2 4\n3 2\n\u003c/pre\u003e"}},{"title":"Sample Output 1","value":{"format":"MD","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e4\n\u003c/pre\u003e \n第一个点和第二个点之间的曼哈顿距离是: |1-2| + |1-4| \u003d 4,这是最大的可能。"}},{"title":"Sample Input 2","value":{"format":"MD","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e2\n1 1\n1 1\n\u003c/pre\u003e"}},{"title":"Sample Output 2","value":{"format":"MD","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e0\n\u003c/pre\u003e"}}]}