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 |
|---|---|---|---|---|
N,*f = map(int, open(0).read().split())
xy = [f[i*2:i*2+2] for i in range(N)]
s = [sum(z) for z in xy]
a = max(s) - min(s)
t = [abs(z[0]-z[1]) for z in xy]
b = max(t) - min(t)
print(max(a,b)) | N,*f = map(int, open(0).read().split())
xy = [f[i*2:i*2+2] for i in range(N)]
s = [sum(z) for z in xy]
a = max(s) - min(s)
t = [z[0]-z[1] for z in xy]
b = max(t) - min(t)
print(max(a,b)) | [["-", 0, 1, 0, 662, 12, 658, 8, 652, 63, 22], ["-", 0, 662, 12, 658, 8, 652, 3, 4, 0, 24], ["-", 0, 662, 12, 658, 8, 652, 3, 4, 0, 25]] | 5 | 108 |
n = int(input())
l = []
for i in range(n):
l.append(list(map(int,input().split())))
m = []
for i in l:
a,b = i
k.append(a+b)
m.append(a-b)
k.sort()
m.sort()
print(max([k[-1]-k[0],m[-1] -m[0]])) | n = int(input())
l = []
for i in range(n):
l.append(list(map(int,input().split())))
k = []
m = []
for i in l:
a,b = i
k.append(a+b)
m.append(a-b)
k.sort()
m.sort()
print(max([k[-1]-k[0],m[-1] -m[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 | 109 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
ll a1, a2, b1, b2;
for (ll i = 0; i < n; i++) {
ll p, q;
cin >> p >> q;
if (i == 0) {
a1 = p + q;
a2 = p + q;
b1 = abs(p - q);
b2 = b1;
}
a1 = max(a1, p + q);
a2 = mi... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
ll a1, a2, b1, b2;
for (ll i = 0; i < n; i++) {
ll p, q;
cin >> p >> q;
if (i == 0) {
a1 = p + q;
a2 = p + q;
b1 = (p - q);
b2 = b1;
}
a1 = max(a1, p + q);
a2 = min(a... | [["-", 64, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["-", 0, 11, 12, 2, 3, 4, 0, 2, 63, 22]] | 1 | 163 |
def solve(xy):
ans = 0
pos = [xy[0] for _ in range(4)]
for p in xy:
if pos[0][0] + pos[0][1] < p[0] + p[1]:
pos[0] = p
if pos[1][0] + pos[1][1] > p[0] + p[1]:
pos[1] = p
if pos[2][0] - pos[2][1] < p[0] - p[1]:
pos[2] = p
if pos[3][0] - pos... | def solve(xy):
ans = 0
pos = [xy[0] for _ in range(4)]
for p in xy:
if pos[0][0] + pos[0][1] < p[0] + p[1]:
pos[0] = p
if pos[1][0] + pos[1][1] > p[0] + p[1]:
pos[1] = p
if pos[2][0] - pos[2][1] < p[0] - p[1]:
pos[2] = p
if pos[3][0] - pos... | [["-", 3, 4, 0, 657, 31, 657, 31, 657, 17, 72], ["+", 3, 4, 0, 657, 31, 657, 31, 657, 17, 33], ["-", 0, 37, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 37, 0, 652, 3, 4, 0, 657, 17, 72]] | 5 | 276 |
N = int(input())
x = []
y = []
for i in range(N):
in1, in2 = list(map(int,input().split()))
x.append(in1)
y.append(in2)
#f = [[0]*2 for i in range(N)]
X=[]
Y=[]
for i in range(N):
#f[i][0] = x[i]-x[i]
#f[i][1] = x[i]+y[i]
X.append(x[i]-x[i])
Y.append(x[i]+y[i])
dam1 = max(X) - min(X)
dam... |
N = int(input())
x = []
y = []
for i in range(N):
in1, in2 = list(map(int,input().split()))
x.append(in1)
y.append(in2)
#f = [[0]*2 for i in range(N)]
X=[]
Y=[]
for i in range(N):
#f[i][0] = x[i]-x[i]
#f[i][1] = x[i]+y[i]
X.append(x[i]-y[i])
Y.append(x[i]+y[i])
dam1 = max(X) - min(X)
dam... | [["-", 0, 652, 3, 4, 0, 657, 12, 206, 51, 22], ["+", 0, 652, 3, 4, 0, 657, 12, 206, 51, 22]] | 5 | 133 |
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;
class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[102... | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;
class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[102... | [["+", 8, 196, 0, 503, 49, 200, 51, 16, 17, 85], ["+", 8, 196, 0, 503, 49, 200, 51, 16, 12, 499], ["-", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22]] | 3 | 699 |
n=int(input())
xbox=[]
ybox=[]
for i in range(n):
x,y = map(int,input().split())
xbox.append(x)
ybox.append(y)
xmax=max(xbox)
xmin = min(xbox)
ymax=max(ybox)
ymin=min(ybox)
box1=[]
box2=[]
box3=[]
box4=[]
for i in range(n):
box1.append(xmax+ymax-xbox[i]-ybox[i])
box2.append(-xmin + ymax + xbox[i] - ... | n=int(input())
xbox=[]
ybox=[]
for i in range(n):
x,y = map(int,input().split())
xbox.append(x)
ybox.append(y)
xmax=max(xbox)
xmin = min(xbox)
ymax=max(ybox)
ymin=min(ybox)
box1=[]
box2=[]
box3=[]
box4=[]
for i in range(n):
box1.append(xmax+ymax-xbox[i]-ybox[i])
box2.append(-xmin + ymax + xbox[i] - ... | [["-", 8, 196, 0, 1, 0, 652, 63, 319, 500, 22], ["+", 8, 196, 0, 1, 0, 652, 63, 319, 500, 22]] | 5 | 221 |
/*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
*$* WRITER:kakitamasziru/OxOmisosiru *$*
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/
#ifdef LOCAL_JUDGE
#define _GLIBCXX_DEBUG
#endif
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cmath> //abs,,,
#includ... | /*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
*$* WRITER:kakitamasziru/OxOmisosiru *$*
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/
#ifdef LOCAL_JUDGE
#define _GLIBCXX_DEBUG
#endif
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset> // bitset
#include <cmath> //abs,,,
#includ... | [["-", 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 | 403 |
import sys
readline = sys.stdin.readline
N = int(readline())
A = []
B = []
for _ in range(N):
x, y = map(int, readline().split())
A.append(abs(x-y))
B.append(abs(x+y))
print(max(max(A) - min(A), max(B) - min(B))) | import sys
readline = sys.stdin.readline
N = int(readline())
A = []
B = []
for _ in range(N):
x, y = map(int, readline().split())
A.append(x-y)
B.append(x+y)
print(max(max(A) - min(A), max(B) - min(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 | 96 |
n = gets.to_i
a, b = n.times.map{gets.split.map(&:to_i)}.transpose
max_ab = 0
min_ab = 100000000000
max_a_b = 0
min_a_b = 100000000000
n.times do |i|
max_ab = [max_ab,a[i]+b[i]].max
min_ab = [min_ab,a[i]+b[i]].min
max_a_b = [max_a_b,a[i]-b[i]].max
min_a_b = [min_a_b,a[i]-b[i]].min
end
puts [max_ab-min_ab,max_a_... | n = gets.to_i
a, b = n.times.map{gets.split.map(&:to_i)}.transpose
max_ab = -100000000000
min_ab = 100000000000
max_a_b = -100000000000
min_a_b = 100000000000
n.times do |i|
max_ab = [max_ab,a[i]+b[i]].max
min_ab = [min_ab,a[i]+b[i]].min
max_a_b = [max_a_b,a[i]-b[i]].max
min_a_b = [min_a_b,a[i]-b[i]].min
end
pu... | [["-", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["+", 36, 36, 0, 493, 0, 662, 12, 748, 17, 33], ["+", 36, 36, 0, 493, 0, 662, 12, 748, 439, 612]] | 4 | 127 |
N = int(input())
z = []
zz = []
for _ in range(N):
x, y = map(int, input().split())
zz.append(x-y)
z.append(x+y)
z.sort()
zz.sort()
ans = z[-1]-z[0]
ans = max(ans, zz[-1]+zz[0])
print(ans) | N = int(input())
z = []
zz = []
for _ in range(N):
x, y = map(int, input().split())
zz.append(x-y)
z.append(x+y)
z.sort()
zz.sort()
ans = z[-1]-z[0]
ans = max(ans, zz[-1]-zz[0])
print(ans) | [["-", 0, 662, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33]] | 5 | 99 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a) for (int i = 0; i < (int)(a); i++)
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
typedef long long ll;
template <typename T> istream &operator>>(istream &i, vector<T> &v) {
rep(j, sz(v)) i >> v[j];
return i;
}
template <typename T> st... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a) for (int i = 0; i < (int)(a); i++)
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
typedef long long ll;
template <typename T> istream &operator>>(istream &i, vector<T> &v) {
rep(j, sz(v)) i >> v[j];
return i;
}
template <typename T> st... | [["-", 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 | 796 |
#include <bits/stdc++.h>
using namespace std;
using lli = long long;
#define rep(i, n) for (int i = 0; i < n; i++)
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
r... | #include <bits/stdc++.h>
using namespace std;
using lli = long long;
#define rep(i, n) for (int i = 0; i < n; i++)
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
r... | [["-", 8, 9, 0, 1, 0, 11, 12, 11, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 11, 12, 13]] | 1 | 227 |
import sys, math
from functools import lru_cache
sys.setrecursionlimit(10**9)
MOD = 10**9+7
def input():
return sys.stdin.readline()[:-1]
def mi():
return map(int, input().split())
def ii():
return int(input())
def i2(n):
tmp = [list(mi()) for i in range(n)]
return [list(i) for i in zip(*tmp)]
... | import sys, math
from functools import lru_cache
sys.setrecursionlimit(10**9)
MOD = 10**9+7
def input():
return sys.stdin.readline()[:-1]
def mi():
return map(int, input().split())
def ii():
return int(input())
def i2(n):
tmp = [list(mi()) for i in range(n)]
return [list(i) for i in zip(*tmp)]
... | [["-", 0, 662, 12, 652, 3, 668, 8, 652, 63, 22], ["-", 12, 652, 3, 668, 8, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 668, 8, 652, 3, 4, 0, 25], ["-", 0, 1, 0, 662, 12, 652, 3, 668, 0, 24]] | 5 | 240 |
/*#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define Fast \
ios_base::sync_with_stdio(fals... | /*#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define Fast \
ios_base::sync_with_stdio(fals... | [["-", 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]] | 1 | 748 |
n = int(input().strip())
l = []
for i in range(n):
x, y = map(int, input().split())
a = y + x
b = y - x
l.append([x, y, a, b])
la = sorted(l, key=lambda z: z[2])
lb = sorted(l, key=lambda z: z[3])
print(max(abs(la[0][0] - la[-1][0]) + abs(la[0][1]-la[-1][1]),
abs(lb[0][0] - lb[-1][0]) + ab... | n = int(input().strip())
l = []
for i in range(n):
x, y = map(int, input().split())
a = y + x
b = y - x
l.append([x, y, a, b])
la = sorted(l, key=lambda z: z[2])
lb = sorted(l, key=lambda z: z[3])
print(max(abs(la[0][0] - la[-1][0]) + abs(la[0][1]-la[-1][1]),
abs(lb[0][0] - lb[-1][0]) + ... | [["-", 3, 4, 0, 657, 31, 206, 51, 206, 51, 22], ["+", 3, 4, 0, 657, 31, 206, 51, 206, 51, 22], ["-", 3, 4, 0, 657, 12, 206, 51, 206, 51, 22], ["+", 3, 4, 0, 657, 12, 206, 51, 206, 51, 22]] | 5 | 181 |
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] x = new int[n];
int[] y = new int[n];
int temp[] = new int[n];
for (int i = 0; i < n; i... | import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] x = new int[n];
int[] y = new int[n];
int temp[] = new int[n];
for (int i = 0; i < n; i... | [["-", 8, 196, 0, 1, 0, 11, 12, 492, 500, 22], ["-", 8, 196, 0, 1, 0, 11, 12, 492, 0, 131], ["-", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22], ["-", 0, 1, 0, 11, 12, 492, 3, 4, 0, 24], ["-", 0, 1, 0, 11, 12, 492, 3, 4, 0, 25]] | 3 | 248 |
import sys
readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)
def main():
N = int(readline())
mat = []
a = []
b = []
for _ in range(N):
x, y = map(int, readline().split())
a.append(x + y)
b.append(abs(x - y))
d1 = max(a... | import sys
readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)
def main():
N = int(readline())
mat = []
a = []
b = []
for _ in range(N):
x, y = map(int, readline().split())
a.append(x + y)
b.append(x - y)
d1 = max(a) - m... | [["-", 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 | 141 |
// ###### ### ####### ####### ## # ##### ###
// ##### // # # # # # # # # # # # # #
// ### // # # # # # # # # # # # #
// # ### //
// ###### ######### # # # # # # ... | // ###### ### ####### ####### ## # ##### ###
// ##### // # # # # # # # # # # # # #
// ### // # # # # # # # # # # # #
// # ### //
// ###### ######### # # # # # # ... | [["-", 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 | 527 |
#pragma GCC target("avx2")
#pragma GCC optimize "trapv"
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
#define input(a, n) \
for (ll i1 = 0; i1 < n; i1++) \
cin... | #pragma GCC target("avx2")
#pragma GCC optimize "trapv"
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
#define input(a, n) \
for (ll i1 = 0; i1 < n; i1++) \
cin... | [["-", 0, 2, 3, 4, 0, 83, 0, 2, 63, 22], ["-", 3, 4, 0, 83, 0, 2, 3, 4, 0, 24], ["-", 3, 4, 0, 83, 0, 2, 3, 4, 0, 25]] | 1 | 264 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REPR(i, n) for (int i = n; i > -1; --i)
#define ALL(a) (a).begin(), (a).end()
#define FILL(a, n, x) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REPR(i, n) for (int i = n; i > -1; --i)
#define ALL(a) (a).begin(), (a).end()
#define FILL(a, n, x) ... | [["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 724 |
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
#define FOR(a, b) for (int a = 0; a < b; a++)
#define F0R(a, b, c) for (int a = b; a <= c; a++)
#define f first
#define s second
#define m0(x) memset(x, 0, sizeof(x))
typedef pair<int, int> pi;
typedef long long ll;
t... | #include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
#define FOR(a, b) for (int a = 0; a < b; a++)
#define F0R(a, b, c) for (int a = b; a <= c; a++)
#define f first
#define s second
#define m0(x) memset(x, 0, sizeof(x))
typedef pair<int, int> pi;
typedef long long ll;
t... | [["-", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 91, 17, 33]] | 1 | 206 |
#pragma region header
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#i... | #pragma region header
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#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 | 389 |
N=int(input())
answer=0
xylist=[]
pxylist=[]
mxylist=[]
for _ in range(N):
x,y=map(int,input().split())
xylist.append((x,y))
pxylist.append(x+y)
mxylist.append(x-y)
pxylist.sort()
mxylist.sort()
answer=max(pxylist[-1]-pxylist[0],mxylist[-1],mxylist[0])
print(answer) | N=int(input())
answer=0
xylist=[]
pxylist=[]
mxylist=[]
for _ in range(N):
x,y=map(int,input().split())
xylist.append((x,y))
pxylist.append(x+y)
mxylist.append(x-y)
pxylist.sort()
mxylist.sort()
answer=max(pxylist[-1]-pxylist[0],mxylist[-1]-mxylist[0])
print(answer) | [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33]] | 5 | 113 |
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
N = I()
A,B = [],[] # x+y,x-y たちのリスト
for i in range(N):
x,y = MI()
A.append(x+y)
B.append(x-y)
print(max(A)-min(A),max(B)-min(B))
| import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
N = I()
A,B = [],[] # x+y,x-y たちのリスト
for i in range(N):
x,y = MI()
A.append(x+y)
B.append(x-y)
print(max(max(A)-min(A),max(B)-min(B)))
| [["+", 0, 652, 3, 4, 0, 657, 31, 652, 63, 22], ["+", 3, 4, 0, 657, 31, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 657, 12, 652, 3, 4, 0, 25]] | 5 | 116 |
import sys
def input(): return sys.stdin.readline().rstrip()
N = int(input())
X = []
Y = []
for i in range(N):
x,y = map(int,input().split())
X.append(x)
Y.append(y)
ans1 = []
ans2 = []
for i in range(N):
ans1.append(X[i] + Y[i])
ans2.append(Y[i] - X[i])
ans1.sort()
ans2.sort()
a = ans1[-1] - ans... | import sys
def input(): return sys.stdin.readline().rstrip()
N = int(input())
X = []
Y = []
for i in range(N):
x,y = map(int,input().split())
X.append(x)
Y.append(y)
ans1 = []
ans2 = []
for i in range(N):
ans1.append(X[i] + Y[i])
ans2.append(Y[i] - X[i])
ans1.sort()
ans2.sort()
a = ans1[-1] - ans... | [["-", 0, 1, 0, 662, 12, 657, 12, 206, 206, 612], ["+", 0, 1, 0, 662, 12, 657, 12, 206, 206, 612]] | 5 | 158 |
#include <bits/stdc++.h>
#define FLASH \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define int long long int
#define... | #include <bits/stdc++.h>
#define FLASH \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define int long long int
#define... | [["-", 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 | 236 |
// Solution By SlavicG
#include "bits/stdc++.h"
using namespace std;
#define ll long long
#define forn(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define pb push_back
#define sz(a) (int)a.size()
#define fastio ... | // Solution By SlavicG
#include "bits/stdc++.h"
using namespace std;
#define ll long long
#define forn(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define pb push_back
#define sz(a) (int)a.size()
#define fastio ... | [["-", 0, 43, 49, 50, 51, 16, 12, 69, 28, 22], ["+", 0, 43, 49, 50, 51, 16, 12, 69, 28, 22]] | 1 | 165 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
ll MAX = 100000000009;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
ll n;
cin >> n;
vector<pair<ll, ll>> v;
for (int i = 0; i < n; i++) {
ll x, y;
cin >> x >> y;
v.push_back(make_pair(x, y));
}
ll mx, my, m... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
ll MAX = 100000000009;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
ll n;
cin >> n;
vector<pair<ll, ll>> v;
for (int i = 0; i < n; i++) {
ll x, y;
cin >> x >> y;
v.push_back(make_pair(x, y));
}
ll mx, my, m... | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]] | 1 | 244 |
// Believe in yourself
#include <bits/stdc++.h>
#include <ctime>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define Pair vector<pair<ll, ll>>
#define vec vector<ll>
#define all(a... | // Believe in yourself
#include <bits/stdc++.h>
#include <ctime>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define Pair vector<pair<ll, ll>>
#define vec vector<ll>
#define all(a... | [["-", 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 | 472 |
/*
* じょえチャンネル
* 高評価・チャンネル登録よろしくおねがいします!
* https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#includ... | /*
* じょえチャンネル
* 高評価・チャンネル登録よろしくおねがいします!
* https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#includ... | [["-", 0, 2, 3, 4, 0, 16, 12, 69, 28, 22], ["+", 0, 2, 3, 4, 0, 16, 12, 69, 28, 22]] | 1 | 3,168 |
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define INF 0x7fffffff
#define LL_INF 0x7fffffffffffffff
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
ll dist(pii a, pii b) {
return abs(a.first - b.first) + abs(a.second - b.second);
}
int main(vo... | #include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define INF 0x7fffffff
#define LL_INF 0x7fffffffffffffff
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
ll dist(pii a, pii b) {
return abs(a.first - b.first) + abs(a.second - b.second);
}
int main(vo... | [["+", 12, 118, 28, 69, 341, 342, 0, 16, 31, 22], ["+", 12, 118, 28, 69, 341, 342, 0, 16, 17, 33]] | 1 | 331 |
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define debug cout << "hi" << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef p... | #include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define debug cout << "hi" << endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef p... | [["-", 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 | 210 |
// 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)
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#i... |
// 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)
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#i... | [["-", 8, 9, 0, 43, 49, 50, 51, 83, 0, 13], ["+", 0, 43, 49, 50, 51, 83, 0, 91, 17, 33], ["+", 0, 43, 49, 50, 51, 83, 0, 91, 28, 22]] | 1 | 778 |
#define _USE_MATH_DEFIMES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <ioman... | #define _USE_MATH_DEFIMES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <ioman... | [["-", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 0, 43, 49, 50, 51, 4, 0, 91, 17, 33], ["+", 0, 43, 49, 50, 51, 4, 0, 91, 28, 22]] | 1 | 313 |
/* _
_ooOoo_
o8888888o
88" . "88
(| -_- |)
O\ = /O
____/`---'\____
.' \\| |// `.
/ \\||| : |||// \
... | /* _
_ooOoo_
o8888888o
88" . "88
(| -_- |)
O\ = /O
____/`---'\____
.' \\| |// `.
/ \\||| : |||// \
... | [["-", 0, 359, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 0, 43, 49, 50, 51, 4, 0, 91, 17, 33], ["+", 0, 43, 49, 50, 51, 4, 0, 91, 28, 22]] | 1 | 1,172 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
int INF = 1e18 + 7;
int mod = 1e9 + 7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
int N;
cin >> N;
vector<int> x(N), y(N);
vector<int> nx(N), ny(N);
for (int i = 0; i < N; i++) {
cin >>... | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
int INF = 1e18 + 7;
int mod = 1e9 + 7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
int N;
cin >> N;
vector<int> x(N), y(N);
vector<int> nx(N), ny(N);
for (int i = 0; i < N; i++) {
cin >>... | [["-", 0, 83, 0, 16, 31, 69, 341, 342, 0, 13], ["+", 0, 16, 31, 69, 341, 342, 0, 16, 31, 22], ["+", 0, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 0, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["-", 0, 16, 12, 69, 341, 342, 0, 16, 31, 22], ["-", 0, 16, 12, 69, 341, 342, 0, 16, 17, 33], ["-", 0, 16, 12, 69, 341, 342, 0, 16, ... | 1 | 229 |
#include <stdio.h>
int main(void) {
int n;
scanf("%d", &n);
long int t = 0;
long int s = 0;
long int x[200000] = {};
long int y[200000] = {};
int xmax = 0;
int xmin = 0;
int ymax = 0;
int ymin = 0;
long int ans = 0;
for (int i = 0; i < n; i++) {
scanf("%ld %ld", &t, &s);
x[i] = t + s;
... | #include <stdio.h>
int main(void) {
int n;
scanf("%d", &n);
long int t = 0;
long int s = 0;
long int x[200000] = {};
long int y[200000] = {};
int xmax = 0;
int xmin = 0;
int ymax = 0;
int ymin = 0;
long int ans = 0;
for (int i = 0; i < n; i++) {
scanf("%ld %ld", &t, &s);
x[i] = t + s;
... | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 0 | 719 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
using namespace std;
typedef long long ll;
const int maxn = 200050;
struct point {
ll x, y;
point(ll x0 = 0, ll y0 = 0) : x(x0), y(y0) {}
};
point p[maxn], res[maxn];
int n;
int cmp(point a, point b) { return a.y < b.y || (a.y == b.y && a.x... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
using namespace std;
typedef long long ll;
const int maxn = 200050;
struct point {
ll x, y;
point(ll x0 = 0, ll y0 = 0) : x(x0), y(y0) {}
};
point p[maxn], res[maxn];
int n;
int cmp(point a, point b) { return a.y < b.y || (a.y == b.y && a.x... | [["-", 0, 52, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 17, 20]] | 1 | 599 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
ll x[200005];
ll y[200005];
ll max1, max2 = 100000000000, max3, max4 = 1000000000000;
int main() {
ll n;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> x[i] >> y[i];
max1 = max(max1, x[i] + y[i]);
max2 = min(ma... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
ll x[200005];
ll y[200005];
ll max1 = -100000000000, max2 = 100000000000, max3 = -100000000000,
max4 = 1000000000000;
int main() {
ll n;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> x[i] >> y[i];
max1 = max(ma... | [["+", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13]] | 1 | 159 |
n=int(input())
l1=[]
l2=[]
for _ in range(n):
x,y=map(int,input().split())
l1.append(x+y)
l2.append(abs(x-y))
print(max(max(l1)-min(l1),max(l2)-min(l2))) | n=int(input())
l1=[]
l2=[]
for _ in range(n):
x,y=map(int,input().split())
l1.append(x+y)
l2.append(x-y)
print(max(max(l1)-min(l1),max(l2)-min(l2))) | [["-", 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 | 84 |
#include <bits/stdc++.h>
using namespace std;
#define ipr pair<int, int>
#define pb push_back
#define ff first
#define ss second
#define fr(i, j, k) for (int i = j; i < k; i++)
#define rf(i, j, k) for (int i = j; i >= k; i--)
#define ll unsigned long long
#define int long long
#define ld long double
#define all(x) x.b... | #include <bits/stdc++.h>
using namespace std;
#define ipr pair<int, int>
#define pb push_back
#define ff first
#define ss second
#define fr(i, j, k) for (int i = j; i < k; i++)
#define rf(i, j, k) for (int i = j; i >= k; i--)
#define ll unsigned long long
#define int long long
#define ld long double
#define all(x) x.b... | [["-", 0, 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 | 302 |
N=int(input())
P=[list(map(int,input().split())) for _ in range(N)]
L1=[]
L2=[]
L3=[]
L4=[]
for x,y in P:
L1.append(x+y)
L2.append(-x+y)
L3.append(x-y)
L4.append(-x-y)
L1=sorted(L1)
L2=sorted(L1)
L3=sorted(L1)
L4=sorted(L1)
ans=max(L1[-1]-L1[0],L2[-1]-L2[0],L3[-1]-L3[0],L4[-1]-L4[0])
print(ans)
| N=int(input())
P=[list(map(int,input().split())) for _ in range(N)]
L1=[]
L2=[]
L3=[]
L4=[]
for x,y in P:
L1.append(x+y)
L2.append(-x+y)
L3.append(x-y)
L4.append(-x-y)
L1=sorted(L1)
L2=sorted(L2)
L3=sorted(L3)
L4=sorted(L4)
ans=max(L1[-1]-L1[0],L2[-1]-L2[0],L3[-1]-L3[0],L4[-1]-L4[0])
print(ans)
| [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22]] | 5 | 167 |
// is there any case of -1 or any special corner cases ?
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define vi vector<int>
#define pi pair<int, int>
#define all(v) v.begin(), v.end()
#define zeros(arr) memset(arr, ... | // is there any case of -1 or any special corner cases ?
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define vi vector<int>
#define pi pair<int, int>
#define all(v) v.begin(), v.end()
#define zeros(arr) memset(arr, ... | [["-", 0, 83, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 83, 0, 2, 3, 4, 0, 16, 17, 33]] | 1 | 285 |
/*author - Ashutosh Chitranshi*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune... | /*author - Ashutosh Chitranshi*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 435 |
#include <bits/stdc++.h>
#define int long long
#define counter(m) for (int i = 0; i < m; i++)
#define gcd __gcd
#define endl "\n"
#define pb emplace_back
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define mod 1000000007
#define mod2 998244353
#define maxe *max_element
#define mine... | #include <bits/stdc++.h>
#define int long long
#define counter(m) for (int i = 0; i < m; i++)
#define gcd __gcd
#define endl "\n"
#define pb emplace_back
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define mod 1000000007
#define mod2 998244353
#define maxe *max_element
#define mine... | [["+", 0, 14, 8, 9, 0, 338, 49, 352, 0, 67]] | 1 | 593 |
#ifdef MAIN == == == == == == == == == == == == == == == == == == == == == == \
== == == == == == == == == == == == == == == == == == == == == == == == == \
== == == == == == == == == == == == == == == == ==
int solve(lint n, std::vector<lint> x, std::vector<lint> y) {
lint mx = -linf, mn = linf, ans = 0;
... | #ifdef MAIN == == == == == == == == == == == == == == == == == == == == == == \
== == == == == == == == == == == == == == == == == == == == == == == == == \
== == == == == == == == == == == == == == == == ==
int solve(lint n, std::vector<lint> x, std::vector<lint> y) {
lint mx = -linf, mn = linf, ans = 0;
... | [["-", 0, 34, 31, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 34, 31, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 34, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 34, 12, 2, 3, 4, 0, 16, 17, 33]] | 1 | 2,639 |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
us... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
us... | [["-", 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], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 91, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 91, 28, 22]] | 1 | 450 |
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int MOD = 1e9 + 7;
template <class Q> void clearQueue(Q &q) { q = Q(); }
void solve() {
int n;
cin >> n;
vector<pair<int, int>> v(n);
for (int i = 0; i < n; i++) {
cin >... | #pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int MOD = 1e9 + 7;
template <class Q> void clearQueue(Q &q) { q = Q(); }
void solve() {
int n;
cin >> n;
vector<pair<int, int>> v(n);
for (int i = 0; i < n; i++) {
cin >... | [["-", 49, 50, 51, 16, 12, 16, 12, 118, 119, 120], ["+", 49, 50, 51, 16, 12, 16, 12, 118, 119, 120]] | 1 | 269 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct Point {
ll x;
ll y;
};
int main() {
int n;
cin >> n;
vector<Point> vp;
for (int i = 0; i < n; ++i) {
ll xi, yi;
cin >> xi >> yi;
vp.push_back({xi, yi});
}
sort(vp.begin(), vp.end(),
[](Point &a, Point &b) { ret... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct Point {
ll x;
ll y;
};
int main() {
int n;
cin >> n;
vector<Point> vp;
for (int i = 0; i < n; ++i) {
ll xi, yi;
cin >> xi >> yi;
vp.push_back({xi, yi});
}
sort(vp.begin(), vp.end(),
[](Point &a, Point &b) { ret... | [["+", 12, 118, 28, 69, 341, 342, 0, 16, 31, 22], ["+", 12, 118, 28, 69, 341, 342, 0, 16, 17, 33]] | 1 | 261 |
n = int(input())
xy = []
for _ in range(n):
x,y = map(int,input().split())
xy.append((x,y))
al,be = 1000000000,1000000000
f = [(1,1),(1,-1),(-1,1),(-1,-1)]
ans = -1145141919810364
for k,l in f:
alfa = al * k
beta = be * l
man = []
for i,j in xy:
man.append((alfa-i) + (beta-j))
... | n = int(input())
xy = []
for _ in range(n):
x,y = map(int,input().split())
xy.append((x,y))
al,be = 1000000000,1000000000
f = [(1,1),(1,-1),(-1,1),(-1,-1)]
ans = -1145141919810364
for k,l in f:
alfa = al * k
beta = be * l
man = []
for i,j in xy:
man.append(abs(alfa-i) + abs(beta-j)... | [["+", 0, 652, 3, 4, 0, 657, 31, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 657, 12, 652, 63, 22]] | 5 | 152 |
#include <bits/stdc++.h>
#define itn int
#define REP(i, n) for (ll i = 0; i < n; i++)
#define IREP(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define all(v) v.begin(), v.end()
#define SENTINEL 2000000000
#define NIL -1
using namespace std;
typedef long long ll;
const ll MAX =... | #include <bits/stdc++.h>
#define itn int
#define REP(i, n) for (ll i = 0; i < n; i++)
#define IREP(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define all(v) v.begin(), v.end()
#define SENTINEL 2000000000
#define NIL -1
using namespace std;
typedef long long ll;
const ll MAX =... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 261 |
N = int(input())
XYs = [list(map(int, input().split())) for _ in range(N)]
XYs.sort()
prevX = None
minY = maxY = XYs[0][1]
ans = 0
for x, y in XYs:
if prevX != x and prevX is not None:
minY -= 1
maxY += 1
ans = max(ans, abs(minY-y), abs(maxY-y))
minY = minY if minY < y else y
maxY = max... | N = int(input())
XYs = [list(map(int, input().split())) for _ in range(N)]
XYs.sort()
prevX = None
minY = maxY = XYs[0][1]
ans = 0
for x, y in XYs:
if prevX != x and prevX is not None:
minY -= x - prevX
maxY += x - prevX
ans = max(ans, abs(minY-y), abs(maxY-y))
minY = minY if minY < y else ... | [["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 64, 196, 0, 1, 0, 677, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 677, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 677, 12, 657, 12, 22]] | 5 | 124 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int MAX_N = 200005;
ll x[MAX_N], y[MAX_N];
int main() {
int N;
cin >> N;
rep(i, N) { cin >> x[i] >> y[i]; }
ll ans = 0;
ll M = -1e10, m = 1e10;
rep(i, N) {
M... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int MAX_N = 200005;
ll x[MAX_N], y[MAX_N];
int main() {
int N;
cin >> N;
rep(i, N) { cin >> x[i] >> y[i]; }
ll ans = 0;
ll M = -1e10, m = 1e10;
rep(i, N) {
M... | [["-", 12, 2, 3, 4, 0, 16, 31, 16, 31, 13], ["-", 12, 2, 3, 4, 0, 16, 31, 16, 17, 48], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33]] | 1 | 347 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
bool srt1(pair<ll, ll> a, pair<ll, ll> b) {
return a.first + a.second < b.first + b.second;
}
bool srt2(pair<ll, ll> a, pair<ll, ll> b) {
return a.first + a.second > b.first + b.second;
}
int main() {
ll i, j, k, m, t, n;
cin >> n;
vector<... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
bool srt1(pair<ll, ll> a, pair<ll, ll> b) {
return a.first + a.second < b.first + b.second;
}
bool srt2(pair<ll, ll> a, pair<ll, ll> b) {
return a.first - a.second > b.first - b.second;
}
int main() {
ll i, j, k, m, t, n;
cin >> n;
vector<... | [["-", 8, 9, 0, 37, 0, 16, 31, 16, 17, 72], ["+", 8, 9, 0, 37, 0, 16, 31, 16, 17, 33], ["-", 8, 9, 0, 37, 0, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 37, 0, 16, 12, 16, 17, 33]] | 1 | 280 |
/*ver 5*/
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
void init() {
cin.tie(0);
ios::sync_... | /*ver 5*/
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
void init() {
cin.tie(0);
ios::sync_... | [["-", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["+", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22]] | 1 | 2,248 |
#include <bits/stdc++.h>
using namespace std;
#ifdef __DEBUG__
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) {
cerr << " " << H;
debug_out(T...);
}
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...... | #include <bits/stdc++.h>
using namespace std;
#ifdef __DEBUG__
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) {
cerr << " " << H;
debug_out(T...);
}
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...... | [["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 716 |
def sep():
return map(int,input().strip().split(" "))
import sys
sys.setrecursionlimit(2*10**5)
from random import randint
def lis():
return list(sep())
def maxAbsValExpr(x, y):
res, n = 0, len(y)
for p, q in [ [-1, 1], [-1, -1],[1, 1], [1, -1]]:
smallest = p * x[0] + q * y[0] + 0
for i... | def sep():
return map(int,input().strip().split(" "))
import sys
sys.setrecursionlimit(2*10**5)
from random import randint
def lis():
return list(sep())
def maxAbsValExpr(x, y):
res, n = 0, len(y)
for p, q in [ [-1, 1], [-1, -1],[1, 1], [1, -1]]:
smallest = p * x[0] + q * y[0] + 0
for i... | [["-", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 222 |
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter... | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter... | [["-", 0, 1, 0, 662, 12, 206, 51, 206, 51, 22], ["+", 0, 1, 0, 662, 12, 206, 51, 206, 51, 22]] | 5 | 495 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
/* #define MULTI_INPUT 0 */
void solve() {
int n;
cin >> n;
ll x, y;
ll maxXpY = 0, minXpY = INT_MAX, maxXsY = 0, minXsY = INT_MAX;
for (int i = 0; i < n; ++i) {
cin >> x >> y;
maxXpY = max(ma... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
/* #define MULTI_INPUT 0 */
void solve() {
int n;
cin >> n;
ll x, y;
ll maxXpY = INT_MIN, minXpY = INT_MAX, maxXsY = INT_MIN, minXsY = INT_MAX;
for (int i = 0; i < n; ++i) {
cin >> x >> y;
max... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 194 |
#include <bits/stdc++.h>
// #include <atcoder/all>
// using namespace atcoder;
using namespace std;
using ll = long long;
using Edge = int;
using Graph = vector<vector<Edge>>;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
con... | #include <bits/stdc++.h>
// #include <atcoder/all>
// using namespace atcoder;
using namespace std;
using ll = long long;
using Edge = int;
using Graph = vector<vector<Edge>>;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
con... | [["-", 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 | 1,541 |
#include <bits/stdc++.h>
/*
#include <atcoder/all>
using namespace atcoder;
*/
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using dou = long double;
string yes = "yes";
string Yes = "Yes";
string YES = "YE... | #include <bits/stdc++.h>
/*
#include <atcoder/all>
using namespace atcoder;
*/
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using dou = long double;
string yes = "yes";
string Yes = "Yes";
string YES = "YE... | [["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 1 | 1,177 |
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include... | [["-", 8, 9, 0, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 9, 0, 1, 0, 2, 63, 22]] | 1 | 3,852 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <ve... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <ve... | [["-", 0, 16, 31, 2, 3, 4, 0, 16, 12, 22], ["+", 0, 16, 31, 2, 3, 4, 0, 16, 12, 22]] | 1 | 455 |
#include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using ld ... | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using ld ... | [["-", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["+", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22]] | 1 | 427 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int lld;
typedef pair<int, int> pi;
typedef pair<lld, lld> pl;
typedef long double ld;
typedef vector<int> vt;
typedef vector<vt> vtt;
#define x first
#define y second
#define all(v) v.begin(), v.end()
#define sz(x) (int)x.size()
#define mk(a, b) make_pair... | #include <bits/stdc++.h>
using namespace std;
typedef long long int lld;
typedef pair<int, int> pi;
typedef pair<lld, lld> pl;
typedef long double ld;
typedef vector<int> vt;
typedef vector<vt> vtt;
#define x first
#define y second
#define all(v) v.begin(), v.end()
#define sz(x) (int)x.size()
#define mk(a, b) make_pair... | [["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22]] | 1 | 337 |
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < n; i++)
#define... | #include <algorithm>
#include <assert.h>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < n; i++)
#define... | [["-", 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 | 1,259 |
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
#define lli long long int
#define llu unsigned long long int
#define pb push_back
#define rt return 0
#define endln "\n"
#define all(x) x.begin(), x.end()
#def... | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
#define lli long long int
#define llu unsigned long long int
#define pb push_back
#define rt return 0
#define endln "\n"
#define all(x) x.begin(), x.end()
#def... | [["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33]] | 1 | 258 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++)
#define RFOR(i, a, n) for (ll i = (ll)n - 1; i >= (ll)a; i--)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) RFOR(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define bra(first, second) '(' << fi... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++)
#define RFOR(i, a, n) for (ll i = (ll)n - 1; i >= (ll)a; i--)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) RFOR(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define bra(first, second) '(' << fi... | [["-", 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 | 335 |
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (ll i = from; i < (to); ++i)
#define mp(x, y) make_pair(x, y)
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()
#define pb push_back
using ll = long long;
using ld = long double;
using vin = vector<int>;
... | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (ll i = from; i < (to); ++i)
#define mp(x, y) make_pair(x, y)
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()
#define pb push_back
using ll = long long;
using ld = long double;
using vin = vector<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], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 91, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 91, 28, 22]] | 1 | 478 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vector<vector<T>>;
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#def... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vector<vector<T>>;
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#def... | [["-", 8, 9, 0, 37, 0, 16, 12, 118, 28, 22], ["+", 8, 9, 0, 37, 0, 16, 12, 118, 28, 22], ["-", 8, 9, 0, 37, 0, 16, 12, 118, 119, 120], ["+", 8, 9, 0, 37, 0, 16, 12, 118, 119, 120]] | 1 | 694 |
#!/usr/bin/env python3
import numpy as np
n = int(input())
x_y = [list(map(int, input().split())) for _ in range(n)]
xy = [i+j for i, j in x_y]
ans1 = max(xy)-min(xy)
xy_rev = [i/j for i, j in x_y]
min_index = np.argmin(xy_rev)
max_index = np.argmax(xy_rev)
x1, y1 = x_y[max_index]
x2, y2 = x_y[min_index]
ans2 ... | #!/usr/bin/env python3
import numpy as np
n = int(input())
x_y = [list(map(int, input().split())) for _ in range(n)]
xy = [i+j for i, j in x_y]
ans1 = max(xy)-min(xy)
xy_rev = [i-j for i, j in x_y]
min_index = np.argmin(xy_rev)
max_index = np.argmax(xy_rev)
x1, y1 = x_y[max_index]
x2, y2 = x_y[min_index]
ans2 =... | [["-", 0, 1, 0, 662, 12, 658, 8, 657, 17, 85], ["+", 0, 1, 0, 662, 12, 658, 8, 657, 17, 33]] | 5 | 132 |
#ifndef BZ
#pragma GCC optimize "-O3"
#endif
#include <bits/stdc++.h>
#define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#define rep(i, l, r) for (ll i = (l); i < (r); ++i)
typedef long long ll;
typedef long double ld;
typedef unsigned int ull;
#define vi vector<int>
#define vll vector<ll>
#defin... | #ifndef BZ
#pragma GCC optimize "-O3"
#endif
#include <bits/stdc++.h>
#define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#define rep(i, l, r) for (ll i = (l); i < (r); ++i)
typedef long long ll;
typedef long double ld;
typedef unsigned int ull;
#define vi vector<int>
#define vll vector<ll>
#defin... | [["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33]] | 1 | 428 |
#include <bits/stdc++.h>
#include <stdio.h>
#include <string.h>
using namespace std;
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define pii pair<ll, ll>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define rep(i, t, n) for (int i = ... | #include <bits/stdc++.h>
#include <stdio.h>
#include <string.h>
using namespace std;
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define pii pair<ll, ll>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define rep(i, t, n) for (int i = ... | [["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33]] | 1 | 344 |
n=int(input())
a=[]
b=[]
for _ in range(n):
x,y=map(int,input().split())
a+=[abs(x-y)]
b+=[x+y]
a.sort()
b.sort()
print(max(a[-1]-a[0],b[-1]-b[0])) | n=int(input())
a=[]
b=[]
for _ in range(n):
x,y=map(int,input().split())
a+=[x-y]
b+=[x+y]
a.sort()
b.sort()
print(max(a[-1]-a[0],b[-1]-b[0])) | [["-", 0, 1, 0, 677, 12, 634, 0, 652, 63, 22], ["-", 0, 677, 12, 634, 0, 652, 3, 4, 0, 24], ["-", 0, 677, 12, 634, 0, 652, 3, 4, 0, 25]] | 5 | 94 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repit(it, li) for (auto it = li.begin(); it != li.end(); it++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
vector<int> x(n), y(n);
rep(i, n) cin >> x[i] >> y[i];
int mx = 0... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repit(it, li) for (auto it = li.begin(); it != li.end(); it++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
cin >> n;
vector<int> x(n), y(n);
rep(i, n) cin >> x[i] >> y[i];
int mx = I... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["-", 8, 9, 0, 1, 0, 34, 31, 11, 12, 13], ["+", 8, 9, 0, 1, 0, 34, 31, 11, 12, 22]] | 1 | 206 |
#include <bits/stdc++.h>
using namespace std;
// conversion
//------------------------------------------
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
// math
//--------... | #include <bits/stdc++.h>
using namespace std;
// conversion
//------------------------------------------
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
// math
//--------... | [["-", 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 | 1,222 |
#include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#inclu... | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#inclu... | [["-", 0, 1, 0, 11, 31, 118, 28, 69, 28, 22], ["+", 0, 1, 0, 11, 31, 118, 28, 69, 28, 22]] | 1 | 374 |
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
constexpr long long INF = 1LL << 60;
constexpr long long MOD = 1000000007;
double PI = acos(-1.0);
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define rep1(i, n) for (ll i = 1; i <= (n); ++i)
#define r... | #pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
constexpr long long INF = 1LL << 60;
constexpr long long MOD = 1000000007;
double PI = acos(-1.0);
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define rep1(i, n) for (ll i = 1; i <= (n); ++i)
#define r... | [["-", 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 | 1,578 |
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
#define INF 1000000010
#define EPS 1e-9
#define F first
#define S second
#define debug(x) cout << x << endl;
#define repi(i, x, n) for (int i = x; i < n; i++)
#define rep(i, n) repi(i, 0, n)
#define lp(i, n) repi(i, 0, n)
#def... | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
#define INF 1000000010
#define EPS 1e-9
#define F first
#define S second
#define debug(x) cout << x << endl;
#define repi(i, x, n) for (int i = x; i < n; i++)
#define rep(i, n) repi(i, 0, n)
#define lp(i, n) repi(i, 0, n)
#def... | [["-", 0, 11, 12, 11, 12, 11, 12, 11, 12, 13], ["+", 12, 11, 12, 11, 12, 11, 12, 91, 17, 33], ["+", 12, 11, 12, 11, 12, 11, 12, 91, 28, 22]] | 1 | 360 |
N = int(input())
x,y = map(int,input().split(" "))
papb = [x,y]
pamb = [x,y]
mapb = [x,y]
mamb = [x,y]
for i in range(N - 1):
x,y = map(int,input().split(" "))
if x + y > papb[0] + papb[1]:papb = [x,y]
if x - y > pamb[0] + pamb[1]:pamb = [x,y]
if 0 - x + y > mapb[0] + mapb[1]:mapb = [x,y]
if 0 - x -... | N = int(input())
x,y = map(int,input().split(" "))
papb = [x,y]
pamb = [x,y]
mapb = [x,y]
mamb = [x,y]
for i in range(N - 1):
x,y = map(int,input().split(" "))
if x + y > papb[0] + papb[1]:papb = [x,y]
if x - y > pamb[0] - pamb[1]:pamb = [x,y]
if 0 - x + y > 0 - mapb[0] + mapb[1]:mapb = [x,y]
if 0 -... | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 72], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 33], ["+", 0, 57, 15, 666, 0, 657, 31, 657, 31, 612], ["+", 0, 57, 15, 666, 0, 657, 31, 657, 17, 33]] | 5 | 233 |
import java.util.*;
public class Main {
public static void main(String[] args) {
int INF = Integer.MAX_VALUE;
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
long xmax = 0, xmin = INF, ymax = 0, ymin = INF;
for (int i = 0; i < N; i++) {
int x = sc.nextInt();
int y = sc.next... | import java.util.*;
public class Main {
public static void main(String[] args) {
long INF = Long.MAX_VALUE;
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
long xmax = -INF, xmin = INF, ymax = -INF, ymin = INF;
for (int i = 0; i < N; i++) {
int x = sc.nextInt();
int y = sc.... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 49, 200, 51, 509, 500, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 509, 500, 22], ["-", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 503, 49, 200, 51, 91, 17, 33], ["+", 8, 196, 0, 503, 49, 2... | 3 | 174 |
#include <iostream>
#include <string>
#include <vector>
using ll = long long;
using namespace std;
int main() {
int N;
int xpy = 0;
int xmy = 0;
int mxpy = 0;
int mxmy = 0;
cin >> N;
int x, y;
cin >> x >> y;
xpy = x + y;
xmy = x - y;
mxpy = y - x;
mxmy = -1 * (x + y);
for (int i = 1; i < N; i... | #include <iostream>
#include <string>
#include <vector>
using ll = long long;
using namespace std;
int main() {
int N;
int xpy = 0;
int xmy = 0;
int mxpy = 0;
int mxmy = 0;
cin >> N;
int x, y;
cin >> x >> y;
xpy = x + y;
xmy = x - y;
mxpy = y - x;
mxmy = -1 * (x + y);
for (int i = 1; i < N; i... | [["-", 31, 16, 12, 2, 3, 4, 0, 16, 12, 22], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 12, 22]] | 1 | 201 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define chmin(a, b) \
if ((a) > (b)) ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define chmin(a, b) \
if ((a) > (b)) ... | [["-", 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 | 313 |
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(readline())
data = list(map(int,read().split()))
inf = 10**15
axis_p_max = -1 * inf
axis_p_min = inf
axis_m_max = -1 * inf
axis_m_min = inf
it = iter(data)
for x,y in zip(it,it):
axis_p_max... | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(readline())
data = list(map(int,read().split()))
inf = 10**15
axis_p_max = -1 * inf
axis_p_min = inf
axis_m_max = -1 * inf
axis_m_min = inf
it = iter(data)
for x,y in zip(it,it):
axis_p_max... | [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33]] | 5 | 151 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define init(a, i) \
for (int k = 0; k < (i); k++) \
(a)[k] = 0
#d... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define init(a, i) \
for (int k = 0; k < (i); k++) \
(a)[k] = 0
#d... | [["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 362 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#inclu... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#inclu... | [["-", 0, 43, 49, 50, 51, 2, 63, 118, 28, 22], ["+", 0, 43, 49, 50, 51, 2, 63, 118, 28, 22]] | 1 | 460 |
#include <bits/stdc++.h>
using namespace std;
#define INF 20000000010ll
long long minx = INF, maxx, miny = INF, maxy, x, y, n;
int main() {
scanf("%lld", &n);
for (int i = 1; i <= n; i++) {
scanf("%lld%lld", &x, &y);
minx = min(minx, x + y), maxx = max(maxx, x + y);
miny = min(miny, x - y), maxy = max... | #include <bits/stdc++.h>
using namespace std;
#define INF 20000000010ll
long long minx = INF, maxx = -INF, miny = INF, maxy = -INF, x, y, n;
int main() {
scanf("%lld", &n);
for (int i = 1; i <= n; i++) {
scanf("%lld%lld", &x, &y);
minx = min(minx, x + y), maxx = max(maxx, x + y);
miny = min(miny, x - ... | [["+", 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 | 137 |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility... | [["-", 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, 16, 12, 118, 28, 69, 341, 342, 0, 13]] | 1 | 5,274 |
#include <bits/stdc++.h>
#define fr(i, n) for (int i = 0; i < (n); ++i)
#define foor(i, a, b) for (int i = (a); i <= (b); ++i)
#define rf(i, n) for (int i = (n); i-- > 0;)
#define roof(i, b, a) for (int i = (b); i >= (a); --i)
#define elsif else if
#define all(x) x.begin(), x.end()
#define Sort(x) sort(all(x))
#define ... | #include <bits/stdc++.h>
#define fr(i, n) for (int i = 0; i < (n); ++i)
#define foor(i, a, b) for (int i = (a); i <= (b); ++i)
#define rf(i, n) for (int i = (n); i-- > 0;)
#define roof(i, b, a) for (int i = (b); i >= (a); --i)
#define elsif else if
#define all(x) x.begin(), x.end()
#define Sort(x) sort(all(x))
#define ... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 85], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 6,781 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
long long int p = -10000000000;
long long int q = 10000000000;
long long int r = -10000000000;
long long int s = 10000000000;
for (int i = 0; i < n; i++) {
long long int x, y;
cin >> x >> y;
p = max(p, x + y);
r = ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
long long int p = -10000000000;
long long int q = 10000000000;
long long int r = -10000000000;
long long int s = 10000000000;
for (int i = 0; i < n; i++) {
long long int x, y;
cin >> x >> y;
p = max(p, x + y);
r = ... | [["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22]] | 1 | 151 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define watch(x) cout << (#x) << "=" << (x) << '\n'
#define mset(d, val) memset(d, val, sizeof(d))
#define setp(x) cout << fixed << setprecision(x)
#define forn(i, a, ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define watch(x) cout << (#x) << "=" << (x) << '\n'
#define mset(d, val) memset(d, val, sizeof(d))
#define setp(x) cout << fixed << setprecision(x)
#define forn(i, a, ... | [["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 21], ["-", 39, 344, 3, 347, 0, 77, 39, 344, 141, 78], ["-", 3, 347, 0, 77, 39, 344, 3, 347, 0, 18], ["-", 0, 77, 39, 344, 3, 347, 0, 77, 39, 78], ["-", 3, 347, 0, 77, 39, 344, 3, 347, 0, 47]] | 1 | 458 |
#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
// using namespace atcoder;
#ifdef DEBUG
#include "debug.h"
#define dump(...) \
DUMPOUT << " " << string(#__VA_ARGS__) << ": " \
<< "[" << to_st... | #include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
// using namespace atcoder;
#ifdef DEBUG
#include "debug.h"
#define dump(...) \
DUMPOUT << " " << string(#__VA_ARGS__) << ": " \
<< "[" << to_st... | [["-", 12, 2, 3, 4, 0, 16, 12, 69, 28, 22], ["+", 12, 2, 3, 4, 0, 16, 12, 69, 28, 22]] | 1 | 498 |
import numpy as np
n = int(input())
xy = np.array([list(map(int,input().split())) for _ in range(n)],int)
x = xy[:,0]
y = xy[:,0]
a = x+y
b = -x+y
ans = max(a.max() - a.min(), b.max()-b.min())
print(ans) | import numpy as np
n = int(input())
xy = np.array([list(map(int,input().split())) for _ in range(n)],int)
x = xy[:,0]
y = xy[:,1]
a = x+y
b = -x+y
ans = max(a.max() - a.min(), b.max()-b.min())
print(ans) | [["-", 0, 656, 0, 1, 0, 662, 12, 206, 206, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 206, 206, 612]] | 5 | 104 |
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
//#include<boost/multiprecision/cpp_int.hpp>
//#include<boost/multiprecision/cpp_dec_float.hpp>
// namespace mp=boost::multiprecision;
//#define mulint mp::cpp_int
//#define mulfloat mp::cpp_dec_float_100
using namespace std;
struct __INIT {
__INIT() {
cin.ti... | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
//#include<boost/multiprecision/cpp_int.hpp>
//#include<boost/multiprecision/cpp_dec_float.hpp>
// namespace mp=boost::multiprecision;
//#define mulint mp::cpp_int
//#define mulfloat mp::cpp_dec_float_100
using namespace std;
struct __INIT {
__INIT() {
cin.ti... | [["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 140], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33]] | 1 | 614 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define dump(x) cerr << ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define dump(x) cerr << ... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 85], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 1,066 |
#include <bits/stdc++.h>
#define rep(i, n) for (lli i = 0; i < (n); i++)
#define rrep(i, n) for (lli i = (n)-1; i >= 0; i--)
#define vall(x) (x).begin(), (x).end()
using namespace std;
using lli = long long int;
void YESNO(bool), YesNo(bool);
template <class T1, class T2> bool chmin(T1 &l, const T2 &r);
template <class... | #include <bits/stdc++.h>
#define rep(i, n) for (lli i = 0; i < (n); i++)
#define rrep(i, n) for (lli i = (n)-1; i >= 0; i--)
#define vall(x) (x).begin(), (x).end()
using namespace std;
using lli = long long int;
void YESNO(bool), YesNo(bool);
template <class T1, class T2> bool chmin(T1 &l, const T2 &r);
template <class... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 538 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
class union_find {
int n;
vector<int> p;
public:
union_find(int n) : n(n), p(n, -1) {}
int find(int u) { return p[u] < 0 ? u : p[u] = find(p[u]); }
void unite(int u, int v) {
u = find(u);
v = find(v);
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
class union_find {
int n;
vector<int> p;
public:
union_find(int n) : n(n), p(n, -1) {}
int find(int u) { return p[u] < 0 ? u : p[u] = find(p[u]); }
void unite(int u, int v) {
u = find(u);
v = find(v);
... | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 298 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
using pii = pair<int, int>;
struct UnionFind {
vector<int> par; // par[i]:iの親の番号 (例) par[3] = 2 : 3の親が2
vector<int> rank;
UnionFind(int N) : par(N), rank(N) { //最初は全てが根であるとして初期化
for (int i = 0... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
using pii = pair<int, int>;
struct UnionFind {
vector<int> par; // par[i]:iの親の番号 (例) par[3] = 2 : 3の親が2
vector<int> rank;
UnionFind(int N) : par(N), rank(N) { //最初は全てが根であるとして初期化
for (int i = 0... | [["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 62], ["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 0, 16, 31, 16, 12, 23, 0, 41, 64, 13], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 62], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 0, 16, 31, 16, 12, 23, 0, 41, 75, 13]] | 1 | 363 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
int MAX_N, q;
int par[(int)2e5];
int ranks[(int)2e5];
void init(int n) {
for (int i = 0; i < n; i++) {
par[i] = i;
ranks[i] = 0;
}
}
int find(int x) {
if (par[x] == x) {
return x;
} else {
return par... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
int MAX_N, q;
int par[(int)2e5];
int ranks[(int)2e5];
void init(int n) {
for (int i = 0; i < n; i++) {
par[i] = i;
ranks[i] = 0;
}
}
int find(int x) {
if (par[x] == x) {
return x;
} else {
return par... | [["-", 64, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["+", 64, 9, 0, 1, 0, 11, 31, 69, 28, 22]] | 1 | 313 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.