diff --git a/Luogu/problem/P5098/P5098.cpp b/Luogu/problem/P5098/P5098.cpp new file mode 100644 index 00000000..4b4279ac --- /dev/null +++ b/Luogu/problem/P5098/P5098.cpp @@ -0,0 +1,19 @@ +#include + +using namespace std; + +int main() { + long long n, x, y, a, b, c, d; + a = c = -0x3f3f3f3f; + b = d = 0x3f3f3f3f; + cin >> n; + for (int i = 0; i < n; i++) { + cin >> x >> y; + a = max(a, x + y); + b = min(b, x + y); + c = max(c, x - y); + d = min(d, x - y); + } + cout << max(a - b, c - d) << endl; + return 0; +}