description stringlengths 171 4k | code stringlengths 94 3.98k | normalized_code stringlengths 57 4.99k |
|---|---|---|
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | def main():
n, z = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
left, right, ret = 0, n // 2, 0
while left <= right:
mid = (left + right) // 2
flag = True
for i in range(mid):
if a[n - mid + i] - a[i] < z:
flag = False
... | FUNC_DEF ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR VAR VAR NUMBER BIN_OP VAR NUMBER NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR IF BIN_OP VAR BIN_O... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | import sys
o = lambda *a: (lambda *b: a[0](*b)) if len(a) == 1 else lambda *b: a[0](o(*a[1:])(*b))
lmap = o(list, map)
lmap_ = lambda f: lambda L: lmap(f, L)
spp = lambda n: lambda x: lambda a: [y for y in a.split(x) if len(y) >= n]
def P(S):
n, z, S = S[0][0], S[0][1], sorted(S[1])
l, r, m2 = 0, n // 2, 0
... | IMPORT ASSIGN VAR FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR NUMBER VAR FUNC_CALL VAR NUMBER FUNC_CALL FUNC_CALL VAR VAR NUMBER VAR ASSIGN VAR FUNC_CALL VAR VAR VAR ASSIGN VAR FUNC_CALL VAR VAR VAR ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR VAR FUNC_DEF ASSIGN VAR VAR VAR VAR NUMBER NUMBER VAR NUMBER NUMBER FUN... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | n, z = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
i = -1
h = len(a) // 2 - 1
j = h
m = 0
while i < h:
i = i + 1
j = j + 1
while j < len(a) and a[j] - a[i] < z:
j = j + 1
if j >= len(a):
break
m = m + 1
print(m) | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP BIN_OP FUNC_CALL VAR VAR NUMBER NUMBER ASSIGN VAR VAR ASSIGN VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMB... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | n, z = list(map(int, input().split()))
arrs = [int(x) for x in input().split()]
arrs.sort()
def fi(k):
l = arrs[:k]
r = arrs[-k:]
return all([(r[i] - l[i] >= z) for i in range(len(r))])
l = 0
r = len(arrs) // 2 + 1
while r - l > 1:
m = (l + r) // 2
if fi(m):
l = m
else:
r = m... | ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR FUNC_DEF ASSIGN VAR VAR VAR ASSIGN VAR VAR VAR RETURN FUNC_CALL VAR BIN_OP VAR VAR VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP BIN_OP... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | import sys
class Main:
def __init__(self):
self.buff = None
self.index = 0
def next(self):
if self.buff is None or self.index == len(self.buff):
self.buff = self.next_line()
self.index = 0
val = self.buff[self.index]
self.index += 1
ret... | IMPORT CLASS_DEF FUNC_DEF ASSIGN VAR NONE ASSIGN VAR NUMBER FUNC_DEF IF VAR NONE VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR VAR VAR VAR NUMBER RETURN VAR FUNC_DEF VAR RETURN FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR FUNC_DEF ASSI... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | def find_intervals(points, dist):
length = len(points)
used = [(False) for i in range(length)]
l_pointer = 0
r_pointer = length // 2
intervals = 0
while l_pointer < length // 2 and r_pointer < length:
if used[l_pointer]:
l_pointer += 1
continue
if used[r_p... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER WHILE VAR BIN_OP VAR NUMBER VAR VAR IF VAR VAR VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR VAR VAR VAR NUMBER ASSIGN VAR VAR NUMBER ASSIGN VAR VAR NUMBER VAR NUMBER RETURN VAR ASSI... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | n_and_z = [int(x) for x in input().split()]
n_integers = [int(x) for x in input().split()]
n_integers.sort()
first_half = int(n_and_z[0] / 2)
counter = 0
z = first_half
for x in range(0, first_half):
for y in range(z, len(n_integers)):
if n_integers[y] - n_integers[x] >= n_and_z[1]:
counter = co... | ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR NUMBER ASSIGN VAR VAR FOR VAR FUNC_CALL VAR NUMBER VAR FOR VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR IF BIN_OP VAR VAR VAR VAR V... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | nz = input().split()
n = int(nz[0])
z = int(nz[1])
a = input().split()
res = 0
for i in range(n):
a[i] = int(a[i])
m = (n + 1) // 2
f, s = 0, m
a = sorted(a)
while f < m and s < n:
if a[s] - a[f] >= z:
res += 1
f += 1
s += 1
else:
s += 1
print(res) | ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR NUMBER ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR NUMBER NUMBER ASSIGN VAR VAR NUMBER VAR ASSIGN VAR FUNC_CALL VAR VAR... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | inp = input().strip()
n, z = int(inp.split(" ")[0]), int(inp.split(" ")[1])
inp = input()
inp_arr = inp.strip().split(" ")
a = [int(i) for i in inp_arr]
a.sort(reverse=True)
f = 0
l = n // 2
c = 0
while l < n and f < n // 2:
if a[f] - a[l] >= z:
f = f + 1
l = l + 1
c = c + 1
else:
... | ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR STRING NUMBER FUNC_CALL VAR FUNC_CALL VAR STRING NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR VAR VAR VAR EXPR FUNC_CALL VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VA... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | from sys import stdin, stdout
def solve(arr, minDiff):
arr = sorted(arr)
l = 0
if len(arr) % 2 == 0:
r = len(arr) // 2
rr = len(arr) // 2
else:
r = len(arr) // 2
rr = len(arr) // 2
counter = 0
i = 0
while i < r and rr < len(arr):
if arr[rr] - arr[i] ... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER IF BIN_OP FUNC_CALL VAR VAR NUMBER NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR VAR ... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
b = a[: n // 2]
c = a[n // 2 :]
j = 0
ans = 0
for i in b:
while abs(i - c[j]) < m:
j += 1
if j == len(c):
print(ans)
exit()
ans += 1
j += 1
if j == len(c):
print(ans)
exi... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR VAR BIN_OP VAR NUMBER ASSIGN VAR VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR VAR WHILE FUNC_CALL VAR BIN_OP VAR VAR VAR VAR VAR NUMBER IF VAR FU... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | def solve():
N, Z = map(int, input().split())
X = [int(k) for k in input().split()]
X.sort()
ans = 0
i = 0
mid = N // 2 + (1 if N % 2 else 0)
j = mid
while i < mid and j < N:
while j < N and X[j] - X[i] < Z:
j += 1
if j != N:
ans += 1
i += ... | FUNC_DEF ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR NUMBER BIN_OP VAR NUMBER NUMBER NUMBER ASSIGN VAR VAR WHILE VAR VAR VAR VAR WHILE VAR VAR BIN_OP VAR VAR VAR VAR ... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | import sys
sys.setrecursionlimit(10**5 + 1)
inf = int(10**20)
max_val = inf
min_val = -inf
RW = lambda: sys.stdin.readline().strip()
RI = lambda: int(RW())
RMI = lambda: [int(x) for x in sys.stdin.readline().strip().split()]
RWI = lambda: [x for x in sys.stdin.readline().strip().split()]
nb_elem, min_diff = RMI()
elem... | IMPORT EXPR FUNC_CALL VAR BIN_OP BIN_OP NUMBER NUMBER NUMBER ASSIGN VAR FUNC_CALL VAR BIN_OP NUMBER NUMBER ASSIGN VAR VAR ASSIGN VAR VAR ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR VAR FUNC_CALL FUNC_CALL FUN... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | def solve(v, z):
n = len(v)
v.sort()
def construct(k):
res = True
for f in range(n - 1, n - k - 1, -1):
low = f - n + k
if v[f] < v[low] + z:
res = False
break
return res
lo = 0
hi = n // 2
while hi - lo > 0:
... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR FUNC_DEF ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER NUMBER ASSIGN VAR BIN_OP BIN_OP VAR VAR VAR IF VAR VAR BIN_OP VAR VAR VAR ASSIGN VAR NUMBER RETURN VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER WHILE BIN_OP VAR ... |
You are given a set of points $x_1$, $x_2$, ..., $x_n$ on the number line.
Two points $i$ and $j$ can be matched with each other if the following conditions hold: neither $i$ nor $j$ is matched with any other point; $|x_i - x_j| \ge z$.
What is the maximum number of pairs of points you can match with each other?
... | import sys
n, z = list(map(int, sys.stdin.readline().strip().split()))
x = list(map(int, sys.stdin.readline().strip().split()))
x.sort()
i = 0
j = n // 2
c = 0
while j < n and i < n // 2:
if x[j] - x[i] >= z:
i = i + 1
j = j + 1
c = c + 1
else:
j = j + 1
print(c) | IMPORT ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER WHILE VAR VAR VAR BIN_OP VAR NUMBER IF BIN_OP VAR VAR VAR VAR VAR ASSIG... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | n, u = map(int, input().split())
e = list(map(int, input().split()))
res = -1
k = 2
for i in range(n - 2):
j = i + 1
k = max(k, j + 1)
while k < n and e[k] - e[i] <= u:
k += 1
k -= 1
if k > j:
res = max(res, (e[k] - e[j]) / (e[k] - e[i]))
print(res) | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR BIN_OP VAR NUMBER WHILE VAR VAR BIN_OP VAR VAR VAR VAR VAR VAR... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | N, U = map(int, input().strip().split())
E = list(map(int, input().strip().split()))
maxu = -1
j = 2
if N < 3:
print(-1)
for i in range(N - 2):
j = max(i + 2, j)
if E[j] - E[i] > U:
continue
while j < N and E[j] - E[i] <= U:
j += 1
j -= 1
maxu = max(maxu, (E[j] - E[i + 1]) / (E[j... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER EXPR FUNC_CALL VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR FUNC_CALL VAR BIN_OP VAR NUMBER VAR IF BIN_OP VAR... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | n, U = map(int, input().split())
E = [int(x) for x in input().split()]
E.append(10**100)
k = 0
best = -1
for i in range(n):
while E[k + 1] - E[i] <= U:
k += 1
j = i + 1
if i < j < k:
best = max(best, (E[k] - E[j]) / (E[k] - E[i]))
print(best) | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP NUMBER NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR WHILE BIN_OP VAR BIN_OP VAR NUMBER VAR VAR VAR VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER IF VAR VAR VAR AS... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | import sys
[n, U] = map(int, sys.stdin.readline().strip().split())
E = list(map(int, sys.stdin.readline().strip().split()))
max_eta = -1
k = 2
for i in range(n - 2):
k = max(k, i + 2)
if E[k] - E[i] > U:
continue
while k + 1 < n and E[k + 1] - E[i] <= U:
k += 1
eta = (E[k] - E[i + 1]) /... | IMPORT ASSIGN LIST VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR BIN_OP VAR NUMBER IF BIN_OP VAR VAR VAR VAR VAR WHILE BIN_O... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | n, U = [int(c) for c in input().split(" ")]
E = [int(c) for c in input().split(" ")]
def binary_max_search(max_limit):
left, right = 0, n - 1
while left < right:
mid = (left + right) // 2 + 1
if E[mid] <= max_limit:
left, right = mid, right
else:
left, right = l... | ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR STRING FUNC_DEF ASSIGN VAR VAR NUMBER BIN_OP VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP BIN_OP VAR VAR NUMBER NUMBER IF VAR VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR VAR VAR BIN_OP VAR NUM... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | nE, U = [int(x) for x in input().split(" ")]
energies = [int(x) for x in input().split(" ")]
end = 0
best_ratio = -1
for beg in range(nE - 2):
while end + 1 < nE and energies[end + 1] - energies[beg] <= U:
end += 1
if end - beg < 2:
continue
new_ratio = (energies[end] - energies[beg + 1]) / ... | ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER WHILE BIN_OP VAR NUMBER VAR BIN_OP VAR BIN_OP VAR NUMBER VAR VAR VAR VAR NUMBER IF BIN_OP VAR VAR NUMBER ASSIGN ... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | n, u = map(int, input().split())
arr = list(map(int, input().split()))
j, i = 1, 0
maxi = -1
flag = 0
for i in range(n - 1):
if arr[i + 1] - arr[i] <= u:
flag = 1
if flag == 0:
print("-1")
exit()
i = 0
while i < n - 2:
while 1:
if j >= n:
j = n - 1
break
i... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR NUMBER NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER IF BIN_OP VAR BIN_OP VAR NUMBER VAR VAR VAR ASSIGN VAR NUMBER IF VAR NUMBER EXPR FUNC_CALL ... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | n, U = list(map(int, input().split()))
E = list(map(int, input().split()))
ind_i = 0
prev_ind_k = ind_i + 2
maxi_efficiency = -1
turn = 0
for ind_i in range(0, n - 2):
ind_j = ind_i + 1
prev_ind_k = max(prev_ind_k, ind_i + 2)
Ei = E[ind_i]
Ej = E[ind_j]
for ind_k in range(prev_ind_k, n + 1):
... | ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR FUNC_CALL VA... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | n, U = map(int, input().split())
E = list(map(int, input().split()))
best = -1
k = 0
for i in range(n):
while k + 1 < n and E[k + 1] - E[i] <= U:
k += 1
if k >= i + 2:
best = max(best, (E[k] - E[i + 1]) / (E[k] - E[i]))
print(best) | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR WHILE BIN_OP VAR NUMBER VAR BIN_OP VAR BIN_OP VAR NUMBER VAR VAR VAR VAR NUMBER IF VAR BIN_OP VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR ... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | def sss(l, r, tt):
f = -1
while l <= r:
mid = l + r >> 1
if a[mid] - a[tt] <= m:
f = mid
l = mid + 1
else:
r = mid - 1
return f
n, m = map(int, input().split())
a = [int(x) for x in input().split()]
f = 0
l = len(a)
Maxx = -1
for i in range(0, l ... | FUNC_DEF ASSIGN VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF BIN_OP VAR VAR VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER RETURN VAR ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR ... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | n, u = map(int, input().split())
a = list(map(int, input().split()))
i = 0
j = 1
f = 1
ma = -1
while not (i == j and i == n - 1):
if j <= i:
j += 1
if j < n - 1:
if a[j + 1] - a[i] <= u:
j += 1
else:
if j - i >= 2:
f = 0
ma = max(ma... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR VAR VAR BIN_OP VAR NUMBER IF VAR VAR VAR NUMBER IF VAR BIN_OP VAR NUMBER IF BIN_OP VAR BIN_OP VAR NUMBER VAR VAR V... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | par = input()
par = list(map(int, par.split()))
n, U = par[0], par[1]
E = input()
E = list(map(int, E.split()))
f = -1
idx = 0
for i in range(n - 2):
while idx < n - 1 and E[idx + 1] <= E[i] + U:
idx += 1
if idx - i < 2:
continue
else:
f = max((E[idx] - E[i + 1]) / (E[idx] - E[i]), f... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL VAR ASSIGN VAR VAR VAR NUMBER VAR NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER WHILE VAR BIN_OP VAR NUMBER VAR BIN_OP VAR ... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | import sys
def read_two_int():
return map(int, sys.stdin.readline().strip().split(" "))
def fast_solution(n, U, E):
best = -1
R = 2
for i in range(n - 2):
R = max(R, i + 2)
while R + 1 < n and E[R + 1] - E[i] <= U:
R += 1
if E[R] - E[i] <= U:
efficienc... | IMPORT FUNC_DEF RETURN FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR STRING FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR BIN_OP VAR NUMBER WHILE BIN_OP VAR NUMBER VAR BIN_OP VAR BIN_OP VAR NUMBER VAR VAR VAR VAR NUMBER IF BIN_OP VAR VAR VAR VAR ... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | n, u = map(int, input().split())
e = list(map(int, input().split()))
e = sorted(e)
r = 1
ans = -1
for i in range(n - 2):
k = e[i + 1] - e[i]
while r < n and e[r] - e[i] <= u:
r += 1
pr = r - 1
if pr - i >= 2:
ans = max(ans, (e[pr] - e[i + 1]) / (e[pr] - e[i]))
if ans == -1:
print(-1)... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR BIN_OP VAR NUMBER VAR VAR WHILE VAR VAR BIN_OP VAR VAR VAR VAR VAR VA... |
An atom of element X can exist in n distinct states with energies E1 < E2 < ... < En. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens:
... | n, u = map(int, input().split())
a = list(map(int, input().split()))
l, r = 0, 0
ans = -1
for i in range(n):
r = max(l, r)
while r < n - 1 and a[r + 1] - a[l] <= u:
r += 1
if r - l > 1 and a[r] - a[l] <= u:
ans = max(ans, (a[r] - a[l + 1]) / (a[r] - a[l]))
l += 1
print(ans) | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR NUMBER NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR VAR WHILE VAR BIN_OP VAR NUMBER BIN_OP VAR BIN_OP VAR NUMBER VAR VAR VAR VAR NUMBER IF BIN_OP ... |
You are given a multiset S consisting of positive integers (initially empty). There are two kind of queries: Add a positive integer to S, the newly added integer is not less than any number in it. Find a subset s of the set S such that the value $\operatorname{max}(s) - \operatorname{mean}(s)$ is maximum possible. H... | q = int(input())
s = input().split()
a = [int(s[1])]
sum1 = a[0]
pos = -1
mean = sum1
fin = ""
for i in range(q - 1):
n = len(a)
s = input().split()
if s[0] == "1":
a.append(int(s[1]))
sum1 += a[-1] - a[-2]
mean = sum1 / (pos + 2)
n = len(a)
while pos < n - 2 and a[po... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST FUNC_CALL VAR VAR NUMBER ASSIGN VAR VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR VAR ASSIGN VAR STRING FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER STRING EXPR FU... |
You are given a multiset S consisting of positive integers (initially empty). There are two kind of queries: Add a positive integer to S, the newly added integer is not less than any number in it. Find a subset s of the set S such that the value $\operatorname{max}(s) - \operatorname{mean}(s)$ is maximum possible. H... | import sys
s, left_index, sub_sum, subset = [], -1, 0, 1
input()
for line in sys.stdin:
inp = list(map(int, line.split()))
if inp[0] == 2:
sub_sum += s[-1]
for j in range(left_index + 1, len(s)):
if s[j] <= sub_sum / subset:
sub_sum += s[j]
subset += ... | IMPORT ASSIGN VAR VAR VAR VAR LIST NUMBER NUMBER NUMBER EXPR FUNC_CALL VAR FOR VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL VAR IF VAR NUMBER NUMBER VAR VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER FUNC_CALL VAR VAR IF VAR VAR BIN_OP VAR VAR VAR VAR VAR VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR BIN... |
You are given a multiset S consisting of positive integers (initially empty). There are two kind of queries: Add a positive integer to S, the newly added integer is not less than any number in it. Find a subset s of the set S such that the value $\operatorname{max}(s) - \operatorname{mean}(s)$ is maximum possible. H... | import sys
input = sys.stdin.readline
Q = int(input())
a = []
sm = []
def best():
mx = a[-1]
n = len(a)
l, r = 0, n - 2
ret = mx
while l <= r:
mid = (l + r) // 2
s = sm[mid] + mx
c = mid + 2
avg = s / c
if a[mid] > avg:
r = mid - 1
else:... | IMPORT ASSIGN VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR LIST FUNC_DEF ASSIGN VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR VAR NUMBER BIN_OP VAR NUMBER ASSIGN VAR VAR WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP VAR VAR VAR ASSIGN VAR BIN_OP VAR NUMBER... |
You are given a multiset S consisting of positive integers (initially empty). There are two kind of queries: Add a positive integer to S, the newly added integer is not less than any number in it. Find a subset s of the set S such that the value $\operatorname{max}(s) - \operatorname{mean}(s)$ is maximum possible. H... | from sys import stdin
def mean(p):
return (c[p] + a[-1]) / (p + 2)
def check(p):
return mean(p) >= a[p]
def binary(a, b):
low, high = a - 1, b + 1
while high - low > 1:
mid = (low + high) // 2
if check(mid):
low = mid
else:
high = mid
return low
... | FUNC_DEF RETURN BIN_OP BIN_OP VAR VAR VAR NUMBER BIN_OP VAR NUMBER FUNC_DEF RETURN FUNC_CALL VAR VAR VAR VAR FUNC_DEF ASSIGN VAR VAR BIN_OP VAR NUMBER BIN_OP VAR NUMBER WHILE BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF FUNC_CALL VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR RETURN VAR ASSIGN VAR FUNC_CALL ... |
You are given a multiset S consisting of positive integers (initially empty). There are two kind of queries: Add a positive integer to S, the newly added integer is not less than any number in it. Find a subset s of the set S such that the value $\operatorname{max}(s) - \operatorname{mean}(s)$ is maximum possible. H... | import sys
def input():
return sys.stdin.buffer.readline()
Q = int(input())
stack = []
pos = 0
query = [tuple(map(int, input().split())) for i in range(Q)]
S = 0
for que in query:
command = que[0]
if command == 1:
stack.append(que[1])
continue
last_number = stack[-1]
while pos < ... | IMPORT FUNC_DEF RETURN FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER FOR VAR VAR ASSIGN VAR VAR NUMBER IF VAR NUMBER EXPR FUNC_CALL VAR VAR NUMBER ASSIGN VAR VAR NUMBER WHI... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | for _ in range(int(input())):
x, y, z = map(int, input().split())
a = sorted(map(int, input().split()))
b = sorted(map(int, input().split()))
c = sorted(map(int, input().split()))
i, j, k, ans = 0, 0, 0, (a[0] - b[0]) ** 2 + (a[0] - c[0]) ** 2 + (b[0] - c[0]) ** 2
while i < x and j < y and k < z... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN V... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def find(arr, flag, num):
if flag:
low = 0
high = len(arr) - 1
while low < high:
mid = (low + high) // 2
if arr[mid] < num:
low = mid + 1
else:
high = mid - 1
if arr[low] < num:
if low != len(arr) - 1:
... | FUNC_DEF IF VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER IF VAR VAR VAR IF VAR BIN_OP FUNC_CALL VAR VAR NUMBER RETURN VAR BIN_OP VAR NUMBER RETURN BIN_OP NUMBER NUMBER RETUR... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def f(x, y, z):
return (x - y) ** 2 + (y - z) ** 2 + (z - x) ** 2
for _ in range(int(input())):
nr, ng, nb = map(int, input().split())
r = list(map(int, input().split()))
g = list(map(int, input().split()))
b = list(map(int, input().split()))
T = [0] * nr + [1] * ng + [2] * nb
V = r + g + ... | FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR ... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import sys
read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def lowerIndex(arr, n, x):
l = 0
h = n - 1
while l <= h:
mid = int((l + h) / 2)
if arr[mid] >= x:
h = mid - 1
else:
l = mid + 1
return l
d... | IMPORT ASSIGN VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER WHILE VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER RETURN VAR FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER WHIL... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | for _ in range(int(input())):
nr, ng, nb = map(int, input().split())
rs = list(map(int, input().split()))
gs = list(map(int, input().split()))
bs = list(map(int, input().split()))
rs.sort()
gs.sort()
bs.sort()
t = []
for c in rs:
t.append((c, 1))
for c in gs:
t.ap... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUN... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import sys
input = sys.stdin.readline
def inlt():
return list(map(int, input().split()))
def match(a, b, c):
def calculate_result(result, item1, item2, item3):
return min(
result, (item1 - item2) ** 2 + (item2 - item3) ** 2 + (item1 - item3) ** 2
)
len_a = len(a)
len_b... | IMPORT ASSIGN VAR VAR FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF FUNC_DEF RETURN FUNC_CALL VAR VAR BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | q = int(input())
def solve(a, b, c, na, nc):
ans = -1
for d in b:
if a[0] > d or c[-1] < d:
continue
l = -1
r = na
m = (na - 1) // 2
while l < r - 1:
m = (l + r) // 2
if a[m] <= d and m == na - 1:
break
if ... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_DEF ASSIGN VAR NUMBER FOR VAR VAR IF VAR NUMBER VAR VAR NUMBER VAR ASSIGN VAR NUMBER ASSIGN VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR NUMBER NUMBER WHILE VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR NUMBER IF VAR VAR VAR VAR BIN_OP VA... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def calc(a, b, c):
return (a - b) * (a - b) + (b - c) * (b - c) + (c - a) * (c - a)
def binarySearchCount(arr, n, key):
left = 0
right = n - 1
count = 0
while left <= right:
mid = int((right + left) / 2)
if arr[mid] <= key:
count = mid + 1
left = mid + 1
... | FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER WHILE VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR ASSIGN VAR BIN_OP VAR ... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | infinity = 10**30
def w(x, y, z):
return (x - y) ** 2 + (y - z) ** 2 + (z - x) ** 2
t = int(input())
for _ in range(t):
nr, ng, nb = map(int, input().split())
r = list(sorted(map(int, input().split())))
g = list(sorted(map(int, input().split())))
b = list(sorted(map(int, input().split())))
b... | ASSIGN VAR BIN_OP NUMBER NUMBER FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_C... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | t = int(input())
for u in range(t):
a, b, c = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
for i in range(len(a)):
a[i] = [a[i], 0]
for i in range(len(b)):
b[i] = [b[i], 1]
for i in range... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CA... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def ceilindex(arr, k):
r = len(arr) - 1
l = 0
if arr[l] >= k:
return arr[l]
while r - l > 1:
mid = l + (r - l) // 2
if arr[mid] == k:
return arr[mid]
elif arr[mid] > k:
r = mid
else:
l = mid
if arr[r] >= k:
return ar... | FUNC_DEF ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR NUMBER IF VAR VAR VAR RETURN VAR VAR WHILE BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR RETURN VAR VAR IF VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR IF VAR VAR VAR RETURN VAR VAR RETURN NONE FUNC_DEF ASSIGN VAR BIN_... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def comp_ans(a, b, c):
return (a - b) * (a - b) + (a - c) * (a - c) + (b - c) * (b - c)
def lower_bound(S, t):
if S[0] >= t:
return 0
l = 0
r = len(S)
while r - l > 1:
mid = (l + r) // 2
if S[mid] >= t:
r = mid
else:
l = mid
return r if r... | FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR FUNC_DEF IF VAR NUMBER VAR RETURN NUMBER ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR WHILE BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR ASSIGN V... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | t = int(input())
for i in range(t):
r, g, b = map(int, input().split())
R = list(map(int, input().split()))
G = list(map(int, input().split()))
B = list(map(int, input().split()))
R.sort()
G.sort()
B.sort()
INF = 10**20
h1, h2, h3 = INF, INF, INF
ans = 0
first = 0
second ... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CA... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | from sys import stdin
def closestindex(arr, num, start):
a = start
b = len(arr) - 1
while a < b:
mid = (a + b) // 2
if num < arr[mid]:
if abs(arr[mid] - num) < abs(arr[mid - 1] - num):
return mid
else:
b = mid - 1
elif abs(arr... | FUNC_DEF ASSIGN VAR VAR ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR IF FUNC_CALL VAR BIN_OP VAR VAR VAR FUNC_CALL VAR BIN_OP VAR BIN_OP VAR NUMBER VAR RETURN VAR ASSIGN VAR BIN_OP VAR NUMBER IF FUNC_CALL VAR BIN_OP VAR VAR VAR FUNC_CALL VAR BIN_OP VAR ... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import sys
def binary1(l, r, x, a):
if l == r:
return a[l]
idx = (l + r) // 2 + 1
if a[idx] <= x:
return binary1(idx, r, x, a)
else:
return binary1(l, idx - 1, x, a)
def binary2(l, r, x, a):
if l == r:
return a[l]
idx = (l + r) // 2
if a[idx] >= x:
... | IMPORT FUNC_DEF IF VAR VAR RETURN VAR VAR ASSIGN VAR BIN_OP BIN_OP BIN_OP VAR VAR NUMBER NUMBER IF VAR VAR VAR RETURN FUNC_CALL VAR VAR VAR VAR VAR RETURN FUNC_CALL VAR VAR BIN_OP VAR NUMBER VAR VAR FUNC_DEF IF VAR VAR RETURN VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR RETURN FUNC_CALL VAR VAR VAR VA... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def sol(a, b, c):
return (a - b) ** 2 + (a - c) ** 2 + (c - b) ** 2
def clo(a, b, c):
x = abs(a - c)
y = abs(b - c)
if x > y:
return b
return a
def bs(ar, c):
if c <= ar[0]:
return ar[0]
elif ar[-1] <= c:
return ar[-1]
start = 0
end = len(ar) - 1
while... | FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER FUNC_DEF ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR IF VAR VAR RETURN VAR RETURN VAR FUNC_DEF IF VAR VAR NUMBER RETURN VAR NUMBER IF VAR NUMBER VAR RETURN VAR NUMBER ... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def solve(l1, l2, l3):
ai = 0
ci = 0
r = 10**100 + 1
for i in range(0, len(l2)):
while ai < len(l1) and l1[ai] <= l2[i]:
ai += 1
while ci < len(l3) and l3[ci] < l2[i]:
ci += 1
if ci == len(l3):
ci -= 1
if ai == 0:
ai += 1
... | FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR BIN_OP BIN_OP NUMBER NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR VAR WHILE VAR FUNC_CALL VAR VAR VAR VAR VAR VAR VAR NUMBER WHILE VAR FUNC_CALL VAR VAR VAR VAR VAR VAR VAR NUMBER IF VAR FUNC_CALL VAR VAR VAR NUMBER IF VAR NUMBER VAR NUMBER ASSIGN VAR ... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def cases(arr1, arr2, arr3):
n1 = len(arr1)
n2 = len(arr2)
n3 = len(arr3)
currmin = 0
currmax = 0
ans = 9223372036854775807
for element in arr2:
while currmin + 1 < n1 and arr1[currmin + 1] <= element:
currmin += 1
while currmax + 1 < n3 and arr3[currmax] < elemen... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR VAR WHILE BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR NUMBER WHILE BIN_OP VAR NUMBER VAR VAR VAR VAR VAR NUMBER IF VAR VAR VAR VAR VAR VAR ASSIGN VAR FUNC... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def calc(a, bb, cc):
return (a - bb) ** 2 + (bb - cc) ** 2 + (cc - a) ** 2
def findMin(x, y, z, nx, ny, nz):
possibilities = []
for i in range(nx):
a = x[i]
b = ny
j = -1
while b > 0:
while j + b < ny and y[j + b] <= a:
j += b
b //= 2... | FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER FUNC_DEF ASSIGN VAR LIST FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR NUMBER WHILE VAR NUMBER WHILE BIN_OP VAR VAR VAR VAR BIN_OP VAR VAR VAR VAR VAR VAR NUMBER ASSIGN VAR VAR A... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def find(M, x):
a = 0
b = len(M) - 1
while b - a > 1:
c = (b + a) // 2
if M[c] > x:
b = c
else:
a = c
return b if M[b] <= x else a
def check(a, b, M):
i = find(M, (a + b) / 2)
x = (b - a) ** 2 + (b - M[i]) ** 2 + (a - M[i]) ** 2
if i + 1 < le... | FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER WHILE BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR RETURN VAR VAR VAR VAR VAR FUNC_DEF ASSIGN VAR FUNC_CALL VAR VAR BIN_OP BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP BIN_OP BIN_OP BIN_OP VAR ... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def get(a, b, c):
i, j, k = 0, 0, 0
ans = 99999999999999999999
while i < len(a) and j < len(b) and k < len(c):
flag = False
while j < len(b) and b[j] <= a[i]:
flag = True
flag2 = False
while k < len(c) and c[k] <= b[j]:
flag2 = True
... | FUNC_DEF ASSIGN VAR VAR VAR NUMBER NUMBER NUMBER ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR VAR VAR VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR VAR VAR VAR VAR ASSIGN VAR NUMBER VAR NUMBER IF VAR VAR... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def cal(x, y, z):
return (x - y) * (x - y) + (y - z) * (y - z) + (z - x) * (z - x)
def lb(val, arr):
if val >= arr[len(arr) - 1]:
return arr[len(arr) - 1]
if val <= arr[0]:
return arr[0]
l = 0
r = len(arr)
while r - l > 1:
mid = (r + l) // 2
if arr[mid] == val:
... | FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR FUNC_DEF IF VAR VAR BIN_OP FUNC_CALL VAR VAR NUMBER RETURN VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR VAR NUMBER RETURN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR W... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import sys
lines = sys.stdin.readlines()
T = int(lines[0].strip())
for t in range(T):
a, b, c = map(int, lines[4 * t + 1].strip().split(" "))
As = list(map(int, lines[4 * t + 2].strip().split(" ")))
Bs = list(map(int, lines[4 * t + 3].strip().split(" ")))
Cs = list(map(int, lines[4 * t + 4].strip().spl... | IMPORT ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR NUMBER FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR BIN_OP BIN_OP NUMBER VAR NUMBER STRING ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR BIN_OP BIN_OP NUMBER VAR NUMBER STRING ASSIGN VAR... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import sys
from itertools import product
def I():
return sys.stdin.readline().rstrip()
def sqr(a):
return a * a
def calc(a, b, c):
return sqr(a - b) + sqr(b - c) + sqr(c - a)
def closests(l, x):
d = 1
while d <= len(l):
d *= 2
i = -1
while d > 0:
j = i + d
if ... | IMPORT FUNC_DEF RETURN FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN BIN_OP VAR VAR FUNC_DEF RETURN BIN_OP BIN_OP FUNC_CALL VAR BIN_OP VAR VAR FUNC_CALL VAR BIN_OP VAR VAR FUNC_CALL VAR BIN_OP VAR VAR FUNC_DEF ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR VAR NUMBER ASSIGN VAR NUMBER WHILE VAR NUMBER ASSIGN VAR BIN_OP VAR VA... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | t = int(input())
def f(arr, n):
i = 0
j = len(arr) - 1
if len(arr) == 1:
return arr[0]
while i < j:
mid = (i + j) // 2
if i == mid and j == mid + 1:
if abs(arr[i] - n) <= abs(arr[j] - n):
return arr[i]
else:
return arr[j]
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF FUNC_CALL VAR VAR NUMBER RETURN VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER IF FUNC_CALL VAR BIN_OP VAR VAR VAR FUNC_CALL VAR BIN_OP VAR VAR VAR RETURN VA... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def readInts():
return list(map(int, input().split()))
def f(a, b, c):
return (a - b) ** 2 + (a - c) ** 2 + (b - c) ** 2
def bs(arr, x, y):
l, r = -1, len(arr)
while r - l > 1:
m = (l + r) // 2
if 2 * arr[m] <= x + y:
l = m
else:
r = m
return None ... | FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER FUNC_DEF ASSIGN VAR VAR NUMBER FUNC_CALL VAR VAR WHILE BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF BIN_OP NUMB... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def main():
n1, n2, n3 = map(int, input().split())
a = sorted(list(map(int, input().split())))
b = sorted(list(map(int, input().split())))
c = sorted(list(map(int, input().split())))
fst = 0
scnd = 0
thrd = 0
dif = (a[fst] - b[scnd]) ** 2 + (a[fst] - c[thrd]) ** 2 + (b[scnd] - c[thrd]) *... | FUNC_DEF ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN ... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def sq(a):
return a * a
def give(x, y, z):
return sq(x - y) + sq(y - z) + sq(z - x)
def search(a, e):
l = 0
r = len(a) - 1
x = (l + r) // 2
while r - l > 1:
if a[x] <= e:
l = x
else:
r = x
x = (l + r) // 2
try:
return [a[x], a[x + 1... | FUNC_DEF RETURN BIN_OP VAR VAR FUNC_DEF RETURN BIN_OP BIN_OP FUNC_CALL VAR BIN_OP VAR VAR FUNC_CALL VAR BIN_OP VAR VAR FUNC_CALL VAR BIN_OP VAR VAR FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER WHILE BIN_OP VAR VAR NUMBER IF VAR VAR VAR ASSIGN VAR VAR ASSI... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def calc(n, la, lb):
n1 = minmore(la, n)
n2 = maxless(lb, n)
return (n - n1) ** 2 + (n - n2) ** 2 + (n1 - n2) ** 2
def minmore(la, n):
pl = 0
pr = len(la) - 1
while pl < pr:
mid = (pl + pr) // 2
if la[mid] == n:
return n
if la[mid] < n:
pl = mid ... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR VAR VAR ASSIGN VAR FUNC_CALL VAR VAR VAR RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VA... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | from itertools import permutations
def main():
for t in range(int(input())):
r_a, r_b, r_c = [int(j) for j in input().split()]
a = [int(j) for j in input().split()]
b = [int(j) for j in input().split()]
c = [int(j) for j in input().split()]
a.sort()
b.sort()
... | FUNC_DEF FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR EXPR F... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def find(M, x):
a = 0
b = len(M) - 1
while b - a > 1:
if M[(a + b) // 2] > x:
b = (a + b) // 2
else:
a = (a + b) // 2
return b if M[b] <= x else a
def check(a, b, M):
x = (a + b) / 2
im = find(M, x)
x = (a - b) ** 2 + (a - M[im]) ** 2 + (M[im] - b) *... | FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER WHILE BIN_OP VAR VAR NUMBER IF VAR BIN_OP BIN_OP VAR VAR NUMBER VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER RETURN VAR VAR VAR VAR VAR FUNC_DEF ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR V... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import sys
BIG_NUMBER = 100000000000000000000000000000000000000000000
def func(i, j, k):
return (i - j) ** 2 + (k - j) ** 2 + (k - i) ** 2
def solve(a, b, c):
imax, jmax, kmax = len(a), len(b), len(c)
i, j, k = 0, 0, 0
a.append(BIG_NUMBER)
b.append(BIG_NUMBER)
c.append(BIG_NUMBER)
local... | IMPORT ASSIGN VAR NUMBER FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER FUNC_DEF ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR NUMBER NUMBER NUMBER EXPR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR VAR EXPR FUNC_... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | from itertools import permutations
def min_val(rs, gs, bs):
perm = permutations([0, 1, 2])
rs, gs, bs = list(sorted(rs)), list(sorted(gs)), list(sorted(bs))
nexts = [rs, gs, bs]
best_so_far = (rs[0] - gs[0]) ** 2 + (rs[0] - bs[0]) ** 2 + (bs[0] - gs[0]) ** 2
for p in perm:
c0, c1, c2 = 0, ... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR LIST NUMBER NUMBER NUMBER ASSIGN VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR ASSIGN VAR LIST VAR VAR VAR ASSIGN VAR BIN_OP BIN_OP BIN_OP BIN_OP VAR NUMBER VAR NUMBER NUMBER BIN_OP BIN_OP VAR NUMBER VAR NUMBER NUMBER BIN_OP... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | t = int(input())
def fun(x, y, z):
return (x - y) ** 2 + (y - z) ** 2 + (z - x) ** 2
def partialbest(red, green, blue):
ind_green_maggiore = 0
ind_blue_maggiore_l = 0
ind_blue_maggiore_r = 0
min_value = fun(red[0], green[0], blue[0])
for j in range(len(red)):
k = ind_green_maggiore
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR NUMBER VAR NUMBER VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR ASS... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | from sys import stdin
input = stdin.readline
q = int(input())
def cyk(l1, l2, l3, len1, len2, len3):
wynik = 65872346587623475642374982383247
i1 = 0
i3 = 0
for i2 in range(len2):
while True:
dupa = 0
if i1 < len1 - 1 and l1[i1 + 1] <= l2[i2]:
i1 += 1
... | ASSIGN VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR WHILE NUMBER ASSIGN VAR NUMBER IF VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR VAR NUMBER VAR NUMBER IF VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR VAR NUMBER VAR NUMBER IF ... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import sys
readline = sys.stdin.readline
minf, inf = -(10**12), 10**12
biginf = 10**20
for _ in range(int(readline())):
r, g, b = map(int, readline().split())
r_a = [minf] + sorted(set(map(int, readline().split()))) + [inf, inf]
g_a = [minf] + sorted(set(map(int, readline().split()))) + [inf, inf]
b_a ... | IMPORT ASSIGN VAR VAR ASSIGN VAR VAR BIN_OP NUMBER NUMBER BIN_OP NUMBER NUMBER ASSIGN VAR BIN_OP NUMBER NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR BIN_OP BIN_OP LIST VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CAL... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def solve(r, g, b):
j = 0
k = 0
ans = float("inf")
for i in range(len(g)):
while j + 1 < len(r) and r[j + 1] <= g[i]:
j += 1
while k + 1 < len(b) and b[k] < g[i]:
k += 1
ans = min(ans, (g[i] - r[j]) ** 2 + (g[i] - b[k]) ** 2 + (r[j] - b[k]) ** 2)
retur... | FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR STRING FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR WHILE BIN_OP VAR NUMBER FUNC_CALL VAR VAR VAR BIN_OP VAR NUMBER VAR VAR VAR NUMBER WHILE BIN_OP VAR NUMBER FUNC_CALL VAR VAR VAR VAR VAR VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR BIN_OP BIN_OP BIN_OP B... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import itertools
INF = 1 << 300 - 1
def calc(a, b, c):
return 2 * (a * a + b * b + c * c - a * b - b * c - c * a)
def binsearch_lt(a, target):
left = 0
right = len(a) - 1
while left + 1 < right:
mid = (left + right) // 2
if target <= a[mid]:
right = mid
if target... | IMPORT ASSIGN VAR BIN_OP NUMBER BIN_OP NUMBER NUMBER FUNC_DEF RETURN BIN_OP NUMBER BIN_OP BIN_OP BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER WHILE BIN_OP VAR NUMBER VAR ASSIGN VAR BIN... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def d(x, y, z):
return (x - y) ** 2 + (y - z) ** 2 + (z - x) ** 2
def getMin(arr):
h = arr[0]
m = None
t = None
ne = 1
tele = 2
min_val = None
while ne < len(arr) and tele < len(arr):
if h and not m and not t:
if arr[ne]["type"] == h["type"]:
h = arr... | FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER FUNC_DEF ASSIGN VAR VAR NUMBER ASSIGN VAR NONE ASSIGN VAR NONE ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NONE WHILE VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR IF VAR VAR VAR IF VAR VAR STRING VAR S... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def calc(l1, l2, l3, ans, a, b, c):
for i in range(a):
in2 = bs(l1[i], l2, 0, b)
in3 = bs(l1[i], l3, 1, c)
ans = min(
ans,
(l1[i] - l2[in2]) ** 2 + (l1[i] - l3[in3]) ** 2 + (l3[in3] - l2[in2]) ** 2,
)
in2 = bs(l1[i], l2, 1, b)
in3 = bs(l1[i], l... | FUNC_DEF FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR VAR VAR NUMBER VAR ASSIGN VAR FUNC_CALL VAR VAR VAR VAR NUMBER VAR ASSIGN VAR FUNC_CALL VAR VAR BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR VAR VAR NUMBER BIN_OP BIN_OP VAR VAR VAR VAR NUMBER BIN_OP BIN_OP VAR VAR VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR VAR VA... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def binsearch_smaller(a, v):
if a[0] >= v:
return a[0]
if a[-1] <= v:
return a[-1]
mid = len(a) // 2
if a[mid] < v:
if a[mid + 1] > v:
return a[mid]
else:
return binsearch_smaller(a[mid:], v)
elif a[mid] == v:
return v
else:
... | FUNC_DEF IF VAR NUMBER VAR RETURN VAR NUMBER IF VAR NUMBER VAR RETURN VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR VAR VAR IF VAR BIN_OP VAR NUMBER VAR RETURN VAR VAR RETURN FUNC_CALL VAR VAR VAR VAR IF VAR VAR VAR RETURN VAR IF VAR BIN_OP VAR NUMBER VAR RETURN VAR BIN_OP VAR NUMBER RETURN FUNC_CALL VAR... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import sys
ints = (int(x) for x in sys.stdin.read().split())
def leq_geq(A, B):
geq = [-1] * len(A)
leq = [-1] * len(A)
j = 0
for i in range(len(A)):
while j < len(B) and B[j] < A[i]:
j += 1
geq[i] = j if j < len(B) else -1
j = len(B) - 1
for i in range(len(A) - 1,... | IMPORT ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF ASSIGN VAR BIN_OP LIST NUMBER FUNC_CALL VAR VAR ASSIGN VAR BIN_OP LIST NUMBER FUNC_CALL VAR VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR WHILE VAR FUNC_CALL VAR VAR VAR VAR VAR VAR VAR NUMBER ASSIGN VAR VAR VAR FUNC_CALL VAR VAR V... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | from itertools import permutations
t = int(input())
for _ in range(t):
res = None
map(int, input().split())
arr = []
arr.append(sorted(map(int, input().split())))
arr.append(sorted(map(int, input().split())))
arr.append(sorted(map(int, input().split())))
res = None
for b, m, l in permut... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR NONE EXPR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST EXPR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR FUNC_CA... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def val(gems):
g1, g2, g3 = gems
v = (g1 - g2) ** 2 + (g2 - g3) ** 2 + (g3 - g1) ** 2
return v
def binarysearch(lwr, upr, lst, target, dxn):
if upr == lwr:
return lst[lwr]
elif upr - lwr == 1 and dxn == 1:
if lst[upr] <= target:
return lst[upr]
else:
... | FUNC_DEF ASSIGN VAR VAR VAR VAR ASSIGN VAR BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER RETURN VAR FUNC_DEF IF VAR VAR RETURN VAR VAR IF BIN_OP VAR VAR NUMBER VAR NUMBER IF VAR VAR VAR RETURN VAR VAR RETURN VAR VAR IF BIN_OP VAR VAR NUMBER VAR NUMBER IF VAR VAR VA... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def solve(l1, l2, l3):
ans = float("inf")
for i in l1:
x, y = find(l2, l3, i)
ans = min(ans, (i - x) ** 2 + (i - y) ** 2 + (x - y) ** 2)
return ans
def find(arr1, arr2, num):
low, high = 0, len(arr1) - 1
while low < high:
mid = (low + high) // 2
if arr1[mid] < num:
... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR STRING FOR VAR VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR VAR ASSIGN VAR FUNC_CALL VAR VAR BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER RETURN VAR FUNC_DEF ASSIGN VAR VAR NUMBER BIN_OP FUNC_CALL VAR VAR NUMBER WHILE VAR VAR ASSIGN V... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import sys
def lower(num, arr):
ans = 0
low, high = 0, len(arr) - 1
while low <= high:
mid = (low + high) // 2
if arr[mid] <= num:
ans = mid
low = mid + 1
else:
high = mid - 1
return ans
def upper(num, arr):
ans = len(arr) - 1
low, ... | IMPORT FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR VAR NUMBER BIN_OP FUNC_CALL VAR VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER RETURN VAR FUNC_DEF ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR VAR NUMBER BIN_O... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import sys
input = sys.stdin.readline
def f(a, b, c):
return (a - b) ** 2 + (b - c) ** 2 + (c - a) ** 2
def check(A, B, C):
r = 10**22
ai = ci = 0
for i in range(len(B)):
b = B[i]
while ai < len(A) and A[ai] <= b:
ai += 1
while ci < len(C) and C[ci] < b:
... | IMPORT ASSIGN VAR VAR FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER FUNC_DEF ASSIGN VAR BIN_OP NUMBER NUMBER ASSIGN VAR VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR WHILE VAR FUNC_CALL VAR VAR VAR VAR VAR VAR NUMBER WHILE VA... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def calc(x, y, z):
if (x, y, z) in dic:
return dic[x, y, z]
dic[x, y, z] = (x - y) ** 2 + (y - z) ** 2 + (z - x) ** 2
return dic[x, y, z]
def findge(arr, x):
start = 0
end = len(arr) - 1
ans = -1
while start <= end:
mid = (start + end) // 2
if arr[mid] < x:
... | FUNC_DEF IF VAR VAR VAR VAR RETURN VAR VAR VAR VAR ASSIGN VAR VAR VAR VAR BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER RETURN VAR VAR VAR VAR FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BI... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | for f in range(int(input())):
nr, ng, nb = map(int, input().split())
r = list(map(int, input().split()))
g = list(map(int, input().split()))
b = list(map(int, input().split()))
r.sort()
g.sort()
b.sort()
mi = 2 * (r[0] ** 2 + g[0] ** 2 + b[0] ** 2)
fr = 0
fg = 0
fb = 0
pr... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUN... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | def binary(l, r, arr, x):
while l + 1 < r:
mid = (l + r) // 2
if arr[mid] <= x:
r = mid
else:
l = mid
if abs(arr[l] - x) <= abs(arr[r] - x):
return arr[l]
else:
return arr[r]
T = int(input())
for _ in range(T):
r, g, b = map(int, input().... | FUNC_DEF WHILE BIN_OP VAR NUMBER VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR IF FUNC_CALL VAR BIN_OP VAR VAR VAR FUNC_CALL VAR BIN_OP VAR VAR VAR RETURN VAR VAR RETURN VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR FUNC_CALL VAR V... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | t = int(input())
while t:
a, b, c = input().split(" ")
a, b, c = int(a), int(b), int(c)
x = input().split(" ")
for i in range(a):
x[i] = int(x[i])
y = input().split(" ")
for i in range(b):
y[i] = int(y[i])
z = input().split(" ")
for i in range(c):
z[i] = int(z[i])... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR WHILE VAR ASSIGN VAR VAR VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING F... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | t = int(input())
def getClosest(val1, val2, target):
if target - val1 >= val2 - target:
return val2
else:
return val1
def findClosest(arr, n, target):
if target <= arr[0]:
return arr[0]
if target >= arr[n - 1]:
return arr[n - 1]
i = 0
j = n
mid = 0
whi... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_DEF IF BIN_OP VAR VAR BIN_OP VAR VAR RETURN VAR RETURN VAR FUNC_DEF IF VAR VAR NUMBER RETURN VAR NUMBER IF VAR VAR BIN_OP VAR NUMBER RETURN VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR VAR ASSIGN VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VA... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import sys
input = sys.stdin.readline
def operator(v1, v2, v3):
return (v1 - v2) ** 2 + (v2 - v3) ** 2 + (v3 - v1) ** 2
def abs_diff(l, g, idx, leng):
diff, val = abs(l[idx] - g), l[idx]
while idx < leng - 1:
idx += 1
if abs(l[idx] - g) < diff:
diff = abs(l[idx] - g)
... | IMPORT ASSIGN VAR VAR FUNC_DEF RETURN BIN_OP BIN_OP BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER FUNC_DEF ASSIGN VAR VAR FUNC_CALL VAR BIN_OP VAR VAR VAR VAR VAR WHILE VAR BIN_OP VAR NUMBER VAR NUMBER IF FUNC_CALL VAR BIN_OP VAR VAR VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_OP VAR V... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
<image>
Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, ... | import sys
input = sys.stdin.buffer.readline
def binSearch(a, ar):
l = 0
r = len(ar)
mid = (l + r) // 2
while l < r:
if ar[mid] > a:
r = mid
mid = (l + r) // 2
else:
l = mid + 1
mid = (l + r) // 2
return max(0, l - 1)
def binSearch... | IMPORT ASSIGN VAR VAR FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER WHILE VAR VAR IF VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER RETURN FUNC_CALL VAR NUMBER BIN_OP VAR NUMBER FUN... |
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.
Recently Xenia has bought $n_r$ red gems, $n_g$ green gems and $n_b$ blue gems. Each of the gems has a weight.
Now, she is going to pick three gems.
Xenia loves colorful things, so ... | def cases(array1, array2, array3):
n1 = len(array1)
n2 = len(array2)
n3 = len(array3)
currmin = 0
currmax = 0
ans = 92523523623423452323623
for ele in array2:
while currmin + 1 < n1 and array1[currmin + 1] <= ele:
currmin += 1
while currmax + 1 < n3 and array3[cur... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR VAR WHILE BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR NUMBER WHILE BIN_OP VAR NUMBER VAR VAR VAR VAR VAR NUMBER IF VAR VAR VAR VAR VAR VAR ASSIGN VAR FUNC... |
An atom of element X can exist in n distinct states with energies E_1 < E_2 < ... < E_{n}. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens... | n, U = list(map(int, input().split()))
E = list(map(int, input().split()))
E.append(10**20)
E.append(10**20)
E.append(10**20)
start = 0
finish = 1
res = -1
while start < n - 2:
while E[finish] - E[start] > U and start < n - 2:
start += 1
while E[finish + 1] - E[start] <= U and finish + 1 < n:
fi... | ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP NUMBER NUMBER EXPR FUNC_CALL VAR BIN_OP NUMBER NUMBER EXPR FUNC_CALL VAR BIN_OP NUMBER NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VA... |
An atom of element X can exist in n distinct states with energies E_1 < E_2 < ... < E_{n}. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens... | n, u = map(int, input().split())
E = [int(x) for x in input().split()] + [10**10]
ans = -1
k = 0
for i in range(n):
while E[k + 1] <= E[i] + u:
k += 1
if k - i >= 2:
n = (E[k] - E[i + 1]) / (E[k] - E[i])
ans = max(ans, n)
print(ans) | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR BIN_OP FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR LIST BIN_OP NUMBER NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR WHILE VAR BIN_OP VAR NUMBER BIN_OP VAR VAR VAR VAR NUMBER IF BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR... |
An atom of element X can exist in n distinct states with energies E_1 < E_2 < ... < E_{n}. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens... | import sys
string = sys.stdin.readline()
n = int(string.split()[0])
u = int(string.split()[1])
levels = tuple(map(int, sys.stdin.readline().split()))
if len(levels) < 3:
sys.stdout.write("-1")
exit(0)
i, j, k = 0, 1, 2
indices = 0, 1, 2
level_i = levels[0]
level_j = levels[1]
nu = levels[2] - level_i
nu = -1
w... | IMPORT ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR NUMBER ASSIGN VAR VAR VAR NUMBER NUMBER NUMBER ASSIGN VA... |
An atom of element X can exist in n distinct states with energies E_1 < E_2 < ... < E_{n}. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens... | n, u = list(map(int, input().split()))
e = list(map(int, input().split()))
max_eff = -1
j = 0
for i in range(n):
while j < n and e[j] <= e[i] + u:
j += 1
if i + 3 <= j:
max_eff = max(max_eff, (e[j - 1] - e[i + 1]) / (e[j - 1] - e[i]))
print(max_eff) | ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR WHILE VAR VAR VAR VAR BIN_OP VAR VAR VAR VAR NUMBER IF BIN_OP VAR NUMBER VAR ASSIGN VAR FUNC_CALL VAR VAR BIN_OP BIN_OP ... |
An atom of element X can exist in n distinct states with energies E_1 < E_2 < ... < E_{n}. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens... | n, v = list(map(int, input().split()))
l = list(map(int, input().split()))
ans = [-1]
for i in range(n - 2):
uk1 = i + 2
uk2 = n - 1
while uk2 - uk1 > 1:
if l[(uk2 + uk1) // 2] - l[i] <= v:
uk1 = (uk2 + uk1) // 2
else:
uk2 = (uk2 + uk1) // 2
if l[uk2] - l[i] <= v:... | ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER WHILE BIN_OP VAR VAR NUMBER IF BIN_OP VAR BIN_OP BIN_OP VAR V... |
An atom of element X can exist in n distinct states with energies E_1 < E_2 < ... < E_{n}. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens... | n, m = map(int, input().split())
a = list(map(int, input().split()))
k = 0
ans = -1
for i in range(n - 1):
while k < n - 1 and a[k + 1] - a[i] <= m:
k += 1
if i < k - 1:
ans = max(ans, (a[k] - a[i + 1]) / (a[k] - a[i]))
print(ans) | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER WHILE VAR BIN_OP VAR NUMBER BIN_OP VAR BIN_OP VAR NUMBER VAR VAR VAR VAR NUMBER IF VAR BIN_OP VAR NUMBER ASSIGN VAR FUNC... |
An atom of element X can exist in n distinct states with energies E_1 < E_2 < ... < E_{n}. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens... | import sys
n, u = [int(x) for x in input().split(" ")]
a = [int(x) for x in input().split(" ")]
b = [0] * n
j = 1
for i in range(n):
while j < n and a[j] - a[i] <= u:
j += 1
b[i] = j - i - 1
ans = -1.0
for i in range(n):
if b[i] > 1:
ans = max(ans, (a[i + b[i]] - a[i + 1]) / (a[i + b[i]] - ... | IMPORT ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR BIN_OP LIST NUMBER VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR WHILE VAR VAR BIN_OP VAR VAR VAR VAR VAR VAR NUMBER ASSIGN VAR VAR BIN_OP BIN_OP VAR VAR NUMBER ASSIGN ... |
An atom of element X can exist in n distinct states with energies E_1 < E_2 < ... < E_{n}. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens... | def upper_bound(a, n, i, x):
l = i
h = n
while l < h:
mid = (l + h) // 2
if x >= a[mid]:
l = mid + 1
else:
h = mid
return l
n, u = [int(x) for x in input().split()]
a = list(map(int, input().split()))
idx = 0
ans = -1
for i in range(n - 2):
idx = upp... | FUNC_DEF ASSIGN VAR VAR ASSIGN VAR VAR WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR VAR ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR VAR RETURN VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR ... |
An atom of element X can exist in n distinct states with energies E_1 < E_2 < ... < E_{n}. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens... | def read_data():
n, m = map(int, input().strip().split())
a = list(map(int, list(input().strip().split())))
return n, m, a
def find(start, end, v):
mid = int((start + end) / 2)
if start == end:
return start
if end - start == 1:
if a[end] <= v:
return end
els... | FUNC_DEF ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR RETURN VAR VAR VAR FUNC_DEF ASSIGN VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR VAR RETURN VAR IF BIN_OP VAR VAR NUMBER IF VAR VAR VAR RETURN VA... |
An atom of element X can exist in n distinct states with energies E_1 < E_2 < ... < E_{n}. Arkady wants to build a laser on this element, using a three-level scheme. Here is a simplified description of the scheme.
Three distinct states i, j and k are selected, where i < j < k. After that the following process happens... | n, U = list(map(int, input().strip().split()))
E = list(map(int, input().strip().split()))
mmax = -1
for i in range(0, n - 2):
j = i + 1
l = j + 1
r = n - 1
while l < r:
mid = (l + r) // 2
if E[mid] - E[i] <= U:
l = mid + 1
else:
r = mid - 1
if E[l] - ... | ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER WHILE VAR ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.