description stringlengths 171 4k | code stringlengths 94 3.98k | normalized_code stringlengths 57 4.99k |
|---|---|---|
The only difference between easy and hard versions is the constraints.
Polycarp has to write a coursework. The coursework consists of $m$ pages.
Polycarp also has $n$ cups of coffee. The coffee in the $i$-th cup Polycarp has $a_i$ caffeine in it. Polycarp can drink some cups of coffee (each one no more than once). He... | import sys
input = sys.stdin.readline
def judge(x):
b = a[:]
for i in range(n):
b[i] = max(0, b[i] - i // x)
return sum(b) >= m
def binary_search():
l, r = 1, n
while l <= r:
m = (l + r) // 2
if judge(m):
r = m - 1
else:
l = m + 1
retu... | IMPORT ASSIGN VAR VAR FUNC_DEF ASSIGN VAR VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR FUNC_CALL VAR NUMBER BIN_OP VAR VAR BIN_OP VAR VAR RETURN FUNC_CALL VAR VAR VAR FUNC_DEF ASSIGN VAR VAR NUMBER VAR WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF FUNC_CALL VAR VAR ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR BIN... |
The only difference between easy and hard versions is the constraints.
Polycarp has to write a coursework. The coursework consists of $m$ pages.
Polycarp also has $n$ cups of coffee. The coffee in the $i$-th cup Polycarp has $a_i$ caffeine in it. Polycarp can drink some cups of coffee (each one no more than once). He... | n, m = list(map(int, input().strip().split()))
cups = list(map(int, input().strip().split()))
full_coffe = sum(cups)
if full_coffe < m:
print("-1")
exit()
elif full_coffe == m:
print(len(cups))
exit()
cups.sort(reverse=True)
def check_day(day):
if day == 0:
return False
done = 0
fo... | 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 FUNC_CALL VAR VAR IF VAR VAR EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR IF VAR VAR EXPR FUNC_CALL VAR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR EXPR FUNC_... |
The only difference between easy and hard versions is the constraints.
Polycarp has to write a coursework. The coursework consists of $m$ pages.
Polycarp also has $n$ cups of coffee. The coffee in the $i$-th cup Polycarp has $a_i$ caffeine in it. Polycarp can drink some cups of coffee (each one no more than once). He... | n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
l = 1
r = n
d = -1
while l <= r:
mid = (l + r) // 2
ans = 0
for i in range(n):
ans += max(0, a[i] - i // mid)
if ans >= m:
r = mid - 1
d = mid
else:
l = mid + 1
print(d) | 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 NUMBER ASSIGN VAR NUMBER ASSIGN VAR VAR ASSIGN VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR NUM... |
The only difference between easy and hard versions is the constraints.
Polycarp has to write a coursework. The coursework consists of $m$ pages.
Polycarp also has $n$ cups of coffee. The coffee in the $i$-th cup Polycarp has $a_i$ caffeine in it. Polycarp can drink some cups of coffee (each one no more than once). He... | n, m = (int(t) for t in input().split(" "))
a = [int(t) for t in input().split(" ")]
a.sort(reverse=True)
def possible(d):
total = 0
for i in range(d):
step = 0
for j in range(i, n, d):
total += max(a[j] - step, 0)
step += 1
return total >= m
l, r = 0, n + 1
while... | 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 EXPR FUNC_CALL VAR NUMBER FUNC_DEF ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR VAR VAR VAR FUNC_CALL VAR BIN_OP VAR VAR VAR NUMBER VAR NUMBER RE... |
The only difference between easy and hard versions is the constraints.
Polycarp has to write a coursework. The coursework consists of $m$ pages.
Polycarp also has $n$ cups of coffee. The coffee in the $i$-th cup Polycarp has $a_i$ caffeine in it. Polycarp can drink some cups of coffee (each one no more than once). He... | import sys
input = sys.stdin.buffer.readline
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
a = [0] + a
sum_a = []
add = 0
for i in range(n + 1):
add += a[i]
sum_a.append(add)
mini = 999999999999999
p = n
i = 0
if sum(a) < m:
print(-1)
else:
flag = 0
for i... | IMPORT ASSIGN VAR VAR 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 NUMBER ASSIGN VAR BIN_OP LIST NUMBER VAR ASSIGN VAR LIST ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER VAR VAR VAR EXPR FUNC_CALL VAR VAR ASSIG... |
The only difference between easy and hard versions is the constraints.
Polycarp has to write a coursework. The coursework consists of $m$ pages.
Polycarp also has $n$ cups of coffee. The coffee in the $i$-th cup Polycarp has $a_i$ caffeine in it. Polycarp can drink some cups of coffee (each one no more than once). He... | import sys
input = sys.stdin.readline
def binary_search(c1, c2):
mi = (c1 + c2 + 1) // 2
if abs(c1 - c2) <= 1:
return error_check(mi)
else:
if ok(mi):
c2 = mi
else:
c1 = mi
return binary_search(c1, c2)
def ok(x):
c = 0
for i in range(n):
... | IMPORT ASSIGN VAR VAR FUNC_DEF ASSIGN VAR BIN_OP BIN_OP BIN_OP VAR VAR NUMBER NUMBER IF FUNC_CALL VAR BIN_OP VAR VAR NUMBER RETURN FUNC_CALL VAR VAR IF FUNC_CALL VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR RETURN FUNC_CALL VAR VAR VAR FUNC_DEF ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR IF VAR VAR BIN_OP VAR VAR VAR BIN_OP V... |
The only difference between easy and hard versions is the constraints.
Polycarp has to write a coursework. The coursework consists of $m$ pages.
Polycarp also has $n$ cups of coffee. The coffee in the $i$-th cup Polycarp has $a_i$ caffeine in it. Polycarp can drink some cups of coffee (each one no more than once). He... | n, m = map(int, input().split())
A = list(map(int, input().split()))
if sum(A) < m:
print(-1)
exit()
A.sort(reverse=True)
def is_ok(x):
temp = 0
for i in range(n):
temp += max(0, A[i] - i // x)
if temp >= m:
return True
else:
return False
ng = 0
ok = n
while ng + 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 IF FUNC_CALL VAR VAR VAR EXPR FUNC_CALL VAR NUMBER EXPR FUNC_CALL VAR EXPR FUNC_CALL VAR NUMBER FUNC_DEF ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR NUMBER BIN_OP VAR VAR BIN_OP ... |
A group of n schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.
The renting site offered them m bikes. The renting price is different for different bikes, renting the j-th bike costs p_{j} rubles.
In total, the boys' shared budget is a rubles. Besides, each of them has his own... | def readn():
return map(int, input().split())
n, m, a = readn()
n = min(n, m)
m = n
b = sorted(readn())[-n:]
p = sorted(readn())
r = 0
while r < n:
t = (r + 1 + n) // 2
a1 = sum([max(0, p[i] - b[m + i - t]) for i in range(t)])
if a1 <= a:
r = t
else:
n = t - 1
print(r, max(0, sum(p... | FUNC_DEF RETURN FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP BIN_OP VAR NUMBER VAR NUMBER ASSIGN VAR FU... |
A group of n schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.
The renting site offered them m bikes. The renting price is different for different bikes, renting the j-th bike costs p_{j} rubles.
In total, the boys' shared budget is a rubles. Besides, each of them has his own... | import sys
input = sys.stdin.readline
n, m, a = map(int, input().split())
b = list(map(int, input().split()))
p = list(map(int, input().split()))
b.sort(reverse=True)
p.sort()
l = 0
r = min(n, m) + 1
ans_use = 0
while r - l > 1:
k = (l + r) // 2
rem = a
tar_b = b[:k][::-1]
tar_p = p[:k]
use = 0
... | IMPORT ASSIGN 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 EXPR FUNC_CALL VAR NUMBER EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR VAR ... |
A group of n schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.
The renting site offered them m bikes. The renting price is different for different bikes, renting the j-th bike costs p_{j} rubles.
In total, the boys' shared budget is a rubles. Besides, each of them has his own... | import sys
cases = False
def fast_pow(a: int, b: int):
res = 1
while b > 0:
if b & 1:
res *= a
a *= a
b >>= 1
return res
def c2(n):
return n * (n - 1) // 2
def get():
return list(map(int, input().split()))
def bits(n: int):
return list(bin(n)).count("... | IMPORT ASSIGN VAR NUMBER FUNC_DEF VAR VAR ASSIGN VAR NUMBER WHILE VAR NUMBER IF BIN_OP VAR NUMBER VAR VAR VAR VAR VAR NUMBER RETURN VAR FUNC_DEF RETURN BIN_OP BIN_OP VAR BIN_OP VAR NUMBER NUMBER FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF VAR RETURN FUNC_CALL FUNC_CALL VAR FUNC_CALL... |
A group of n schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.
The renting site offered them m bikes. The renting price is different for different bikes, renting the j-th bike costs p_{j} rubles.
In total, the boys' shared budget is a rubles. Besides, each of them has his own... | import sys
input = sys.stdin.readline
def check(val, money):
j = 0
for i in range(n - val, n):
if b[i] >= p[j]:
j += 1
continue
diff = p[j] - b[i]
if money - diff < 0:
return 0
money -= diff
j += 1
return 1
for _ in range(1):
... | IMPORT ASSIGN VAR VAR FUNC_DEF ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR VAR VAR IF VAR VAR VAR VAR VAR NUMBER ASSIGN VAR BIN_OP VAR VAR VAR VAR IF BIN_OP VAR VAR NUMBER RETURN NUMBER VAR VAR VAR NUMBER RETURN NUMBER FOR VAR FUNC_CALL VAR NUMBER ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSI... |
A group of n schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.
The renting site offered them m bikes. The renting price is different for different bikes, renting the j-th bike costs p_{j} rubles.
In total, the boys' shared budget is a rubles. Besides, each of them has his own... | def check(mid):
need = 0
for i in range(mid):
if mon[n - mid + i] < pri[i]:
need += pri[i] - mon[n - mid + i]
return need <= a
n, m, a = list(map(int, input().split()))
mon = sorted(map(int, input().split()))
pri = sorted(map(int, input().split()))
l = 0
r = min(n, m)
while l <= r:
... | FUNC_DEF ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR IF VAR BIN_OP BIN_OP VAR VAR VAR VAR VAR VAR BIN_OP VAR VAR VAR BIN_OP BIN_OP VAR VAR VAR RETURN VAR VAR ASSIGN VAR 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 FUNC_CALL... |
A group of n schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.
The renting site offered them m bikes. The renting price is different for different bikes, renting the j-th bike costs p_{j} rubles.
In total, the boys' shared budget is a rubles. Besides, each of them has his own... | wejscie1 = list(map(int, input().strip().split()))
ilChlopcow = wejscie1[0]
ilRowerow = wejscie1[1]
budzet = wejscie1[2]
pieniadzeChlopcow = list(map(int, input().strip().split()))
cenyRowerow = list(map(int, input().strip().split()))
pieniadzeChlopcow = sorted(pieniadzeChlopcow)
cenyRowerow = sorted(cenyRowerow)
bikes... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR NUMBER ASSIGN VAR VAR NUMBER ASSIGN VAR VAR NUMBER ASSIGN 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 FUNC_CALL VA... |
A group of n schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.
The renting site offered them m bikes. The renting price is different for different bikes, renting the j-th bike costs p_{j} rubles.
In total, the boys' shared budget is a rubles. Besides, each of them has his own... | n, m, a = map(int, input().split())
b, p = sorted(map(int, input().split())), sorted(map(int, input().split()))
def f(k):
return sum(max(0, p[i] - b[n - k + i]) for i in range(k))
def g(k):
return sum(min(b[n - k + i], p[i]) for i in range(k))
x, y, d = 0, min(n, m) + 1, a
while y - x > 1:
k = (x + y)... | ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR NUMBER BIN_OP VAR VAR VAR BIN_OP BIN_OP VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_DEF RETUR... |
A group of n schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.
The renting site offered them m bikes. The renting price is different for different bikes, renting the j-th bike costs p_{j} rubles.
In total, the boys' shared budget is a rubles. Besides, each of them has his own... | 3
def readln():
return tuple(map(int, input().split()))
n, m, a = readln()
b = list(sorted(readln()))
p = list(sorted(readln()))
l = ost = 0
r = min(m, n) + 1
while r - l > 1:
k = (r + l) // 2
s = d = 0
for x, y in zip(b[-k:], p[:k]):
if x < y:
d += y - x
s += y
if d ... | EXPR NUMBER FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR VAR NUMBER WHILE BIN_OP VAR VAR NUMBER ... |
A group of n schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.
The renting site offered them m bikes. The renting price is different for different bikes, renting the j-th bike costs p_{j} rubles.
In total, the boys' shared budget is a rubles. Besides, each of them has his own... | def readn():
return list(map(int, input().split()))
n, m, a = readn()
b, p = sorted(map(int, input().split()))[-min(n, m) :], sorted(
map(int, input().split())
)
r = min(n, m)
mm = r
l = 0
while l <= r:
mid = l + (r - l) // 2
pri = sum([max(0, p[i] - b[mm - mid + i]) for i in range(mid)])
if pri <... | FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR VAR FUNC_CALL VAR ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR NUMBER ... |
A group of n schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.
The renting site offered them m bikes. The renting price is different for different bikes, renting the j-th bike costs p_{j} rubles.
In total, the boys' shared budget is a rubles. Besides, each of them has his own... | n, m, a = list(map(int, input().split()))
b = sorted(map(int, input().split()))
p = sorted(map(int, input().split()))
left = 1
right = min(n, m)
while left <= right:
mid = (left + right) // 2
if a >= sum(max(0, x - y) for x, y in zip(p[:mid], b[-mid:])):
left = mid + 1
else:
right = mid - 1
... | ASSIGN VAR 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 FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR VAR WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF VAR... |
A group of n schoolboys decided to ride bikes. As nobody of them has a bike, the boys need to rent them.
The renting site offered them m bikes. The renting price is different for different bikes, renting the j-th bike costs p_{j} rubles.
In total, the boys' shared budget is a rubles. Besides, each of them has his own... | K = int(input().split()[2])
A = list(map(int, input().split()))
B = list(map(int, input().split()))
def canMake(partA, partB, K):
for a, b in zip(partA, partB):
if a >= b:
pass
else:
K -= b - a
if K < 0:
return -1
return K
def paramSearch(A, B, K):... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL FUNC_CALL VAR NUMBER 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 FUNC_DEF FOR VAR VAR FUNC_CALL VAR VAR VAR IF VAR VAR VAR BIN_OP VAR VAR IF VAR NUMBER RETURN NUMBER RETURN VAR FUNC_DEF ASSIGN VA... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | def rint():
return int(input())
def rints():
return list(map(int, input().split()))
n, k = rints()
pos = [0] * (n + 1)
pos[0] = 1
pos[1] = 1
for i in range(2, n + 1):
pos[i] = pos[i - 1] + pos[i - 2]
perm = list(range(1, n + 1))
i = 0
while i < n - 1:
if pos[n - i - 1] < k:
perm[i] += 1
... | FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER ASSIGN VAR NUMBER NUMBER ASSIGN VAR NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP VAR NUMBER ASSIGN VAR VAR BIN_OP VAR BIN_... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | def F(n):
a, b = 1, 0
for i in range(n):
a, b = b, a + b
return b
def ans(n, k):
if n == 0:
return []
elif n == 1:
return [1]
elif k > F(n):
return [2, 1] + [(i + 2) for i in ans(n - 2, k - F(n))]
else:
return [1] + [(i + 1) for i in ans(n - 1, k)]
... | FUNC_DEF ASSIGN VAR VAR NUMBER NUMBER FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR BIN_OP VAR VAR RETURN VAR FUNC_DEF IF VAR NUMBER RETURN LIST IF VAR NUMBER RETURN LIST NUMBER IF VAR FUNC_CALL VAR VAR RETURN BIN_OP LIST NUMBER NUMBER BIN_OP VAR NUMBER VAR FUNC_CALL VAR BIN_OP VAR NUMBER BIN_OP VAR FUNC_CALL VAR VAR RE... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | n, k = map(int, input().split())
func = [1, 2]
for i in range(2, 60):
func.append(func[i - 1] + func[i - 2])
k -= 1
s = [(i + 1) for i in range(0, n)]
for i in range(0, n - 1):
if k >= func[n - i - 2]:
k -= func[n - i - 2]
s[i], s[i + 1] = s[i + 1], s[i]
for i in range(n):
print(s[i], end=" ... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR BIN_OP VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER VAR FUNC_CALL VAR NUMBER VAR FOR VAR FUNC_CALL VAR NUMBER BIN_OP VAR NUMBER IF VAR VAR ... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | def getFibCode(x):
result = []
f = [1, 1]
while f[-2] + f[-1] <= x:
f.append(f[-2] + f[-1])
for i in f[:0:-1]:
if i <= x:
result.append(1)
x -= i
else:
result.append(0)
return result
n, k = tuple(map(int, input().split()))
scheme = getFib... | FUNC_DEF ASSIGN VAR LIST ASSIGN VAR LIST NUMBER NUMBER WHILE BIN_OP VAR NUMBER VAR NUMBER VAR EXPR FUNC_CALL VAR BIN_OP VAR NUMBER VAR NUMBER FOR VAR VAR NUMBER NUMBER IF VAR VAR EXPR FUNC_CALL VAR NUMBER VAR VAR EXPR FUNC_CALL VAR NUMBER RETURN VAR ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | n, m = [int(x) for x in input().split()]
F = [1, 1]
for i in range(2, n):
F.append(F[-1] + F[-2])
perm = [(i + 1) for i in range(n)]
for i in range(n):
if m > F[n - 1 - i]:
m -= F[n - 1 - i]
perm[i], perm[i + 1] = perm[i + 1], perm[i]
for k in perm:
print(k, end=" ") | ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR EXPR FUNC_CALL VAR BIN_OP VAR NUMBER VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER VAR FUNC_CALL VAR VAR FOR VAR FUNC_CALL VAR VAR IF VAR VAR BIN_OP BIN_OP VAR NUMBER VAR VAR VAR BIN_OP BIN_OP VAR NUMBE... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | f, res = [1, 1], []
for i in range(50):
f.append(f[-1] + f[-2])
n, k = map(int, input().split())
now, j = n - 1, 0
for i in range(n):
res.append(i + 1)
while k > 1:
if k > f[now]:
res[j], res[j + 1] = res[j + 1], res[j]
k -= f[now]
now -= 1
j += 1
for i in res:
print(i, end=" ") | ASSIGN VAR VAR LIST NUMBER NUMBER LIST FOR VAR FUNC_CALL VAR NUMBER EXPR FUNC_CALL VAR BIN_OP VAR NUMBER VAR NUMBER ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR BIN_OP VAR NUMBER NUMBER FOR VAR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR BIN_OP VAR NUMBER WHILE VAR NUMBER IF VAR VAR VAR ASSIGN VAR V... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | def phib_gen(n):
p = [1, 1]
for i in range(2, n):
p.append(p[-1] + p[-2])
return tuple(p)
n, k = tuple(map(int, input().split()))
phib = phib_gen(n + 1)
def gen_sequence(n, k):
while n > 0:
if k >= phib[n - 1]:
k -= phib[n - 1]
n -= 2
yield 2
... | FUNC_DEF ASSIGN VAR LIST NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR EXPR FUNC_CALL VAR BIN_OP VAR NUMBER VAR NUMBER RETURN FUNC_CALL VAR VAR ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR BIN_OP VAR NUMBER FUNC_DEF WHILE VAR NUMBER IF VAR VAR BIN_OP VAR NUMBER VAR VA... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | n, k = list(map(int, input().split()))
fib = [0] * (n + 1)
fib[0] = 1
fib[1] = 1
res = [0] * n
for i in range(2, n):
fib[i] = fib[i - 1] + fib[i - 2]
idx = 0
while idx < n:
if k <= fib[n - idx - 1]:
res[idx] = idx + 1
idx += 1
else:
k -= fib[n - idx - 1]
res[idx] = idx + 2
... | ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER ASSIGN VAR NUMBER NUMBER ASSIGN VAR NUMBER NUMBER ASSIGN VAR BIN_OP LIST NUMBER VAR FOR VAR FUNC_CALL VAR NUMBER VAR ASSIGN VAR VAR BIN_OP VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER ... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | n, k = map(int, input().split())
f = [1, 1]
for i in range(2, n):
f.append(f[i - 2] + f[i - 1])
i = n
while i > 0:
i -= 1
if k > f[i]:
print(n - i + 1, n - i, end=" ")
k -= f[i]
i -= 1
else:
print(n - i, end=" ") | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR EXPR FUNC_CALL VAR BIN_OP VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER ASSIGN VAR VAR WHILE VAR NUMBER VAR NUMBER IF VAR VAR VAR EXPR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR NUMBER BIN_OP VAR VAR STRING VA... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | n, k = map(int, input().split())
a = [(0) for i in range(n + 1)]
a[0], a[1] = 1, 1
for i in range(2, n + 1):
a[i] = a[i - 1] + a[i - 2]
p = [(i + 1) for i in range(n)]
i = 0
while i < n:
if k > a[n - 1 - i]:
p[i], p[i + 1] = p[i + 1], p[i]
k -= a[n - 1 - i]
i += 2
else:
i += ... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER VAR NUMBER NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP VAR NUMBER ASSIGN VAR VAR BIN_OP VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER VAR FUNC_CALL VAR VAR AS... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | __author__ = "taras-sereda"
n, k = map(int, input().split())
fib = [0] * (n + 1)
fib[0], fib[1] = 1, 1
for i in range(2, n):
fib[i] = fib[i - 1] + fib[i - 2]
idx = 0
res = [None] * n
while idx < n:
if k <= fib[n - idx - 1]:
res[idx] = idx + 1
idx += 1
else:
k -= fib[n - idx - 1]
... | ASSIGN VAR STRING ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER ASSIGN VAR NUMBER VAR NUMBER NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR ASSIGN VAR VAR BIN_OP VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR BIN_OP LIST NONE VAR WHILE... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | def calc(n, k):
if n == 1:
print(1)
else:
tot = [0] * (n + 1)
tot[n] = 1
tot[n - 1] = 1
tot[n - 2] = 2
for i in range(n - 3, -1, -1):
tot[i] = tot[i + 1] + tot[i + 2]
def mPrint(a, b):
print(b, end=" ")
for i in range(a... | FUNC_DEF IF VAR NUMBER EXPR FUNC_CALL VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER ASSIGN VAR VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR BIN_OP VAR NUMBER NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER ASSIGN VAR VAR BIN_OP VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER FUNC_DEF ... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | l = [1, 2]
for i in range(1, 100):
l.append(l[i] + l[i - 1])
if l[-1] > 10**18:
break
l = [0, 0] + l
def perm(n, k):
if n == 1 and k == 1:
return [1]
if n == 2 and k == 1:
return [1, 2]
if n == 2 and k == 2:
return [2, 1]
if k <= l[n]:
return [1] + [(i +... | ASSIGN VAR LIST NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR BIN_OP VAR VAR VAR BIN_OP VAR NUMBER IF VAR NUMBER BIN_OP NUMBER NUMBER ASSIGN VAR BIN_OP LIST NUMBER NUMBER VAR FUNC_DEF IF VAR NUMBER VAR NUMBER RETURN LIST NUMBER IF VAR NUMBER VAR NUMBER RETURN LIST NUMBER NUMBER IF VAR NUMBER VAR ... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | n, k = [int(s) for s in input().split()]
fibo = [0] * max(2, n)
fibo[0] = 1
fibo[1] = 1
for i in range(2, n):
fibo[i] = fibo[i - 1] + fibo[i - 2]
def f(k):
return fibo[k - 1]
def dico(n, v):
i, j = 2, n
if f(j) <= v:
return j, f(j)
if v == 1:
return 2, 1
while j - i > 1:
... | ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER FUNC_CALL VAR NUMBER VAR ASSIGN VAR NUMBER NUMBER ASSIGN VAR NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR ASSIGN VAR VAR BIN_OP VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER FUNC_DEF RETURN VAR BIN_OP VAR NUMBER FUNC_DEF ASSIGN V... |
Let's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers from range from 1 to n. We say that this permutation maps value 1 into the value p1, value 2 into the value p2 and so on.
Kyota Ootori has just learned about cyclic representation of a permutation. A cycle is a... | arr = [1] * 51
for i in range(2, 51):
arr[i] = arr[i - 1] + arr[i - 2]
ans = []
def generate(i, n, to):
if i == n:
assert to == 1
print(" ".join(map(str, ans)))
return
if i + 1 == n:
ans.append(n)
generate(i + 1, n, to)
return
if arr[n - i - 1] < to:
... | ASSIGN VAR BIN_OP LIST NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER NUMBER ASSIGN VAR VAR BIN_OP VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER ASSIGN VAR LIST FUNC_DEF IF VAR VAR VAR NUMBER EXPR FUNC_CALL VAR FUNC_CALL STRING FUNC_CALL VAR VAR VAR RETURN IF BIN_OP VAR NUMBER VAR EXPR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR BI... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | S = sorted
for s in [*open(0)][1:]:
x, y, a, b = map(int, s.split())
x, y = S((x, y))
a, b = S((a, b))
try:
s = a + b
A = k = min((y - x) // (b - a), x // a)
x -= a * k
y -= b * k
k = min(x, y) // s
A += 2 * k
y, x = S((x - k * s, y - k * s))
... | ASSIGN VAR VAR FOR VAR LIST FUNC_CALL VAR NUMBER NUMBER ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR ASSIGN VAR BIN_OP VAR VAR ASSIGN VAR VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR VAR BIN_OP VAR VAR VAR BIN_O... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | t = int(input())
def good(m, x, y, a, b):
a, b = max(a, b), min(a, b)
if m * b <= y and m * a <= x:
return True
if m * a <= y and m * b <= x:
return True
if x <= m * a and y <= m * a:
s = (x - m * b) // (a - b)
e = (m * a - y) / (a - b)
return s >= e
def maxi(... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_DEF ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR IF BIN_OP VAR VAR VAR BIN_OP VAR VAR VAR RETURN NUMBER IF BIN_OP VAR VAR VAR BIN_OP VAR VAR VAR RETURN NUMBER IF VAR BIN_OP VAR VAR VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR BIN_OP VAR VAR BIN_OP VAR VAR ASS... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
x, y, a, b = map(int, input().split())
if x > y:
x, y = y, x
if a > b:
a, b = b, a
MAX = x // (a + b)
MIN = 0
MAXX = MAX
MINX = MIN
while MAX > MIN + 1:
mid = (MAX + MIN) // 2
x... | IMPORT ASSIGN VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR ASSIGN VAR VAR VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR BIN_OP VAR BIN_OP VAR VAR ASSIGN VAR NUMBER ASSIGN VAR VAR ASSIGN VAR VAR WHILE VAR BIN_O... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def test():
x, y, a, b = [int(_) for _ in input().split()]
if x > y:
x, y = y, x
if a > b:
a, b = b, a
l, r = 0, 1000000001
while l < r:
flag = False
m = (l + r + 1) // 2
ux, uy = x - m * a, y - m * a
if ux >= 0 and uy >= 0:
if a == b:
... | FUNC_DEF ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR ASSIGN VAR VAR VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR VAR NUMBER NUMBER WHILE VAR VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP BIN_OP BIN_OP VAR VAR NUMBER NUMBER ASSIGN VAR VAR BIN_OP VAR BIN_OP VAR VAR BIN_OP VAR BIN_OP ... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def solve():
x, y, a, b = map(int, input().split())
if a == b:
return min(x // a, y // a)
if a > b:
a, b = b, a
L, H = 0, min(x // a, y // a)
while L < H:
M = L + H + 1 >> 1
v = (x - a * M) // (b - a)
u = (y - a * M) // (b - a)
if v + u < M:
... | FUNC_DEF ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR RETURN FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR VAR NUMBER FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP BIN_OP VAR VAR NUMBER NUMBER ASSIGN VAR BIN_O... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | for _ in range(int(input())):
x, y, a, b = map(int, input().split())
A = min(a, b)
b = max(a, b)
a = A
dif2 = b - a
A = min(x, y)
y = max(x, y)
x = A
cnt = 0
dif1 = y - x
if dif1 > dif2 and dif1 > 0 and dif2 > 0:
cnt += min(x // a, y // b, dif1 // dif2)
x -= a... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR ASSIGN VAR FUNC_CALL VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR BIN_OP VAR VAR ASSIGN VAR FUNC_CALL VAR VAR VAR ASSIGN VAR FUNC_CALL VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR NUMBER... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def solve(x, y, a, b):
x, y = sorted([x, y])
a, b = sorted([a, b])
d1 = y - x
d2 = b - a
d3 = b + a
if d2 == 0:
return x // a
if y * a > x * b:
return x // a
r1 = d1 // d2
x -= r1 * a
y -= r1 * b
r2 = x // d3
x -= r2 * d3
y -= r2 * d3
result = r1 +... | FUNC_DEF ASSIGN VAR VAR FUNC_CALL VAR LIST VAR VAR ASSIGN VAR VAR FUNC_CALL VAR LIST VAR VAR ASSIGN VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR VAR IF VAR NUMBER RETURN BIN_OP VAR VAR IF BIN_OP VAR VAR BIN_OP VAR VAR RETURN BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR VAR VAR BIN_OP VAR VAR VAR BIN_OP VA... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def gift_set(x, y, a, b):
if a == b:
return min(x // a, y // a)
if a > b:
a, b = b, a
diff = b - a
def can_make_gifts(mid):
minx, miny = x - a * mid, y - a * mid
can_make_sets = minx // diff + miny // diff >= mid
return minx >= 0 and miny >= 0 and can_make_sets
... | FUNC_DEF IF VAR VAR RETURN FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR BIN_OP VAR VAR FUNC_DEF ASSIGN VAR VAR BIN_OP VAR BIN_OP VAR VAR BIN_OP VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR VAR RETURN VAR NUMBER VAR NUMBER VAR ASSIGN VAR VAR VAR NUMBER BI... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import sys
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II():
return int(sys.stdin.buffer.readline())
def LI():
return list(map(int, sys.stdin.buffer.readline().split()))
def LI1():
return list(map(int1, sys.stdin.buffer.readline().split()))
def LLI(rows_number):
return [... | IMPORT ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR STRING FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL VAR VAR FUNC_CALL VA... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | for i in range(int(input())):
x, y, a, b = list(map(int, input().split()))
x, y = sorted([x, y])
a, b = sorted([a, b])
c = min(x // a, y // b)
if a == b:
d = x // (a + b)
x -= d * (a + b)
y -= d * (a + b)
c = max(c, 2 * d + min(x // a, y // b))
else:
x0, y... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR FUNC_CALL VAR LIST VAR VAR ASSIGN VAR VAR FUNC_CALL VAR LIST VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR IF VAR VAR ASSIGN VAR BIN_OP VAR BIN_OP VAR VAR VAR ... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | for _ in range(int(input())):
x, y, a, b = map(int, input().split())
if a == b:
print(min(x, y) // a)
continue
if a < b:
b, a = a, b
l, r, ans = 0, (x + y) // (a + b), -1
while l <= r:
m = (l + r) // 2
i = max(0, (a * m - y + a - b - 1) // (a - b))
j =... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR EXPR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR VAR VAR NUMBER BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def f(x, y, a, b):
tmp = x - y
t = a - b
if a == b:
return y // a
if y < tmp // t * b:
return y // b
Res = tmp // t
y -= tmp // t * b
x = y + tmp % t
Res += y // (a + b) * 2
x -= (a + b) * (y // (a + b))
y %= a + b
Res += min(x // a, y // b)
return Res
f... | FUNC_DEF ASSIGN VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR VAR IF VAR VAR RETURN BIN_OP VAR VAR IF VAR BIN_OP BIN_OP VAR VAR VAR RETURN BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR VAR VAR BIN_OP BIN_OP VAR VAR VAR ASSIGN VAR BIN_OP VAR BIN_OP VAR VAR VAR BIN_OP BIN_OP VAR BIN_OP VAR VAR NUMBER VAR BIN_OP BIN_OP VAR VAR BIN_OP V... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import sys
input = sys.stdin.readline
for _ in range(int(input())):
x, y, a, b = map(int, input().split())
if a < b:
a, b = b, a
if x < y:
x, y = y, x
take = min(x // a, y // b)
x -= a * take
y -= b * take
diff = a - b
if not take:
print(0)
continue
a... | IMPORT ASSIGN VAR VAR FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR ASSIGN VAR VAR VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR VAR BIN_OP VAR VAR VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR ... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import sys
input = lambda: sys.stdin.readline().rstrip()
def f(n):
x1, y1 = x - n * a, y - n * b
return n + min(x1 / b, y1 / a)
def ternary_search():
l, r = 0, int(min(x / a, y / b))
while r - l > 3:
m1 = int(l + (r - l) / 3)
m2 = int(r - (r - l) / 3)
if f(m1) < f(m2):
... | IMPORT ASSIGN VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF ASSIGN VAR VAR BIN_OP VAR BIN_OP VAR VAR BIN_OP VAR BIN_OP VAR VAR RETURN BIN_OP VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR FUNC_DEF ASSIGN VAR VAR NUMBER FUNC_CALL VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR WHILE BIN_OP VAR VAR NUMBER ASSIGN VAR FUNC_CALL VA... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | t = int(input())
for _ in range(t):
x, y, a, b = map(int, input().split())
tmp = min((x + y) // (a + b), min(x, y) // min(a, b))
m1 = min(x, y)
m2 = min(a, b)
M1 = max(x, y)
M2 = max(a, b)
if a == b:
print(tmp)
else:
d = (m1 - m2 * tmp) // (M2 - m2)
if M2 * tmp - ... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR ASSIGN VAR FUNC_CALL VAR VAR VAR ASSIGN VAR FUNC_CALL VAR VAR VAR ASSIGN VAR ... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | for i in range(int(input())):
x, y, a, b = map(int, input().split())
if a == b:
print(min(x, y) // a)
continue
if a > b:
a, b = b, a
l = 0
r = 10**10
while l < r:
m = (l + r) // 2
x1 = x - a * m
y1 = y - a * m
if x1 >= 0 and y1 >= 0 and x1 ... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR EXPR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP NUMBER NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER ASSI... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def g(x, y, a, b):
if a == b:
return min(x, y) // a
f = lambda u: max(0, min((x - a * u) // b, (y - b * u) // a))
umax = min(x // a, y // b)
o = max(0, f(0), umax + f(umax))
u_cont = (a * x - b * y) // (a**2 - b**2)
if 0 < u_cont < umax:
o = max(o, u_cont + f(u_cont))
if 0 < ... | FUNC_DEF IF VAR VAR RETURN BIN_OP FUNC_CALL VAR VAR VAR VAR ASSIGN VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR BIN_OP BIN_OP VAR BIN_OP VAR VAR VAR BIN_OP BIN_OP VAR BIN_OP VAR VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR ASSIGN VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR NUMBER BIN_OP VAR FUNC_CALL VAR VAR ASS... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | for _ in range(int(input())):
x, y, a, b = map(int, input().split())
if x > y:
x, y = y, x
if a > b:
a, b = b, a
if y - x <= b - a:
base1 = x // (a + b)
base2 = min((x - base1 * (a + b)) // a, (y - base1 * (a + b)) // b)
print(base1 * 2 + base2)
else:
... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR ASSIGN VAR VAR VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR IF BIN_OP VAR VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR BIN_OP VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_OP BIN_OP VAR BIN_OP VAR BIN_OP VAR VA... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import sys
input = sys.stdin.readline
def solve():
x, y, a, b = map(int, input().split())
if b * b - a * a != 0:
zz = (y * b - x * a) // (b * b - a * a)
if zz >= 0:
x1 = x - a * zz
y1 = y - b * zz
if x1 >= 0 and y1 >= 0:
w = min(x1 // b, y1 ... | IMPORT ASSIGN VAR VAR FUNC_DEF ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR IF VAR NUMBER ASSIGN VAR BIN_OP VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR BIN_OP VAR V... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | for _ in range(int(input())):
x, y, a, b = map(int, input().split())
if a == b:
print(min(x, y) // a)
continue
if a > b:
a, b = b, a
low = 0
high = (x + y) // (a + b) + 1
while high - low > 1:
n = (low + high) // 2
if max(0, (n * b - x - 1) // (b - a) + 1)... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR EXPR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR NUMBER WHILE BIN_OP VAR VAR NUMBER ... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | t = int(input())
for i in range(t):
x, y, a, b = list(map(int, input().split()))
if x > y:
x, y = y, x
if a < b:
a, b = b, a
ans = 0
if a == b:
ans = max(ans, x // a)
print(ans)
elif a * x - y * b <= 0:
ans = max(ans, x // b)
print(ans)
elif a ... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR ASSIGN VAR VAR VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR NUMBER IF VAR VAR ASSIGN VAR FUNC_CALL VAR VAR BIN_OP VAR VAR EXPR FUNC_CALL VAR VAR IF BIN_OP BI... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def solve(x, y, a, b):
x, y = min(x, y), max(x, y)
a, b = min(a, b), max(a, b)
ans1 = x // a
ans2 = y // b
if ans1 <= ans2:
return ans1
max_possible = (x + y) // (a + b)
k = (y - x) // (b - a)
co2 = (max_possible - k) // 2
co1 = (max_possible + k) // 2
max_ans = 0
sto... | FUNC_DEF ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR ASSIGN VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR VAR IF VAR VAR RETURN VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP BIN_O... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | n = int(input())
for _ in range(n):
x, y, a, b = [int(i) for i in input().split()]
if a == b:
print(min(x // a, y // a))
else:
n2 = (y * a - x * b) // (a**2 - b**2)
n1 = (x * a - y * b) // (a**2 - b**2)
if n2 < 0:
print(min(x // a, y // b))
elif n1 < 0:
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP BIN_OP VAR NUMBER BIN_OP VAR NUMBER ASSIGN VAR BIN... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | for _ in range(int(input())):
x, y, a, b = [int(u) for u in input().split()]
a, b = max(a, b), min(a, b)
if a == b:
print(min(x, y) // a)
continue
N_max = (x + y) // (a + b)
N_min = 0
N = 0
while N_max >= N_min:
N = N_min + (N_max - N_min) // 2
n1 = min((x - N... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR IF VAR VAR EXPR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NU... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import sys
input = sys.stdin.readline
def solve():
x, y, a, b = map(int, input().split())
w = min(x // a, y // b)
xx = x - a * w
yy = y - b * w
r = w + min(xx // b, yy // a)
w = min(x // b, y // a)
xx = x - b * w
yy = y - a * w
r = max(r, w + min(xx // a, yy // b))
if b * b - ... | IMPORT ASSIGN VAR VAR FUNC_DEF ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import time
def main():
t = i_input()
for tt in range(t):
x, y, a, b = li_input()
if a == b:
print(min(x, y) // a)
continue
a, b = max(a, b), min(a, b)
l = 0
r = 1 + (x + y) // (a + b)
while r - l > 1:
mid = (r + l) // 2
... | IMPORT FUNC_DEF ASSIGN VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR IF VAR VAR EXPR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR VAR VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP NUMBER BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR WHILE BIN_OP V... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def solve():
x, y, a, b = map(int, input().split())
if a == b:
return min(x, y) // a
if x // b <= y // a and x // a <= y // b:
return max(x // b, x // a)
if x // b >= y // a and x // a >= y // b:
return max(y // a, y // b)
if a < b:
a, b = b, a
d = a * a - b * b
... | FUNC_DEF ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR RETURN BIN_OP FUNC_CALL VAR VAR VAR VAR IF BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR RETURN FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR IF BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR RETURN FUNC_CALL V... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def main():
t = int(input())
INF = float("inf")
for _ in range(t):
x, y, a, b = map(int, input().split())
if a == b:
ans = min(x // a, y // a)
print(ans)
continue
p = (b * y - a * x) / (b * b - a * a)
r = (b * x - a * y) / (b * b - a * a)
... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR STRING FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR EXPR FUNC_CALL VAR VAR ASSIGN VAR BIN_OP BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_O... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def check(x, y, a, b, k):
n = (x - a * k) // (b - a)
if b > a and n >= 0:
m = max(0, k - n)
n = k - m
if m >= 0 and n * a + m * b <= y:
return True
else:
n = (y - b * k) // (a - b)
if n >= 0:
m = max(0, k - n)
n = k - m
... | FUNC_DEF ASSIGN VAR BIN_OP BIN_OP VAR BIN_OP VAR VAR BIN_OP VAR VAR IF VAR VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR NUMBER BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR VAR IF VAR NUMBER BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR VAR RETURN NUMBER ASSIGN VAR BIN_OP BIN_OP VAR BIN_OP VAR VAR BIN_OP VAR VAR IF VAR NUMBER ASSIGN VAR FUNC... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | t = int(input())
for _ in range(t):
x, y, a, b = map(int, input().split())
ans = max(min(x // a, y // b), min(x // b, y // a))
d = 0
if a != b:
d = max(x * a - y * b, x * b - y * a) // abs(b * b - a * a)
for k in range(max(d - 2, 0), d + 2):
A = x - k * a
B = y - k * b
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR ASSIGN VAR NUMBER IF VAR VAR ASSIGN VAR BIN_OP FUNC_CALL VAR BIN_OP BIN_OP VA... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def possible(a, b, x, y, total):
if a == b:
return total * a <= x
if y < a * total:
return False
m = min((y - a * total) // (b - a), total)
return a * m + b * (total - m) <= x
t = int(input())
for _ in range(t):
x, y, a, b = map(int, input().split())
if y < x:
x, y = y,... | FUNC_DEF IF VAR VAR RETURN BIN_OP VAR VAR VAR IF VAR BIN_OP VAR VAR RETURN NUMBER ASSIGN VAR FUNC_CALL VAR BIN_OP BIN_OP VAR BIN_OP VAR VAR BIN_OP VAR VAR VAR RETURN BIN_OP BIN_OP VAR VAR BIN_OP VAR BIN_OP VAR VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR ... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | t = int(input())
for i in range(t):
x, y, p, q = map(int, input().split())
x, y, p, q = max(x, y), min(x, y), max(p, q), min(p, q)
if x / y > p / q:
print(int(y / q))
elif p == q:
print(int(y / q))
else:
ans = int((x - y) / (p - q))
x = x - p * ans
y = y - q *... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR IF BIN_OP VAR VAR BIN_OP VAR VAR EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP VAR VA... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | for _ in range(int(input())):
x, y, a, b = list(map(int, input().split()))
if x > y:
x, y = y, x
if a > b:
a, b = b, a
d, d1, v = y - x, b - a, 0
if d > d1:
q = 10**18
if d1 != 0:
q = d // d1
v1 = min(q, x // a, y // b)
v += v1
x, y... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR ASSIGN VAR VAR VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR VAR VAR BIN_OP VAR VAR BIN_OP VAR VAR NUMBER IF VAR VAR ASSIGN VAR BIN_OP NUMBER NUMBER IF VAR NUMBER ASSIGN VAR... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import sys
input = sys.stdin.readline
def foo(x, y, k, a, b):
if k < 0:
return -1
if k * b > x or k * a > y:
return -1
if (x - k * b) // a >= (y - k * a) // b:
return 1
else:
return -1
def bsearch(l, r, x, y, a, b):
while l < r:
m = (l + r) // 2
i... | IMPORT ASSIGN VAR VAR FUNC_DEF IF VAR NUMBER RETURN NUMBER IF BIN_OP VAR VAR VAR BIN_OP VAR VAR VAR RETURN NUMBER IF BIN_OP BIN_OP VAR BIN_OP VAR VAR VAR BIN_OP BIN_OP VAR BIN_OP VAR VAR VAR RETURN NUMBER RETURN NUMBER FUNC_DEF WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER IF FUNC_CALL VAR VAR VAR VAR VAR VAR N... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | t = int(input())
for _ in range(t):
x, y, a, b = list(map(int, input().split()))
if a == b:
print(min(x, y) // a)
continue
p = (a * x - b * y) / (a**2 - b**2)
q = (b * x - a * y) / (b**2 - a**2)
p = int(p)
q = int(q)
ans = max(min(x // a, y // b), min(x // b, y // a))
for... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR EXPR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR VAR VAR ASSIGN VAR BIN_OP BIN_OP BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP BIN_OP VAR NUMBER BIN_OP VAR NUMBER ASSIGN VAR BIN_... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | for _ in range(int(input())):
x, y, a, b = map(int, input().split())
x, y = min(x, y), max(x, y)
a, b = min(a, b), max(a, b)
if a == b:
print(x // a)
else:
c = b - a
z = y - x
ans = 0
k = min(z // c, x // a)
ans += k
x -= a * k
y -= b *... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR IF VAR VAR EXPR FUNC_CALL VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR VAR ASSIGN VAR BIN_O... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def add_solve(x, y, a, b):
res = 0
alpha, beta = x // (a + b), y // (a + b)
res += 2 * min(alpha, beta)
x = x - min(alpha, beta) * (a + b)
y = y - min(alpha, beta) * (a + b)
if x < y:
x, y = y, x
if y < a:
return res
elif x < b:
return res
elif x >= b and y >=... | FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR VAR BIN_OP VAR BIN_OP VAR VAR BIN_OP VAR BIN_OP VAR VAR VAR BIN_OP NUMBER FUNC_CALL VAR VAR VAR ASSIGN VAR BIN_OP VAR BIN_OP FUNC_CALL VAR VAR VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR BIN_OP FUNC_CALL VAR VAR VAR BIN_OP VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR IF VAR VAR RETURN VA... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | t = int(input())
for zvhsuidhuzisdfhucodfgsdfhdfidi in range(t):
x, y, a, b = map(int, input().split())
cnt = 0
if a > b:
t = a
a = b
b = t
if x > y:
t = x
x = y
y = t
if x // a < y // b:
answer = x // a
else:
answer = y // b
ab... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER IF VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR IF VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR IF BIN_OP VAR VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR VAR A... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | ts = int(input())
for case in range(0, ts):
x, y, a, b = [int(p) for p in input().split()]
if a > b:
a, b = b, a
if a == b:
print(min(x // a, y // b))
continue
res = 0
lo = 1
hi = 1000000000
while lo <= hi:
mid = (lo + hi) // 2
r1 = x - a * mid
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR NUMBER VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR ASSIGN VAR VAR VAR VAR IF VAR VAR EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR VAR ASS... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | for Z in range(int(input())):
x, y, a, b = map(int, input().split())
if a == b:
print(min(y, x) // a)
continue
if x > y:
x, y = y, x
if a > b:
a, b = b, a
ans = 0
awal_diambil = min((y - x) // (b - a), x // a)
y -= awal_diambil * b
x -= awal_diambil * a
... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR EXPR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR IF VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR BIN_OP BIN_OP VAR VAR BIN_OP VA... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | for _ in range(int(input())):
x, y, a, b = map(int, input().split())
if a == b:
print(min(x // a, y // a))
else:
t = abs(x - y)
t2 = abs(a - b)
k1 = t // t2
mi = min(a, b)
ma = max(a, b)
miel = min(x, y)
mael = max(x, y)
res = 0
... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR EXPR FUNC_CALL VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR ASSIGN VAR BIN_OP VAR VAR ASSIGN VAR FUNC_CALL VAR ... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import sys
IS_INTERACTIVE = False
input = input
if not IS_INTERACTIVE:
(*data,) = sys.stdin.read().split("\n")[::-1]
def input():
return data.pop()
def fprint(*args, **kwargs):
print(*args, **kwargs, flush=True)
def eprint(*args, **kwargs):
print(*args, **kwargs, file=sys.stderr)
def get... | IMPORT ASSIGN VAR NUMBER ASSIGN VAR VAR IF VAR ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING NUMBER FUNC_DEF RETURN FUNC_CALL VAR FUNC_DEF EXPR FUNC_CALL VAR VAR VAR NUMBER FUNC_DEF EXPR FUNC_CALL VAR VAR VAR VAR FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR V... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import sys
for _ in range(int(input())):
x, y, a, b = map(int, sys.stdin.readline().split())
if a == b:
print(min(x, y) // a)
continue
ans = 0
x, y = max(x, y), min(x, y)
a, b = max(a, b), min(a, b)
if b * x > a * y:
x = int(a * y / b)
xx = (a * x - b * y) // (a * a ... | IMPORT FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR EXPR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR VAR VAR ASSIGN VAR NUMBER ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR VAR... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")
for _ in range(int(input())):
n, m, x, y = [int(x) for x in input().split()]
if x > y:
x, y = y, x
diff = y - x
if x > min(n, m) or y > max(n, m):
print(0)
continue
start, end = 1, 10**9 + 1
def isvalid(mid)... | IMPORT ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR ASSIGN VAR VAR VAR VAR ASSIGN VAR BIN_OP VAR VAR IF VAR FUNC_CALL VAR VAR VAR VAR FUNC_CALL VAR VAR VAR EXPR FUNC_CALL VAR NUMBER ASSIGN VAR ... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | def Solve():
x, y, a, b = [int(val) for val in input().split()]
if a > b:
t = a
a = b
b = t
if a == b:
ans = min(int(x / a), int(y / a))
print(ans)
return
low = 0
high = int(1000000000.0)
ans = -1
while high >= low:
mid = int((low + hig... | FUNC_DEF ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR IF VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR BIN_OP VAR VAR FUNC_CALL VAR BIN_OP VAR VAR EXPR FUNC_CALL VAR VAR RETURN ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR NUMBER ASSIGN VAR N... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import sys
input = sys.stdin.readline
def judge(c):
if not (x >= c * m and y >= c * m):
return False
return (x - c * m) // (M - m) + (y - c * m) // (M - m) >= c
def binary_search():
l, r = 0, 10**9 + 10
while l <= r:
m = (l + r) // 2
if judge(m):
l = m + 1
... | IMPORT ASSIGN VAR VAR FUNC_DEF IF VAR BIN_OP VAR VAR VAR BIN_OP VAR VAR RETURN NUMBER RETURN BIN_OP BIN_OP BIN_OP VAR BIN_OP VAR VAR BIN_OP VAR VAR BIN_OP BIN_OP VAR BIN_OP VAR VAR BIN_OP VAR VAR VAR FUNC_DEF ASSIGN VAR VAR NUMBER BIN_OP BIN_OP NUMBER NUMBER NUMBER WHILE VAR VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER ... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | cases = int(input())
L = []
for _ in range(cases):
L.append(list(map(int, input().split())))
for i in range(cases):
x, y, a, b = L[i]
c = 0
if a == b:
print(min(x, y) // a)
continue
if a < b:
a, b = b, a
if x < y:
x, y = y, x
while x > y and x > 0 and y > 0:
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR LIST FOR VAR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR VAR VAR ASSIGN VAR NUMBER IF VAR VAR EXPR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR VAR VAR IF VAR VAR ASSIGN VAR VAR ... |
Polycarp has $x$ of red and $y$ of blue candies. Using them, he wants to make gift sets. Each gift set contains either $a$ red candies and $b$ blue candies, or $a$ blue candies and $b$ red candies. Any candy can belong to at most one gift set.
Help Polycarp to find the largest number of gift sets he can create.
For e... | import sys
pl = 1
sys.setrecursionlimit(10**5)
if pl:
input = sys.stdin.readline
else:
sys.stdin = open("input.txt", "r")
sys.stdout = open("outpt.txt", "w")
def li():
return [int(xxx) for xxx in input().split()]
def fi():
return int(input())
def si():
return list(input().rstrip())
def ... | IMPORT ASSIGN VAR NUMBER EXPR FUNC_CALL VAR BIN_OP NUMBER NUMBER IF VAR ASSIGN VAR VAR ASSIGN VAR FUNC_CALL VAR STRING STRING ASSIGN VAR FUNC_CALL VAR STRING STRING FUNC_DEF RETURN FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL FUNC_CALL... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | n = int(input())
arr = sorted(list(map(int, input().split())))
p, res = [], 0
while n >= 2:
if arr[n - 1] - arr[n - 2] <= 1:
p.append(arr[n - 2])
n -= 2
else:
n -= 1
for i in range(0, len(p) - 1, 2):
res += p[i] * p[i + 1]
print(res) | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR LIST NUMBER WHILE VAR NUMBER IF BIN_OP VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER NUMBER EXPR FUNC_CALL VAR VAR BIN_OP VAR NUMBER VAR NUMBER VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | s = input()
lst = [int(i) for i in input().split()]
lst.sort()
lst = lst[::-1]
n = 0
k = 0
while len(lst) >= 2:
if lst[0] == lst[1] or lst[0] == lst[1] + 1:
if k != 0:
n += k * lst[1]
lst.pop(0)
lst.pop(0)
k = 0
else:
k = lst[1]
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE FUNC_CALL VAR VAR NUMBER IF VAR NUMBER VAR NUMBER VAR NUMBER BIN_OP VAR NUMBER NUMBER IF VAR NUMBER VAR BIN_OP VAR VAR NUMBER EXPR FUNC_CALL VAR NUMBER EXP... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | n = int(input())
a = [int(i) for i in input().split()]
g = []
s = 0
a.sort(reverse=True)
i = 0
while i < len(a) - 1:
if a[i] == a[i + 1] or a[i] == a[i + 1] + 1:
g.append(a[i + 1])
del a[i]
del a[i]
else:
del a[i]
g.sort()
if len(g) < 2:
print(0)
elif len(g) % 2 != 0:
del... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR NUMBER EXPR FUNC_CALL VAR NUMBER ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR BIN_OP VAR NUMBER NUMBER EXPR FUNC_CALL VAR VAR BIN_... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | def main():
n = int(input())
L = sorted(map(int, input().split()))
L.reverse()
K = []
i = 1
while i < n:
if L[i - 1] == L[i]:
K.append(L[i])
i += 1
elif L[i - 1] - L[i] == 1:
K.append(L[i])
i += 1
i += 1
ans = 0
for ... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR NUMBER WHILE VAR VAR IF VAR BIN_OP VAR NUMBER VAR VAR EXPR FUNC_CALL VAR VAR VAR VAR NUMBER IF BIN_OP VAR BIN_OP VAR NUMBER VAR VAR NUMBER EXPR FUNC_CALL VAR V... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | n = int(input())
a, b = 0, 0
ans = 0
for i in sorted(map(int, input().split()), reverse=True):
if a == 0 or a > i + 1:
a = i
elif b == 0:
a, b = 0, i
else:
ans += i * b
a, b = 0, 0
print(ans) | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR NUMBER NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR NUMBER IF VAR NUMBER VAR BIN_OP VAR NUMBER ASSIGN VAR VAR IF VAR NUMBER ASSIGN VAR VAR NUMBER VAR VAR BIN_OP VAR VAR ASSIGN VAR VAR NUMBER NUMBER EXPR FUNC_CALL VAR VAR |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | _ = int(input())
as_ = list(sorted(map(int, input().split())))
def get_pair():
while len(as_) >= 2:
s0 = as_.pop()
s1 = as_.pop()
if s0 - 1 == s1 or s0 == s1:
return s1
as_.append(s1)
return None
ans = 0
tb = get_pair()
lr = get_pair()
while not (tb is None or lr ... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF WHILE FUNC_CALL VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR IF BIN_OP VAR NUMBER VAR VAR VAR RETURN VAR EXPR FUNC_CALL VAR VAR RETURN NONE ASSIGN VAR NUMBER ASSIGN VAR FU... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | n = int(input())
lst = [*map(int, input().split())]
lst = [*reversed(sorted(lst))]
count, res = 1, []
ex = res.extend
for i, x in enumerate(lst[1:]):
if lst[i] == x:
count += 1
else:
div, mod = count // 2, count % 2
ex([lst[i]] * div)
count = 1
if mod == 1 and lst[i] - x ... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR LIST FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST FUNC_CALL VAR FUNC_CALL VAR VAR ASSIGN VAR VAR NUMBER LIST ASSIGN VAR VAR FOR VAR VAR FUNC_CALL VAR VAR NUMBER IF VAR VAR VAR VAR NUMBER ASSIGN VAR VAR BIN_OP VAR NUMBER BIN_OP VAR NUMBER EXPR FUNC_CALL VAR ... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | def main():
n = int(input())
l = [int(i) for i in input().split()]
l.sort()
l.reverse()
candidate = []
i = 1
while i < n:
if l[i - 1] - l[i] <= 1:
candidate.append(min(l[i - 1], l[i]))
i += 2
else:
i += 1
area = 0
for i in range(1, ... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR NUMBER WHILE VAR VAR IF BIN_OP VAR BIN_OP VAR NUMBER VAR VAR NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR VAR BIN_OP VAR NUMBER VAR VAR VAR NUMBER VAR NUMB... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | n, v, ps, pp = int(input()), 0, 0, 0
for l in sorted(map(int, input().split()), reverse=True):
if ps == 0 or ps > l + 1:
ps = l
elif pp == 0:
pp, ps = l, 0
else:
v, pp, ps = v + pp * l, 0, 0
print(v) | ASSIGN VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR NUMBER NUMBER NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR NUMBER IF VAR NUMBER VAR BIN_OP VAR NUMBER ASSIGN VAR VAR IF VAR NUMBER ASSIGN VAR VAR VAR NUMBER ASSIGN VAR VAR VAR BIN_OP VAR BIN_OP VAR VAR NUMBER NUMBER EXPR FUNC_CALL VAR VAR |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | n = int(input())
a = sorted(int(x) for x in input().split())
p = []
ans = 0
while n >= 2:
if a[n - 1] - a[n - 2] <= 1:
p.append(a[n - 2])
n -= 2
else:
n -= 1
n = len(p)
for x, y in zip(p[::2], p[1::2]):
ans += x * y
print(ans) | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR NUMBER WHILE VAR NUMBER IF BIN_OP VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER NUMBER EXPR FUNC_CALL VAR VAR BIN_OP VAR NUMBER VAR NUMBER VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR FOR VA... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | arr = [0] * (10**6 + 1)
n = int(input())
for i in input().split():
arr[int(i)] += 1
i = 10**6
j = i
k = i
c = 0
while j > 0:
if arr[j] % 2 == 1 and (arr[j] > 1 or c == 0):
arr[j - 1] += 1
c = 1
else:
c = 0
j -= 1
r = 0
while i > 0 and k > 0:
if arr[i] < 2:
if i == k:
... | ASSIGN VAR BIN_OP LIST NUMBER BIN_OP BIN_OP NUMBER NUMBER NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL FUNC_CALL VAR VAR FUNC_CALL VAR VAR NUMBER ASSIGN VAR BIN_OP NUMBER NUMBER ASSIGN VAR VAR ASSIGN VAR VAR ASSIGN VAR NUMBER WHILE VAR NUMBER IF BIN_OP VAR VAR NUMBER NUMBER VAR VAR NUMBER VAR NUMBER ... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | from sys import stdin
number_of_sticks = int(stdin.readline().rstrip("\n"))
second_line = stdin.readline().rstrip("\n")
sticks = [int(x) for x in second_line.split(" ")]
def execute(number_of_sticks, sticks):
max = 0
if number_of_sticks < 4:
return max
else:
sticks.sort()
sticks.r... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR STRING FUNC_DEF ASSIGN VAR NUMBER IF VAR NUMBER RETURN VAR EXPR FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF BIN_OP VAR ... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | n = int(input())
maxn = 10**6 + 2
cnt = [0] * maxn
for x in map(int, input().split()):
cnt[x] += 1
ansv = []
for i in range(maxn - 2, 1, -1):
ansv += [i] * (cnt[i] + (cnt[i + 1] & 1) >> 1)
if cnt[i] > 0:
cnt[i] += cnt[i + 1] & 1
ans = 0
for i in range(1, len(ansv), 2):
ans += ansv[i] * ansv[i - ... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR BIN_OP BIN_OP NUMBER NUMBER NUMBER ASSIGN VAR BIN_OP LIST NUMBER VAR FOR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR VAR VAR NUMBER ASSIGN VAR LIST FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER VAR BIN_OP LIST VAR BIN_OP BIN_OP VAR VAR BIN_OP VAR BIN_OP VAR NU... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | n = int(input())
l = [int(x) for x in input().split()]
l.sort()
l2 = [0] * n
prev = l[0]
count = 1
k = 0
for i in range(1, n):
if l[i] != prev:
l2[k] = [prev, count]
k += 1
prev = l[i]
count = 1
else:
count += 1
l2[k] = [prev, count]
k += 1
for i in range(k - 1, 0, -1):
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER VAR ASSIGN VAR VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR IF VAR VAR VAR ASSIGN VAR VAR LIST VAR VAR VAR NUMBER ASSIGN VAR VAR VAR ASSIGN ... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | n, l = int(input()), list(map(int, input().split()))
l.sort(reverse=True)
ans = 0
size = []
i = 0
while i < n - 1:
if l[i] - l[i + 1] <= 1:
size.append(l[i + 1])
i += 2
else:
i += 1
for index in range(len(size) // 2):
ans += size[2 * index] * size[2 * index + 1]
print(ans) | ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR LIST ASSIGN VAR NUMBER WHILE VAR BIN_OP VAR NUMBER IF BIN_OP VAR VAR VAR BIN_OP VAR NUMBER NUMBER EXPR FUNC_CALL VAR VAR BIN_OP VAR NUMBER VAR NUMBER VAR NUMBER FOR V... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | n = int(input())
l = list(map(int, input().split()))
l.sort(reverse=True)
rect = []
i = 0
while i < n:
if i + 1 < n and l[i] == l[i + 1]:
rect.append(l[i])
i += 2
elif i + 1 < n and l[i] - 1 == l[i + 1]:
rect.append(l[i + 1])
i += 2
else:
i += 1
s = 0
for i in range(0... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR NUMBER ASSIGN VAR LIST ASSIGN VAR NUMBER WHILE VAR VAR IF BIN_OP VAR NUMBER VAR VAR VAR VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR VAR VAR VAR NUMBER IF BIN_OP VAR NUMBER VAR BIN_OP VAR VAR NUMBER ... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | n = int(input())
sticks = list(map(int, input().split()))
length = [0] * 1000000
miv = 1000000
mav = 0
answ = 0
for i in range(len(sticks)):
length[sticks[i] - 1] = length[sticks[i] - 1] + 1
if sticks[i] - 1 > mav:
mav = sticks[i] - 1
if sticks[i] - 1 < miv:
miv = sticks[i] - 1
length = leng... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR ASSIGN VAR BIN_OP VAR VAR NUMBER BIN_OP VAR BIN_OP VAR VAR NUMBER NUMBER IF BIN_OP ... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | I = lambda: map(int, input().split())
n = int(input())
p = list(I())
cnt = [0] * 1000001
for i in p:
cnt[i] += 1
for i in range(1000000, 1, -1):
if cnt[i] % 2 == 1 and cnt[i - 1] > 0:
cnt[i] -= 1
cnt[i - 1] += 1
elif cnt[i] % 2 == 1 and cnt[i - 1] == 0:
cnt[i] -= 1
p = 0
ans = 0
for ... | ASSIGN VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER NUMBER FOR VAR VAR VAR VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER NUMBER NUMBER IF BIN_OP VAR VAR NUMBER NUMBER VAR BIN_OP VAR NUMBER NUMBER VAR VAR NUMBER VAR BI... |
In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of n sticks and an instrument. Each stick is characterized by its length l_{i}.
Ilya decided to make a rectangle from the sticks. And due to his whim, he decided to make rectangles in such a way that m... | from sys import stdin
n = int(input())
num = list(map(int, stdin.readline().split()))
def solve(n, num):
nmax = 1000003
cur = nmax * [0]
pt = []
res = 0
for x in range(len(num)):
cur[num[x]] += 1
for i in range(nmax - 3, 1, -1):
for j in range((cur[i + 1] % 2 + cur[i]) // 2):
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR LIST NUMBER ASSIGN VAR LIST ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR VAR VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER FOR VA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.