buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <cmath> //sqrt pow
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <deque> // dequef
#includ... | #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <cmath> //sqrt pow
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <deque> // dequef
#includ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 215 |
#include <bits/stdc++.h>
// #include <atcoder/all>
#define FOR(i, a, n) for (int(i) = (int)(a); (i) < (int)(n); ++(i))
#define FORe(i, a, n) for (int(i) = (int)(a); (i) <= (int)(n); ++(i))
#define rFOR(i, a, n) for (int(i) = (int)(n)-1; (i) >= (int)(a); --(i))
#define rFORe(i, a, n) for (int(i) = (int)(n); (i) >= (int)... | #include <bits/stdc++.h>
// #include <atcoder/all>
#define FOR(i, a, n) for (int(i) = (int)(a); (i) < (int)(n); ++(i))
#define FORe(i, a, n) for (int(i) = (int)(a); (i) <= (int)(n); ++(i))
#define rFOR(i, a, n) for (int(i) = (int)(n)-1; (i) >= (int)(a); --(i))
#define rFORe(i, a, n) for (int(i) = (int)(n); (i) >= (int)... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 28, 22]] | 1 | 520 |
#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 10;
long long a[N], b[N];
long long n, x, y;
int main() {
scanf("%lld", &n);
for (long long i = 1; i <= n; i++) {
scanf("%lld%lld", &x, &y);
a[i] = x + y;
b[i] = x - y;
}
sort(a + 1, a + 1 + n);
sort(b + 1, b + 1 + n);
print... | #include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 10;
long long a[N], b[N];
long long n, x, y;
int main() {
scanf("%lld", &n);
for (long long i = 1; i <= n; i++) {
scanf("%lld%lld", &x, &y);
a[i] = x + y;
b[i] = x - y;
}
sort(a + 1, a + 1 + n);
sort(b + 1, b + 1 + n);
print... | [["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 16, 31, 16, 17, 72], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 21], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 155 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int n, x, y;
int maxn = -1, maxx = 1e10, minx = -1, minn = 1e10;
cin >> n;
for (int i = 1; i <= n; i++)
cin >> x >> y, maxn = max(x + y, maxn), maxx = min(x + y, maxx),
... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int n, x, y;
int maxn = -1e11, maxx = 1e11, minx = -1e11, minn = 1e11;
cin >> n;
for (int i = 1; i <= n; i++)
cin >> x >> y, maxn = max(x + y, maxn), maxx = min(x + y, maxx),
... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 130 |
#include <algorithm>
#include <iostream>
using namespace std;
int x[200000], y[200000], z[200000], w[200000];
int main() {
int n, i;
cin >> n;
for (i = 0; i < n; i++) {
cin >> x[i] >> y[i];
z[i] = x[i] + y[i];
w[i] = x[i] - y[i];
}
sort(z, z + n);
sort(w, w + n);
cout << max(z[n - 1] - z[0], w... | #include <algorithm>
#include <iostream>
using namespace std;
long long int x[200000], y[200000], z[200000], w[200000];
int main() {
int n, i;
cin >> n;
for (i = 0; i < n; i++) {
cin >> x[i] >> y[i];
z[i] = x[i] + y[i];
w[i] = x[i] - y[i];
}
sort(z, z + n);
sort(w, w + n);
cout << max(z[n - 1]... | [["+", 36, 36, 0, 30, 0, 43, 39, 86, 0, 96], ["-", 3, 4, 0, 16, 12, 69, 341, 342, 0, 22], ["+", 3, 4, 0, 16, 12, 69, 341, 342, 0, 13]] | 1 | 153 |
#include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
typedef long long int lli;
#define all(arr) arr.begin(), arr.end()
#define f first
#define s second
#define debug1(x) cout << x << "\n"
#define debug2(x, y) cout << x << " " << y << "\n"
#d... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
typedef long long int lli;
#define all(arr) arr.begin(), arr.end()
#define f first
#define s second
#define debug1(x) cout << x << "\n"
#define debug2(x, y) cout << x << " " << y << "\n"
#d... | [["-", 12, 2, 3, 4, 0, 16, 31, 118, 119, 120], ["+", 12, 2, 3, 4, 0, 16, 31, 118, 119, 120], ["-", 12, 2, 3, 4, 0, 16, 12, 118, 119, 120], ["+", 12, 2, 3, 4, 0, 16, 12, 118, 119, 120]] | 1 | 661 |
#include <algorithm>
#include <assert.h>
#include <bits/stdc++.h>
#include <cmath>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h... | #include <algorithm>
#include <assert.h>
#include <bits/stdc++.h>
#include <cmath>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 436 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << setprecision(20) << fixed;
int N;
cin >> N;
vector<long long> z, w;
for (int i = 0; i < N; i++) {
int x, y;
cin >> x >> y;
z.push_back(x + y);
w.push_back(x - y);
}
sort(z.begin... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << setprecision(20) << fixed;
int N;
cin >> N;
vector<long long> z, w;
for (int i = 0; i < N; i++) {
int x, y;
cin >> x >> y;
z.push_back(x + y);
w.push_back(x - y);
}
sort(z.begin... | [["-", 12, 2, 3, 4, 0, 16, 12, 69, 28, 22], ["+", 12, 2, 3, 4, 0, 16, 12, 69, 28, 22]] | 1 | 157 |
#include "bits/stdc++.h"
//#include <ext/pb_ds/assoc_container.hpp> //required
//#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define lb long double
#define pb push_back
#define loop(i, start, n) for (ll i = start; i < n; i++)
#define rloop(i, n, start) for (ll i = n; i >= start; i--)
#define mod 100000000... | #include "bits/stdc++.h"
//#include <ext/pb_ds/assoc_container.hpp> //required
//#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define lb long double
#define pb push_back
#define loop(i, start, n) for (ll i = start; i < n; i++)
#define rloop(i, n, start) for (ll i = n; i >= start; i--)
#define mod 100000000... | [["-", 0, 57, 75, 76, 0, 57, 64, 37, 0, 13], ["+", 0, 57, 75, 76, 0, 57, 64, 37, 0, 22]] | 1 | 982 |
n = int(input())
a = []
b = []
for i in range(n):
x,y = map(int, input().split())
a.append(x+y)
b.append(abs(x-y))
a.sort()
b.sort()
ans = a[-1]-a[0]
c = b[-1]-b[0]
print (max(ans,c))
| n = int(input())
a = []
b = []
for i in range(n):
x,y = map(int, input().split())
a.append(x+y)
b.append(x-y)
a.sort()
b.sort()
ans = a[-1]-a[0]
c = b[-1]-b[0]
print (max(ans,c))
| [["-", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 102 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using oset =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define ull unsigned long long int
#define ll long... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using oset =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define ull unsigned long long int
#define ll long... | [["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22]] | 1 | 403 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define int long long
#define endl "\n"
#define fi first
#define se second
#define fastio ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define int long long
#define endl "\n"
#define fi first
#define se second
#define fastio ... | [["-", 0, 11, 12, 2, 3, 4, 0, 2, 63, 22], ["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 463 |
import sys
import re
import queue
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_... | import sys
import re
import queue
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_... | [["-", 0, 652, 3, 4, 0, 670, 8, 652, 63, 22]] | 5 | 474 |
"""AtCoder Beginner Contest 178.
E
"""
import sys
def input() -> str: # noqa: A001
"""Input."""
return sys.stdin.readline()[:-1]
def calc(p1: list, p2: list) -> int:
"""Calc Manhattan Distance."""
return abs(p2[1] - p1[1]) + abs(p2[0] - p1[0])
def main():
"""Run."""
n = int(input())
... | """AtCoder Beginner Contest 178.
E
"""
import sys
def input() -> str: # noqa: A001
"""Input."""
return sys.stdin.readline()[:-1]
def calc(p1: list, p2: list) -> int:
"""Calc Manhattan Distance."""
return abs(p2[1] - p1[1]) + abs(p2[0] - p1[0])
def main():
"""Run."""
n = int(input())
... | [["+", 12, 680, 0, 569, 51, 660, 0, 664, 17, 33]] | 5 | 316 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define INF 999999999
#define rep(i, n) for (int i = 0; i < n; i++)
const ll MOD = 1000000007;
ll cnt = 0, ans = 0;
const int MAX = 510000;
int main() {
ll n;
cin >> n;
ll x[n], y[n], xl[n], yl[n];
ll maxx = 0, minx = INF, maxy = 0, miny = INF;... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define INF 999999999
#define rep(i, n) for (int i = 0; i < n; i++)
const ll MOD = 1000000007;
ll cnt = 0, ans = 0;
const int MAX = 510000;
int main() {
ll n;
cin >> n;
ll x[n], y[n], xl[n], yl[n];
ll maxx = -INF, minx = INF, maxy = -INF, miny ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 28, 22]] | 1 | 233 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int i, n, x, y;
cin >> n;
vector<long long int> a(n), b(n);
for (i = 0; i < n; i++) {
cin >> x >> y;
a[i] = x + y;
b[i] = x - y;
}
sort(a.begin(), a.end());
sort(b.begin(), b.end());
cout << max((a[n - 1] - a[0]), (b[n - ... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int i, n, x, y;
cin >> n;
vector<long long int> a(n), b(n);
for (i = 0; i < n; i++) {
cin >> x >> y;
a[i] = x + y;
b[i] = x - y;
}
sort(a.begin(), a.end());
sort(b.begin(), b.end());
cout << max((a[n - 1] - a[0]), (b[n - ... | [["-", 12, 2, 3, 4, 0, 23, 0, 34, 0, 21], ["+", 12, 2, 3, 4, 0, 23, 0, 16, 17, 33]] | 1 | 147 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 742 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> X(N), Y(N);
for (int i = 0; i < N; i++) {
int x, y;
cin >> x >> y;
X[i] = x + y;
Y[i] = x - y;
}
sort(X.begin(), X.end());
sort(Y.begin(), Y.end());
long long ans = ... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> X(N), Y(N);
for (int i = 0; i < N; i++) {
int x, y;
cin >> x >> y;
X[i] = x + y;
Y[i] = x - y;
}
sort(X.begin(), X.end());
sort(Y.begin(), Y.end());
long long ans = ... | [["-", 49, 50, 51, 2, 3, 4, 0, 16, 17, 72], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33]] | 1 | 152 |
N=int(input())
a = []
b = []
for i in range(N):
x,y=map(int,input().split())
a.append(abs(x+y))
b.append(abs(x-y))
A = max(a)-min(a)
B = max(b)-min(b)
print(max(A,B)) | N=int(input())
a = []
b = []
for i in range(N):
x,y=map(int,input().split())
a.append(x+y)
b.append(x-y)
A = max(a)-min(a)
B = max(b)-min(b)
print(max(A,B)) | [["-", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 93 |
using namespace std;
#include <bits/stdc++.h>
#define frr(i, r, l) for (int i = r; i >= l; --i)
#define fr(i, l, r) for (int i = l; i < r; ++i)
#define forit(it, type, var) \
for (type::iterator it = var.begin(); it != var.end(); it++)
#define ii pair<int, int>
#defin... | using namespace std;
#include <bits/stdc++.h>
#define frr(i, r, l) for (int i = r; i >= l; --i)
#define fr(i, l, r) for (int i = l; i < r; ++i)
#define forit(it, type, var) \
for (type::iterator it = var.begin(); it != var.end(); it++)
#define ii pair<int, int>
#defin... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 28, 22]] | 1 | 276 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ios_base ::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
vector<ll> a, b;
for (int i = 0; i < n; i++) {
ll x, y;
cin >> x >> y;
a.push_back(x + y);
b.push_back(abs(x - y));
}
sort(a.begin(), a.end()... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ios_base ::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
vector<ll> a, b;
for (int i = 0; i < n; i++) {
ll x, y;
cin >> x >> y;
a.push_back(x + y);
b.push_back((x - y));
}
sort(a.begin(), a.end());
... | [["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22]] | 1 | 173 |
#include <bits/stdc++.h>
using namespace std;
const int INF = 2000000007;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
int N;
cin >> N;
int zmax = 0, zmin = INF, wmax = 0, wmin = INF;
for (int i = 0; i < N; ++i) {
int x, y;
cin >> x >> y;
zmax = max(zmax, x + y);
zmin = min... | #include <bits/stdc++.h>
using namespace std;
const int INF = 2000000007;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
int N;
cin >> N;
int zmax = -INF, zmin = INF, wmax = -INF, wmin = INF;
for (int i = 0; i < N; ++i) {
int x, y;
cin >> x >> y;
zmax = max(zmax, x + y);
zmin... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 28, 22]] | 1 | 147 |
//----------BHAVIK DIWANI(PICT_COMP)---------------
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define test \
ll t; \
c... | //----------BHAVIK DIWANI(PICT_COMP)---------------
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define test \
ll t; \
c... | [["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24]] | 1 | 712 |
#include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\n... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\n... | [["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22]] | 1 | 311 |
#include <bits/stdc++.h>
using ll = long long;
#define FOR(i, k, n) for (ll i = (k); i < (n); i++)
#define FORe(i, k, n) for (ll i = (k); i <= (n); i++)
#define FORr(i, k, n) for (ll i = (k)-1; i > (n); i--)
#define FORre(i, k, n) for (ll i = (k)-1; i >= (n); i--)
#define REP(i, n) FOR(i, 0, n)
#define REPr(i, n) FORre... | #include <bits/stdc++.h>
using ll = long long;
#define FOR(i, k, n) for (ll i = (k); i < (n); i++)
#define FORe(i, k, n) for (ll i = (k); i <= (n); i++)
#define FORr(i, k, n) for (ll i = (k)-1; i > (n); i--)
#define FORre(i, k, n) for (ll i = (k)-1; i >= (n); i--)
#define REP(i, n) FOR(i, 0, n)
#define REPr(i, n) FORre... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 85], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 220 |
#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int n, maxn1, maxn2, minn1 = INF, minn2 = INF, x, y;
int main() {
scanf("%d", &n);
while (n--) {
scanf("%d%d", &x, &y);
x += y;
if (maxn1 < x)
maxn1 = x;
if (minn1 > x)
minn1 = x;
x -= y * 2;
if (maxn2 <... | #include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int n, maxn1 = -INF, maxn2 = -INF, minn1 = INF, minn2 = INF, x, y;
int main() {
scanf("%d", &n);
while (n--) {
scanf("%d%d", &x, &y);
x += y;
if (maxn1 < x)
maxn1 = x;
if (minn1 > x)
minn1 = x;
x -= y * 2;
... | [["+", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["+", 0, 30, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 0, 30, 0, 43, 49, 50, 51, 91, 28, 22]] | 1 | 139 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a); i < (b); ++i)
#define trav(a, x) for (auto &a : x)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define endl '\n'
typedef long long ll;
typedef pair<int, int> pii;
ty... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a); i < (b); ++i)
#define trav(a, x) for (auto &a : x)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define endl '\n'
typedef long long ll;
typedef pair<int, int> pii;
ty... | [["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 22]] | 1 | 243 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ALL(x) (x).begin(), (x).end()
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
typedef pair<int, int> PI;
typedef pair<int, pair<int, int>> PII;
static const int INF = 1010000000000000017LL;
static const double eps = 1... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ALL(x) (x).begin(), (x).end()
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
typedef pair<int, int> PI;
typedef pair<int, pair<int, int>> PII;
static const int INF = 1010000000000000017LL;
static const double eps = 1... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 844 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define irep(i, n) for (int i = (n); i >= 0; i--)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1 << 25;
const int MOD = 1e9 + 7;
int x[200020], y[200020];
int main() {
int n;
cin >> n;
int a, b;
rep(... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define irep(i, n) for (int i = (n); i >= 0; i--)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1 << 25;
const int MOD = 1e9 + 7;
int x[200020], y[200020];
int main() {
int n;
cin >> n;
int a, b;
rep(... | [["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25]] | 1 | 178 |
n = int(input())
xy = [list(map(int,input().split())) for _ in range(n)]
a = []
b = []
for i in range(n):
a.append(abs(xy[i][0]+xy[i][1]))
b.append(abs(xy[i][0]-xy[i][1]))
a_sort = sorted(a)
b_sort = sorted(b)
print(max(a_sort[-1]-a_sort[0],b_sort[-1]-b_sort[0])) | n = int(input())
xy = [list(map(int,input().split())) for _ in range(n)]
a = []
b = []
for i in range(n):
a.append(xy[i][0]+xy[i][1])
b.append(xy[i][0]-xy[i][1])
a_sort = sorted(a)
b_sort = sorted(b)
print(max(a_sort[-1]-a_sort[0],b_sort[-1]-b_sort[0])) | [["-", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 135 |
import java.io.*;
import java.math.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PrintWriter ou = new PrintWriter(System.out);
int n = Integer.parseInt(sc.next());
int x, y;
int za = (int)Math.pow(10, 9);
int zb = -(int... | import java.io.*;
import java.math.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PrintWriter ou = new PrintWriter(System.out);
int n = Integer.parseInt(sc.next());
int x, y;
int za = (int)Math.pow(10, 9);
int zb = -(int... | [["-", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22]] | 3 | 265 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;
int main() {
ll n;
cin >> n;
ll max_plus = 0, max_minus = 0, min_plus = INF, min_minus = INF;
for (int i = 0; i < n; ++i) {
pair<ll, ll> e;
cin >> e.first >> e.second;
max_p... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;
int main() {
ll n;
cin >> n;
ll max_plus = -INF, max_minus = -INF, min_plus = INF, min_minus = INF;
for (int i = 0; i < n; ++i) {
pair<ll, ll> e;
cin >> e.first >> e.second;
... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 28, 22]] | 1 | 167 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define int long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define int long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define... | [["-", 3, 4, 0, 16, 12, 16, 12, 118, 119, 120], ["+", 3, 4, 0, 16, 12, 16, 12, 118, 119, 120]] | 1 | 332 |
pnt=[]
n=int(input())
for i in range(n):
pnt.append(list(map(int,input().split())))
z=[]
w=[]
for i in pnt:
z.append(i[0]+i[1])
w.append(i[0]+i[1])
print(max(max(z)-min(z),max(w)-min(w))) | pnt=[]
n=int(input())
for i in range(n):
pnt.append(list(map(int,input().split())))
z=[]
w=[]
for i in pnt:
z.append(i[0]+i[1])
w.append(i[0]-i[1])
print(max(max(z)-min(z),max(w)-min(w)))
| [["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33]] | 5 | 106 |
N = gets.to_i
C = N.times.map { gets.split.map(&:to_i) }
max_z = -Float::INFINITY
min_z = Float::INFINITY
max_w = -Float::INFINITY
min_w = Float::INFINITY
C.each do |x, y|
z = x + y
w = x - y
max_z = z if max_z < z
min_z = z if min_z > z
max_w = w if max_w < w
min_w = w if max_w > w
end
puts [max_z - mi... | N = gets.to_i
C = N.times.map { gets.split.map(&:to_i) }
max_z = -Float::INFINITY
min_z = Float::INFINITY
max_w = -Float::INFINITY
min_w = Float::INFINITY
C.each do |x, y|
z = x + y
w = x - y
max_z = z if max_z < z
min_z = z if min_z > z
max_w = w if max_w < w
min_w = w if min_w > w
end
puts [max_z - mi... | [["-", 196, 737, 8, 736, 0, 751, 15, 738, 31, 22], ["+", 196, 737, 8, 736, 0, 751, 15, 738, 31, 22]] | 4 | 105 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define sz(x) (int)x.size()
#define F first
#define S second
#define endl "\n"
#define inf (long long)1000000007
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define bigint 1e18
mt19937 RNG... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define sz(x) (int)x.size()
#define F first
#define S second
#define endl "\n"
#define inf (long long)1000000007
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define bigint 1e18
mt19937 RNG... | [["-", 0, 30, 0, 353, 8, 123, 0, 14, 39, 40], ["+", 0, 30, 0, 353, 8, 123, 0, 14, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 28, 22]] | 1 | 397 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define initdp(a, b) \
for (int i = 0; i <= a; i++) ... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define initdp(a, b) \
for (int i = 0; i <= a; i++) ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 402 |
#include <bits/stdc++.h>
#define ALL(A) (A).begin(), (A).end()
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a ... | #include <bits/stdc++.h>
#define ALL(A) (A).begin(), (A).end()
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a ... | [["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22]] | 1 | 363 |
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
long long int N, i, max_add = -1, min_add = 99999999999999, max_diff = -1,
min_diff = 99999999999999, ans, x, y;
cin >> N;
for (i = 0; i < N; i += 1) {
cin >> x >> y;
... | #include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
long long int N, i, max_add = -99999999999999, min_add = 99999999999999,
max_diff = -99999999999999, min_diff = 99999999999999,
ans, x, y;
cin >> N;
... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 144 |
#include <bits/stdc++.h>
#define ll long long
#define MOD 1000000007
#define pb push_back
using namespace std;
int main() {
ll n;
cin >> n;
vector<pair<int, int>> v;
ll maxff = 0, maxsf = 0, minfs = INT_MAX, minss = INT_MAX;
for (ll i = 0; i < n; i++) {
ll x, y;
cin >> x >> y;
maxff = max(maxff, x... | #include <bits/stdc++.h>
#define ll long long
#define MOD 1000000007
#define pb push_back
using namespace std;
int main() {
ll n;
cin >> n;
vector<pair<int, int>> v;
ll maxff = INT_MIN, maxsf = INT_MIN, minfs = INT_MAX, minss = INT_MAX;
for (ll i = 0; i < n; i++) {
ll x, y;
cin >> x >> y;
maxff = ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 151 |
n = int(input())
w = []
for i in range(n):
x, y = map(int, input().split())
z.append(x + y)
w.append(x - y)
z.sort()
w.sort()
print(max(z[-1]-z[0], w[-1]-w[0])) | n = int(input())
z = []
w = []
for i in range(n):
x, y = map(int, input().split())
z.append(x + y)
w.append(x - y)
z.sort()
w.sort()
print(max(z[-1]-z[0], w[-1]-w[0])) | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 70], ["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 73]] | 5 | 89 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long int
// #define ll long long int
#define ld long double
#define ff first
#define ss second
#define mp make_pair
#define IOS ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long int
// #define ll long long int
#define ld long double
#define ff first
#define ss second
#define mp make_pair
#define IOS ... | [["-", 75, 76, 0, 9, 0, 37, 0, 2, 63, 22], ["+", 75, 76, 0, 9, 0, 37, 0, 2, 63, 22]] | 1 | 1,056 |
#include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int inf = 2e9;
const LL INF = 0x3f3f3f3f3f3f3f3f;
const int N = 3e5 + 10;
const int M = 1e6 + 10;
const int m... | #include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int inf = 2e9;
const LL INF = 0x3f3f3f3f3f3f3f3f;
const int N = 3e5 + 10;
const int M = 1e6 + 10;
const int m... | [["-", 0, 11, 12, 2, 3, 4, 0, 16, 12, 22], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 12, 22]] | 1 | 443 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define _crt_secure_no_war... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define _crt_secure_no_war... | [["+", 64, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["-", 0, 43, 49, 50, 51, 2, 63, 118, 119, 120], ["+", 51, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["+", 51, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 430 |
#include <iostream>
// #include<cmath>
#include <deque>
#include <stack>
#include <string>
#include <vector>
#define REP(i, a, b) for (int i = (a); i < b; ++i)
#define inf 1e9 + 10
#define MOD 1000000007
using ll = long long;
using ull = unsigned long long;
using namespace std;
inline ll modpow(ll x, ll n, ll mod) {... | #include <iostream>
// #include<cmath>
#include <deque>
#include <stack>
#include <string>
#include <vector>
#define REP(i, a, b) for (int i = (a); i < b; ++i)
#define inf 1e9 + 10
#define MOD 1000000007
using ll = long long;
using ull = unsigned long long;
using namespace std;
inline ll modpow(ll x, ll n, ll mod) {... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33]] | 1 | 408 |
n = int(input())
u = [list(map(int, input().split())) for i in range(n)]
z = [u[i][0] + u[i][1] for i in range(n)]
w = [w[i][0] - w[i][1] for i in range(n)]
d = [max(z)-min(z), max(w)-min(w)]
print(max(d))
| n = int(input())
u = [list(map(int, input().split())) for i in range(n)]
z = [u[i][0] + u[i][1] for i in range(n)]
w = [u[i][0] - u[i][1] for i in range(n)]
d = [max(z)-min(z), max(w)-min(w)]
print(max(d))
| [["-", 12, 658, 8, 657, 31, 206, 51, 206, 51, 22], ["+", 12, 658, 8, 657, 31, 206, 51, 206, 51, 22], ["-", 12, 658, 8, 657, 12, 206, 51, 206, 51, 22], ["+", 12, 658, 8, 657, 12, 206, 51, 206, 51, 22]] | 5 | 116 |
#include <bits/stdc++.h>
#define int long long int
#define endl "\n"
#define mod 1000000007
#define ps(x, noOfDecimal) fixed << setprecision(noOfDecimal) << x
using namespace std;
signed main() {
std::ios::sync_with_stdio(false);
cin.tie();
cout.tie();
int n;
cin >> n;
vector<pair<int, int>> arr;
for (... | #include <bits/stdc++.h>
#define int long long int
#define endl "\n"
#define mod 1000000007
#define ps(x, noOfDecimal) fixed << setprecision(noOfDecimal) << x
using namespace std;
signed main() {
std::ios::sync_with_stdio(false);
cin.tie();
cout.tie();
int n;
cin >> n;
vector<pair<int, int>> arr;
for (... | [["-", 0, 43, 49, 50, 51, 16, 31, 118, 119, 120], ["+", 0, 43, 49, 50, 51, 16, 31, 118, 119, 120], ["-", 0, 43, 49, 50, 51, 16, 12, 118, 119, 120], ["+", 0, 43, 49, 50, 51, 16, 12, 118, 119, 120]] | 1 | 289 |
n=int(input())
xy=[tuple(map(int, input().split())) for _ in range(n)]
fn=[lambda x:x[0]+x[1],lambda x:x[0]+x[1]]
ans=0
for f in fn:
xy.sort(key = f)
ans=max(ans,abs(f(xy[0])-f(xy[-1])))
print(ans) | n=int(input())
xy=[tuple(map(int, input().split())) for _ in range(n)]
fn=[lambda x:x[0]+x[1],lambda x:x[0]-x[1]]
ans=0
for f in fn:
xy.sort(key = f)
ans=max(ans,abs(f(xy[0])-f(xy[-1])))
print(ans) | [["-", 0, 662, 12, 634, 0, 670, 8, 657, 17, 72], ["+", 0, 662, 12, 634, 0, 670, 8, 657, 17, 33]] | 5 | 109 |
// https://atcoder.jp/contests/abc178/tasks/abc178_e
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) FOR(i, 0, n)
#define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
#define ALLR(obj) (obj).rbegin(), (obj).rend()
#defi... | // https://atcoder.jp/contests/abc178/tasks/abc178_e
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) FOR(i, 0, n)
#define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
#define ALLR(obj) (obj).rbegin(), (obj).rend()
#defi... | [["+", 0, 1, 0, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["-", 0, 16, 31, 16, 12, 16, 31, 16, 17, 72], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 21], ["+", 3, 4, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 179 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
// mannhattan distance => 45 degree rotation
// max( abs(x1-x2) + abs(y1-y2) )
// abs(x1-x2) = max( x1-x2, x2-x1)
// => max( abs(x1-x2) + abs(y1-y2) ) = max( x1-x2+y1-y2, x1-x2... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
// mannhattan distance => 45 degree rotation
// max( abs(x1-x2) + abs(y1-y2) )
// abs(x1-x2) = max( x1-x2, x2-x1)
// => max( abs(x1-x2) + abs(y1-y2) ) = max( x1-x2+y1-y2, x1-x2... | [["-", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22]] | 1 | 168 |
#include <bits/stdc++.h>
#include <chrono>
using namespace std;
using namespace chrono;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vii;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define pb push_back
#define odd(x) ((x)&1)
#define even(x) (!od... | #include <bits/stdc++.h>
#include <chrono>
using namespace std;
using namespace chrono;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vii;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define pb push_back
#define odd(x) ((x)&1)
#define even(x) (!od... | [["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22]] | 1 | 912 |
#include <bits/stdc++.h>
using namespace std;
// #define int long long
#define rep(i, n) for (long long i = (long long)(0); i < (long long)(n); ++i)
#define reps(i, n) for (long long i = (long long)(1); i <= (long long)(n); ++i)
#define rrep(i, n) for (long long i = ((long long)(n)-1); i >= 0; i--)
#define rreps(i, n)... | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define rep(i, n) for (long long i = (long long)(0); i < (long long)(n); ++i)
#define reps(i, n) for (long long i = (long long)(1); i <= (long long)(n); ++i)
#define rrep(i, n) for (long long i = ((long long)(n)-1); i >= 0; i--)
#define rreps(i, n)... | [["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33]] | 1 | 461 |
#include <bits/stdc++.h>
using namespace std;
#define fastIO \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define what_is(... | #include <bits/stdc++.h>
using namespace std;
#define fastIO \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define what_is(... | [["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22]] | 1 | 163 |
#include <algorithm>
#include <bits/stdc++.h>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <iomanip>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#in... | #include <algorithm>
#include <bits/stdc++.h>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <iomanip>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#in... | [["-", 0, 11, 12, 2, 3, 4, 0, 69, 28, 22], ["+", 0, 11, 12, 2, 3, 4, 0, 69, 28, 22]] | 1 | 875 |
def seekDistance(n,nodes):
max_z,min_z = searchMaxAndMinZ(n,nodes)
max_w,min_w = searchMaxAndMinW(n,nodes)
return max(max_z-min_z,max_w-min_w)
def searchMaxAndMinZ(n,nodes):
max_z = -1
min_z = 2 * 10 ** 9
for i in range(n):
curr_z = nodes[i][0] + nodes[i][1]
if(curr_z > max_z):
... | def seekDistance(n,nodes):
max_z,min_z = searchMaxAndMinZ(n,nodes)
max_w,min_w = searchMaxAndMinW(n,nodes)
return max(max_z-min_z,max_w-min_w)
def searchMaxAndMinZ(n,nodes):
max_z = -1
min_z = 2 * 10 ** 9
for i in range(n):
curr_z = nodes[i][0] + nodes[i][1]
if(curr_z > max_z):
... | [["-", 8, 196, 0, 1, 0, 662, 12, 664, 28, 612], ["+", 0, 1, 0, 662, 12, 664, 28, 657, 31, 612], ["+", 0, 1, 0, 662, 12, 664, 28, 657, 17, 578], ["+", 0, 1, 0, 662, 12, 664, 28, 657, 12, 612]] | 5 | 218 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
int main() {
cin.tie(0)->sync_with_stdio(false);
int n;
cin >> n;
ll maxP, minP, maxS, minS;
maxP = maxS = 0;
minP = minS = LONG_MAX;
REP(i, n) {
ll x, y;
cin >> x >> y;
maxP =... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
int main() {
cin.tie(0)->sync_with_stdio(false);
int n;
cin >> n;
ll maxP, minP, maxS, minS;
maxP = maxS = INT_MIN;
minP = minS = INT_MAX;
REP(i, n) {
ll x, y;
cin >> x >> y;
m... | [["-", 8, 9, 0, 1, 0, 11, 12, 11, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 11, 12, 22], ["-", 8, 9, 0, 1, 0, 11, 12, 11, 12, 22]] | 1 | 149 |
// No sorceries shall prevail.
import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
public class Main {
static Scanner inp = new Scanner(System.in);
static PrintWriter out = new PrintWriter(System.out);
public static void main(String args[]) {
Main g = new Main();
g.main();
out.clos... | // No sorceries shall prevail.
import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
public class Main {
static Scanner inp = new Scanner(System.in);
static PrintWriter out = new PrintWriter(System.out);
public static void main(String args[]) {
Main g = new Main();
g.main();
out.clos... | [["-", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22]] | 3 | 311 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in);) {
int n = sc.nextInt();
int[] x = new int[n];
int[] y = new int[n];
int minValue1 = Integer.MAX_VALUE;
int maxValue1 = Integer.MIN_VALUE;
int min... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in);) {
int n = sc.nextInt();
int[] x = new int[n];
int[] y = new int[n];
int minValue1 = Integer.MAX_VALUE;
int maxValue1 = Integer.MIN_VALUE;
int min... | [["-", 0, 57, 64, 196, 0, 1, 0, 11, 12, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 12, 22]] | 3 | 238 |
from __future__ import print_function
from functools import reduce
from operator import mul
from collections import Counter
from collections import deque
from itertools import accumulate
from queue import Queue
from queue import PriorityQueue as pq
from heapq import heapreplace
from heapq import heapify
from heapq imp... | from __future__ import print_function
from functools import reduce
from operator import mul
from collections import Counter
from collections import deque
from itertools import accumulate
from queue import Queue
from queue import PriorityQueue as pq
from heapq import heapreplace
from heapq import heapify
from heapq imp... | [["-", 0, 662, 12, 660, 0, 652, 3, 4, 0, 22], ["+", 0, 662, 12, 660, 0, 652, 3, 4, 0, 22]] | 5 | 1,104 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v1, v2;
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
v1.push_back(x + y);
v2.push_back(x - y);
}
sort(v1.begin(), v2.end());
sort(v2.begin(), v2.end());
cout << max(v1[n - 1] - v1[0], v2[n -... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v1, v2;
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
v1.push_back(x + y);
v2.push_back(x - y);
}
sort(v1.begin(), v1.end());
sort(v2.begin(), v2.end());
cout << max(v1[n - 1] - v1[0], v2[n -... | [["-", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22]] | 1 | 134 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
using namespace std;
#define INF ((1 << 30) - 1)
#define LINF (1LL << 60)
#define EPS (1e-10)
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
const int MOD2 = 998244353;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
using namespace std;
#define INF ((1 << 30) - 1)
#define LINF (1LL << 60)
#define EPS (1e-10)
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
const int MOD2 = 998244353;
... | [["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33]] | 1 | 168 |
#include <bits/stdc++.h>
using namespace std;
#define dist(j, i) (abs(dist[0][i] - dist[0][j]) + abs(dist[1][i] - dist[1][j]))
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
int maxplusy = -1, maxsuby = -1123456789;
int minxplusy = 1123456789, minxsuby = 1123456789;
while (n-... | #include <bits/stdc++.h>
using namespace std;
#define dist(j, i) (abs(dist[0][i] - dist[0][j]) + abs(dist[1][i] - dist[1][j]))
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
int maxplusy = -1, maxsuby = -1123456789;
int minxplusy = 2000000001, minxsuby = 1123456789;
while (n-... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 31, 16, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 17, 33]] | 1 | 153 |
n = int(input())
maxx, minx, maxy, miny = -1**10, 1**10, -1**10, 1**10
for _ in range(n):
x, y = map(int, input().split())
x, y = x+y, x-y
maxx = max(maxx, x)
minx = min(minx, x)
maxy = max(maxy, y)
miny = min(miny, y)
print(max(maxx - minx, maxy - miny))
| n = int(input())
maxx, minx, maxy, miny = -10**10, 10**10, -10**10, 10**10
for _ in range(n):
x, y = map(int, input().split())
x, y = x+y, x-y
maxx = max(maxx, x)
minx = min(minx, x)
maxy = max(maxy, y)
miny = min(miny, y)
print(max(maxx - minx, maxy - miny))
| [["-", 0, 662, 12, 432, 0, 664, 28, 657, 31, 612], ["+", 0, 662, 12, 432, 0, 664, 28, 657, 31, 612], ["-", 0, 1, 0, 662, 12, 432, 0, 657, 31, 612], ["+", 0, 1, 0, 662, 12, 432, 0, 657, 31, 612]] | 5 | 113 |
#include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\... | [["-", 0, 11, 12, 2, 3, 4, 0, 2, 63, 22], ["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 12, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 170 |
#include <bits/stdc++.h>
#define ll long long
#define INF 0x3f3f3f3f
#define MM(arr, x) memset(arr, x, sizeof(x))
const int Mod = 1e9 + 7;
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n), b(n);
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
a[i] = x + y;
b[i] = x - y;... | #include <bits/stdc++.h>
#define ll long long
#define INF 0x3f3f3f3f
#define MM(arr, x) memset(arr, x, sizeof(x))
const int Mod = 1e9 + 7;
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n), b(n);
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
a[i] = x + y;
b[i] = x - y;... | [["-", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["+", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22]] | 1 | 162 |
def LI():
return list(map(int, input().split()))
pu = []
mi = []
N = int(input())
for _ in range(N):
x, y = LI()
pu.append(x+y)
mi.append(x-y)
P = max(pu)
p = min(pu)
M = max(mi)
m = max(mi)
print(max(P-p, M-m))
| def LI():
return list(map(int, input().split()))
pu = []
mi = []
N = int(input())
for _ in range(N):
x, y = LI()
pu.append(x+y)
mi.append(x-y)
P = max(pu)
p = min(pu)
M = max(mi)
m = min(mi)
print(max(P-p, M-m))
| [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 105 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
cin >> n;
int z1 = 0, z2 = 2000000000, w1 = 0, w2 = z2;
for (int i = 0; i < n; ++i) {
int x, y;
cin >> x >> y;
z1 = max(z1, x + y);
z2 = min(z2, x + y);
w1 = max(w1, x - y);
w2 = min(w2, x - y);
}
cout << max(z1 - ... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
cin >> n;
int z1 = -2000000000, z2 = 2000000000, w1 = z1, w2 = z2;
for (int i = 0; i < n; ++i) {
int x, y;
cin >> x >> y;
z1 = max(z1, x + y);
z2 = min(z2, x + y);
w1 = max(w1, x - y);
w2 = min(w2, x - y);
}
cout <... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 124 |
n = int(input())
zm = -2e10
zn = 30000000000
wm = -2e10
wn = 30000000000
while(n):
x,y = map(int,input().split())
zm = max(zm,x+y)
zn = min(zn,x+y)
wm = max(wm,x-y)
wn = min(wn,x-y)
n-=1
print(max(zm-zn,wm,wn)) | n = int(input())
zm = -2e10
zn = 30000000000
wm = -2e10
wn = 30000000000
while(n):
x,y = map(int,input().split())
zm = max(zm,x+y)
zn = min(zn,x+y)
wm = max(wm,x-y)
wn = min(wn,x-y)
n-=1
print(max(zm-zn,wm-wn))
| [["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 17, 33]] | 5 | 99 |
#pragma GCC optimize(2)
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
co... | #pragma GCC optimize(2)
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
co... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 28, 22], ["-", 8, 9, 0, 1, 0, 34, 12, 11, 12, 13], ["+", 0, 1, 0, 34, 12, 11, 12, 91, 17, 33], ["+", 0, 1, 0, 34, 12, 11, 12, 91, 28, 22]] | 1 | 257 |
#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 1000;
typedef long long ll;
int n;
ll x, y;
ll a[N], b[N];
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%lld %lld", &x, &y);
a[i] = x + y;
b[i] = x - y;
}
sort(a + 1, a + 1 + n);
sort(b + 1, b + 1 + n);
cout... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 1000;
typedef long long ll;
int n;
ll x, y;
ll a[N], b[N];
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%lld %lld", &x, &y);
a[i] = x + y;
b[i] = x - y;
}
sort(a + 1, a + 1 + n);
sort(b + 1, b + 1 + n);
cout... | [["-", 12, 2, 3, 4, 0, 23, 0, 34, 0, 21], ["+", 12, 2, 3, 4, 0, 23, 0, 16, 17, 33]] | 1 | 158 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define repr(i, n) for (int i = n - 1; i >= 0; i--)
#define repr1(i, n) for (int i = n; i >= 1; i--)
#define all(v) v.begin(), v.end()
using ll = long long;
using pii = pair<int, i... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define repr(i, n) for (int i = n - 1; i >= 0; i--)
#define repr1(i, n) for (int i = n; i >= 1; i--)
#define all(v) v.begin(), v.end()
using ll = long long;
using pii = pair<int, i... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 28, 22]] | 1 | 376 |
N = int(input())
M0 = M1 = 0
m0 = m1 = float('inf')
for _ in range(N):
x, y = map(int, input().split())
M0 = max(M0, x - y)
m0 = min(m0, x - y)
M1 = max(M1, x + y)
m1 = min(m1, x + y)
print(max(M0 - m0, M1 - m1)) | N = int(input())
M0 = M1 = -float('inf')
m0 = m1 = float('inf')
for _ in range(N):
x, y = map(int, input().split())
M0 = max(M0, x - y)
m0 = min(m0, x - y)
M1 = max(M1, x + y)
m1 = min(m1, x + y)
print(max(M0 - m0, M1 - m1)) | [["-", 0, 656, 0, 1, 0, 662, 12, 662, 12, 612], ["+", 0, 1, 0, 662, 12, 662, 12, 664, 17, 33], ["+", 0, 662, 12, 662, 12, 664, 28, 652, 63, 22], ["+", 12, 662, 12, 664, 28, 652, 3, 4, 0, 24], ["+", 12, 664, 28, 652, 3, 4, 0, 557, 0, 654], ["+", 12, 664, 28, 652, 3, 4, 0, 557, 0, 6], ["+", 12, 664, 28, 652, 3, 4, 0, 557... | 5 | 100 |
(async () => {
let input = '';
for await (const chunk of process.stdin)
input += chunk;
let lines = input.split(/\n/);
const n = lines.shift();
const points = lines.slice(0, n).map(line => line.split(/\s/).map(v => +v));
let min = Infinity;
let max = 0;
let min_ = Infinity;
let max_ = 0;
for (c... | (async () => {
let input = '';
for await (const chunk of process.stdin)
input += chunk;
let lines = input.split(/\n/);
const n = lines.shift();
const points = lines.slice(0, n).map(line => line.split(/\s/).map(v => +v));
let min = Infinity;
let max = -Infinity;
let min_ = Infinity;
let max_ = -In... | [["-", 0, 568, 8, 556, 0, 570, 0, 200, 51, 555], ["+", 8, 556, 0, 570, 0, 200, 51, 91, 17, 33], ["+", 8, 556, 0, 570, 0, 200, 51, 91, 28, 22]] | 2 | 209 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int N;
cin >> N;
vector<pair<int, int>> CSD(N);
for (int i = 0; i < N; i++) {
int x, y;
cin >> x >> y;
CSD[i] = make_pair(x + y, x - y);
}
sort(CSD.begin(), CSD.end());
int MIN1 = CSD[0].first, MAX1 = CSD[N - 1].... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int N;
cin >> N;
vector<pair<int, int>> CSD(N);
for (int i = 0; i < N; i++) {
int x, y;
cin >> x >> y;
CSD[i] = make_pair(x + y, x - y);
}
sort(CSD.begin(), CSD.end());
int MIN1 = CSD[0].first, MAX1 = CSD[N - 1].... | [["-", 12, 118, 28, 69, 341, 342, 0, 16, 31, 22], ["-", 12, 118, 28, 69, 341, 342, 0, 16, 17, 33], ["-", 12, 118, 28, 69, 341, 342, 0, 16, 12, 13], ["+", 0, 11, 12, 118, 28, 69, 341, 342, 0, 13]] | 1 | 213 |
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> x(n), y(n);
for (int i = 0; i < n; i++)
cin >> x[i] >> y[i];
long long ans = 0;
long long mx = 0, mn = 20000000... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> x(n), y(n);
for (int i = 0; i < n; i++)
cin >> x[i] >> y[i];
long long ans = 0;
long long mx = -20000000000, mn... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]] | 1 | 214 |
#pragma region
#define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <ve... | #pragma region
#define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <ve... | [["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25]] | 1 | 522 |
package main
import (
"bufio"
"fmt"
"os"
"sort"
"strconv"
)
func out(x ...interface{}) {
fmt.Println(x...)
}
var sc = bufio.NewScanner(os.Stdin)
func getInt() int {
sc.Scan()
i, e := strconv.Atoi(sc.Text())
if e != nil {
panic(e)
}
return i
}
func getInts(N int) []int {
ret := make([]int, N)
for i :... | package main
import (
"bufio"
"fmt"
"os"
"sort"
"strconv"
)
func out(x ...interface{}) {
fmt.Println(x...)
}
var sc = bufio.NewScanner(os.Stdin)
func getInt() int {
sc.Scan()
i, e := strconv.Atoi(sc.Text())
if e != nil {
panic(e)
}
return i
}
func getInts(N int) []int {
ret := make([]int, N)
for i :... | [["-", 0, 435, 8, 196, 0, 431, 12, 432, 0, 433], ["+", 8, 196, 0, 431, 12, 432, 0, 91, 17, 33], ["+", 8, 196, 0, 431, 12, 432, 0, 91, 439, 22]] | 7 | 569 |
#include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define PI 3.14159265359
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
vector<P> points(n);
rep(i, n) { cin >> points[i].first >> points[i].second; }
ll minx = 1000... | #include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define PI 3.14159265359
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
vector<P> points(n);
rep(i, n) { cin >> points[i].first >> points[i].second; }
ll minx = 1000... | [["-", 51, 16, 31, 2, 3, 4, 0, 16, 12, 22], ["+", 51, 16, 31, 2, 3, 4, 0, 16, 12, 22]] | 1 | 321 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double db;
#define MOD 1000000007
#define mini 18446744073709551615
#define ff first
#define ss second
#define pb push_back
#define vii vector<int>
#define pii pair<int, int>
#define vpii vector<pii>
int ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double db;
#define MOD 1000000007
#define mini 18446744073709551615
#define ff first
#define ss second
#define pb push_back
#define vii vector<int>
#define pii pair<int, int>
#define vpii vector<pii>
int ... | [["-", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 52, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 197 |
from math import *
import fractions
import sys
import collections
import itertools
import pprint
from collections import deque
from heapq import *
import copy
N=int(input())
points=[list(map(int,input().split())) for _ in range(N)]
chebmax0=-float("inf")
chebmin0=float("inf")
chebmax1=-float("inf")
chebmin1=float("in... | from math import *
import fractions
import sys
import collections
import itertools
import pprint
from collections import deque
from heapq import *
import copy
N=int(input())
points=[list(map(int,input().split())) for _ in range(N)]
chebmax0=-float("inf")
chebmin0=float("inf")
chebmax1=-float("inf")
chebmin1=float("in... | [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22]] | 5 | 191 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++) // iをaからn
#define per(i, a, n) for (int i = a - 1; i >= n; i--) // iをnからa
#define db(x) cout << #x << " = " << x << endl
#define db2(x, y) \
cout << "(" << #... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++) // iをaからn
#define per(i, a, n) for (int i = a - 1; i >= n; i--) // iをnからa
#define db(x) cout << #x << " = " << x << endl
#define db2(x, y) \
cout << "(" << #... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 28, 22]] | 1 | 230 |
//高知能系Vtuberの高井茅乃です。
// Twitter: https://twitter.com/takaichino
// YouTube: https://www.youtube.com/channel/UCTOxnI3eOI_o1HRgzq-LEZw
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF INT_MAX
#define LLINF LLONG_MAX
#define REP(i, n) for (int i = 0; i < n; i++)
#define REP1(i, n) for (int... | //高知能系Vtuberの高井茅乃です。
// Twitter: https://twitter.com/takaichino
// YouTube: https://www.youtube.com/channel/UCTOxnI3eOI_o1HRgzq-LEZw
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF INT_MAX
#define LLINF LLONG_MAX
#define REP(i, n) for (int i = 0; i < n; i++)
#define REP1(i, n) for (int... | [["-", 8, 9, 0, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 0, 9, 0, 43, 49, 50, 51, 91, 28, 22]] | 1 | 295 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, N) for (int i = 0; i < (int)(N); i++)
// chmax, chmin
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a =... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, N) for (int i = 0; i < (int)(N); i++)
// chmax, chmin
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a =... | [["-", 51, 2, 3, 4, 0, 16, 31, 69, 28, 22], ["+", 51, 2, 3, 4, 0, 16, 31, 69, 28, 22], ["-", 51, 2, 3, 4, 0, 16, 12, 69, 28, 22], ["+", 51, 2, 3, 4, 0, 16, 12, 69, 28, 22]] | 1 | 280 |
#!/usr/bin/env python3
import sys
def solve(N: int, x):
x = list(set(x))
xs = [_[0] for _ in x]
ys = [_[1] for _ in x]
sum_n = [x_+y_ for x_, y_ in zip(xs, ys)]
sum_m = [x_-y_ for (x_,y_) in zip(xs, ys)]
a = max(max(sum_n)- min(sum_n), max(sum_m)-min(sum_n))
print(a)
return
# ... | #!/usr/bin/env python3
import sys
def solve(N: int, x):
x = list(set(x))
xs = [_[0] for _ in x]
ys = [_[1] for _ in x]
sum_n = [x_+y_ for x_, y_ in zip(xs, ys)]
sum_m = [x_-y_ for (x_,y_) in zip(xs, ys)]
a = max(max(sum_n)- min(sum_n), max(sum_m)-min(sum_m))
print(a)
return
# ... | [["-", 3, 4, 0, 657, 12, 652, 3, 4, 0, 22], ["+", 3, 4, 0, 657, 12, 652, 3, 4, 0, 22]] | 5 | 226 |
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("avx2")
// 293206GT
#include <algorithm>
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stri... | //#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("avx2")
// 293206GT
#include <algorithm>
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stri... | [["-", 0, 41, 75, 118, 28, 2, 63, 118, 119, 120], ["+", 0, 41, 75, 118, 28, 2, 63, 118, 119, 120]] | 1 | 1,349 |
N = int(input())
Array1 = []
Array2 = []
for i in range(N):
next_x, next_y = map(int, input().split())
s = next_x + next_y
t = next_x - next_y
Array1.append(s)
Array2.append(t)
print(max(max(Array1)-min(Array1),max(Array2)-min(Array1))) | N = int(input())
Array1 = []
Array2 = []
for i in range(N):
next_x, next_y = map(int, input().split())
s = next_x + next_y
t = next_x - next_y
Array1.append(s)
Array2.append(t)
print(max(max(Array1)-min(Array1),max(Array2)-min(Array2))) | [["-", 3, 4, 0, 657, 12, 652, 3, 4, 0, 22], ["+", 3, 4, 0, 657, 12, 652, 3, 4, 0, 22]] | 5 | 87 |
n = int(input())
l = []
ll = []
for _ in range(n):
x, y = map(int, input().split())
l.append((x+y, x, y))
ll.append((x-y, x, y))
l.sort()
ll.sort()
ans1 = 0
ans2 = 0
#print(l)
#print(ll)
cnt = 0
while True:
a = l[n-1-cnt]
b = l[cnt]
#print(a, b)
if a[1] >= b[1] and a[2] >= b[2]:
ans... | n = int(input())
l = []
ll = []
for _ in range(n):
x, y = map(int, input().split())
l.append((x+y, x, y))
ll.append((x-y, x, y))
l.sort()
ll.sort()
ans1 = 0
ans2 = 0
#print(l)
#print(ll)
cnt = 0
while True:
a = l[n-1-cnt]
b = l[cnt]
#print(a, b)
if a[1] >= b[1] and a[2] >= b[2]:
ans... | [["-", 8, 196, 0, 1, 0, 662, 12, 206, 51, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 206, 51, 22], ["-", 0, 57, 15, 679, 31, 666, 0, 206, 51, 22], ["+", 0, 57, 15, 679, 31, 666, 0, 206, 51, 22], ["-", 0, 57, 15, 679, 31, 666, 0, 206, 206, 612], ["+", 0, 57, 15, 679, 31, 666, 0, 206, 206, 612], ["-", 0, 57, 15, 679, 12, 666, ... | 5 | 236 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ll power(ll x, ll y) {
ll res = 1;
x = x % mod;
while (y > 0) {
if (y & 1)
res = (res * x) % mod;
y = y >> 1;
x = (x * x) % ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
ll power(ll x, ll y) {
ll res = 1;
x = x % mod;
while (y > 0) {
if (y & 1)
res = (res * x) % mod;
y = y >> 1;
x = (x * x) % ... | [["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22]] | 1 | 404 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
template <typename T> void fin(T a) {
cout << a << endl;
exit(0);
}
template <typename S> void print(S a) { cout << a << endl; }
template <typename U> void pprint(U ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
template <typename T> void fin(T a) {
cout << a << endl;
exit(0);
}
template <typename S> void print(S a) { cout << a << endl; }
template <typename U> void pprint(U ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 235 |
#include <algorithm>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using ... | #include <algorithm>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using ... | [["-", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 48], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22], ["+", 0, 52, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 326 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
using pil = pair<int, ll>;
using uint = unsigned int;
template <typename T> using Graph = vector<vector<T>>;
const ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
using pil = pair<int, ll>;
using uint = unsigned int;
template <typename T> using Graph = vector<vector<T>>;
const ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 243 |
#include <algorithm>
#include <cstdio>
using namespace std;
typedef long long ll;
struct Point {
ll x, y;
Point(ll x = 0, ll y = 0) : x(x), y(y) {}
};
typedef Point Vector;
Vector operator+(Vector A, Vector B) { return Vector(A.x + B.x, A.y + B.y); }
Vector operator-(Vector A, Vector B) { return Vector(A.x - B.x,... | #include <algorithm>
#include <cstdio>
using namespace std;
typedef long long ll;
struct Point {
ll x, y;
Point(ll x = 0, ll y = 0) : x(x), y(y) {}
};
typedef Point Vector;
Vector operator+(Vector A, Vector B) { return Vector(A.x + B.x, A.y + B.y); }
Vector operator-(Vector A, Vector B) { return Vector(A.x - B.x,... | [["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["-", 3, 4, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 21]] | 1 | 877 |
N = int(input())
XY_max = -10**10
XY_min = 10**10
YX_max = -10**10
YX_min = 10**10
for _ in range(N):
x,y = map(int, input().split())
XY_max = max(XY_max,x+y)
XY_min = min(XY_min,x+y)
YX_max = max(YX_max,x-y)
YX_min = max(YX_min,x-y)
print(max(XY_max-XY_min,YX_max-YX_min)) | N = int(input())
XY_max = -10**10
XY_min = 10**10
YX_max = -10**10
YX_min = 10**10
for _ in range(N):
x,y = map(int, input().split())
XY_max = max(XY_max,x+y)
XY_min = min(XY_min,x+y)
YX_max = max(YX_max,x-y)
YX_min = min(YX_min,x-y)
print(max(XY_max-XY_min,YX_max-YX_min)) | [["-", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 107 |
#include "bits/stdc++.h"
using namespace std;
// clang-format off
using i64 = int64_t;
using i32 = int32_t;
#define all(x) x.begin(), x.end()
#define int i64
template <class T, typename U> constexpr inline bool exist(const T &s, const U &e) { return s.find(e) != s.end(); }
template <class T> constexpr inline i32 SZ(con... | #include "bits/stdc++.h"
using namespace std;
// clang-format off
using i64 = int64_t;
using i32 = int32_t;
#define all(x) x.begin(), x.end()
#define int i64
template <class T, typename U> constexpr inline bool exist(const T &s, const U &e) { return s.find(e) != s.end(); }
template <class T> constexpr inline i32 SZ(con... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 1,002 |
#include <bits/stdc++.h>
using namespace std;
typedef struct {
long long x, y;
} Point;
Point f(Point p) {
Point a;
a.x = p.x - p.y;
a.y = p.x + p.y;
return a;
}
long long N, ans = 0LL, ma, mi;
int main() {
cin >> N;
vector<Point> P(N);
for (int i = 0; i < N; i++) {
cin >> P[i].x >> P[i].y;
}
... | #include <bits/stdc++.h>
using namespace std;
typedef struct {
long long x, y;
} Point;
Point f(Point p) {
Point a;
a.x = p.x - p.y;
a.y = p.x + p.y;
return a;
}
long long N, ans = 0LL, ma, mi;
int main() {
cin >> N;
vector<Point> P(N);
for (int i = 0; i < N; i++) {
cin >> P[i].x >> P[i].y;
}
... | [["-", 8, 9, 0, 1, 0, 34, 31, 11, 12, 13], ["+", 8, 9, 0, 1, 0, 34, 31, 11, 12, 13]] | 1 | 259 |
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define square(x) pow(x, 2.0)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define max_queue(x) priority_queue<x>
#define min_queue... | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define square(x) pow(x, 2.0)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define max_queue(x) priority_queue<x>
#define min_queue... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 28, 22]] | 1 | 332 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
/*
ll gcds(ll a,ll b){
if(a<b){
swap(a,b);
}
ll r=a%b;
if(r==0){
return b;
}
while(r>0){
r=a%b;
a=b;
b=r;
}
return a;
}
ll lcms(ll a,ll b){
ll mmr=gcds(a,b);
a=a/mmr;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
/*
ll gcds(ll a,ll b){
if(a<b){
swap(a,b);
}
ll r=a%b;
if(r==0){
return b;
}
while(r>0){
r=a%b;
a=b;
b=r;
}
return a;
}
ll lcms(ll a,ll b){
ll mmr=gcds(a,b);
a=a/mmr;
... | [["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["-", 3, 4, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 343 |
#include <algorithm>
#include <cstdint>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF 1000000000
#define LLINF 2000000000000000000
#define MOD 1000000007
using namespace std;
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define ... | #include <algorithm>
#include <cstdint>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF 1000000000
#define LLINF 2000000000000000000
#define MOD 1000000007
using namespace std;
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define ... | [["-", 0, 11, 12, 11, 12, 16, 12, 69, 28, 22], ["+", 0, 11, 12, 11, 12, 16, 12, 69, 28, 22], ["-", 0, 43, 49, 50, 51, 16, 31, 69, 28, 22], ["+", 0, 43, 49, 50, 51, 16, 31, 69, 28, 22], ["-", 0, 43, 49, 50, 51, 16, 12, 69, 28, 22], ["+", 0, 43, 49, 50, 51, 16, 12, 69, 28, 22]] | 1 | 284 |
// Problem : E - Dist Max
// Contest : AtCoder - AtCoder Beginner Contest 178
// URL : https://atcoder.jp/contests/abc178/tasks/abc178_e
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;
#define ff first
#defi... |
// Problem : E - Dist Max
// Contest : AtCoder - AtCoder Beginner Contest 178
// URL : https://atcoder.jp/contests/abc178/tasks/abc178_e
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;
#define ff first
#defi... | [["-", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 22]] | 1 | 334 |
#include <bits/stdc++.h>
#define ll long long int
#define uu first
#define vv second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define tp tuple<int, int, int>
#define fastio \
ios_base::sync_with_stdio(0); ... | #include <bits/stdc++.h>
#define ll long long int
#define uu first
#define vv second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define tp tuple<int, int, int>
#define fastio \
ios_base::sync_with_stdio(0); ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 28, 22]] | 1 | 253 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.