description stringlengths 171 4k | code stringlengths 94 3.98k | normalized_code stringlengths 57 4.99k |
|---|---|---|
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
l = [0] * (n + 2)
for i in [int(x) for x in input().split()]:
l[i] += 1
a = l.copy()
i = 1
while i < n + 1:
if a[i] == 1:
if a[i - 1] == 0:
a[i - 1] = 1
a[i] = 0
i += 1
elif a[i] == 0:
i += 1
elif a[i] == 2:
if a[i - 1] == 0:
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER FOR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER WHILE VAR BIN_OP VAR NUMBER IF VAR VAR NUMBER IF VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR BIN_OP VAR NUMBER NUMBER ASSIGN ... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | from sys import stdin, stdout
n = int(stdin.readline().strip())
friends = list(map(int, stdin.readline().split()))
friends.sort()
groups = []
occ_max, occ_min = 0, 0
start, end, possible_occ, count = friends[0], friends[0], 0, 0
prevsingle = None
occ = set()
for f in friends:
if f > end + 1:
if possible_oc... | ASSIGN VAR FUNC_CALL 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 LIST ASSIGN VAR VAR NUMBER NUMBER ASSIGN VAR VAR VAR VAR VAR NUMBER VAR NUMBER NUMBER NUMBER ASSIGN VAR NONE ASSIGN VAR FUNC_CALL VAR FOR VAR VAR IF VAR BIN_OP VAR NUMBER IF ... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
a = list(map(int, input().split()))
a.sort()
done = {}
count = 0
for i in range(n):
if a[i] - 1 not in done:
done[a[i] - 1] = 1
count += 1
elif a[i] not in done:
done[a[i]] = 1
count += 1
elif a[i] + 1 not in done:
done[a[i] + 1] = 1
count += ... | 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 DICT ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR IF BIN_OP VAR VAR NUMBER VAR ASSIGN VAR BIN_OP VAR VAR NUMBER NUMBER VAR NUMBER IF VAR VAR VAR ASSIGN VAR VAR VAR NUMBER VAR NUMBER IF ... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | import sys
input = sys.stdin.buffer.readline
n = int(input())
a = list(map(int, input().split()))
cnt = [0] * (n + 2)
vis1 = [0] * (n + 2)
vis2 = [0] * (n + 2)
for i in a:
cnt[i] += 1
mn, mx = 0, 0
for i in range(1, n + 1):
if cnt[i] == 0:
continue
if vis1[i - 1] == 0 and vis1[i] == 0:
vis1... | IMPORT ASSIGN VAR VAR 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 BIN_OP VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER FOR VAR VAR VAR VAR NUMBER ASSIGN VAR VAR NUMBER... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | import sys
def main():
n = int(input())
a = readIntArr()
a.sort()
minAns = 0
latest = -1
for x in a:
if x - latest > 1:
minAns += 1
latest = x + 1
maxAnsDistribution = [(False) for _ in range(n + 2)]
for x in a:
if maxAnsDistribution[x - 1] == Fa... | IMPORT FUNC_DEF ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR VAR IF BIN_OP VAR VAR NUMBER VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER VAR FUNC_CALL VAR BIN_OP VAR NUMBER FOR VAR VAR IF VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
l = list(map(int, input().split(" ")))
l.sort()
lonly = set(l)
lonly = list(lonly)
lonly.sort()
i = 0
lenonly = len(lonly)
res1 = 0
while i < lenonly:
if i - 1 >= 0 and lonly[i] - lonly[i - 1] == 1:
lonly[i] = lonly[i - 1]
elif i + 1 < lenonly:
dif = lonly[i + 1] - lonly[i]
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR STRING EXPR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER WHILE VAR VAR IF BIN_OP VAR NUMBER NUMBER BIN_... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | import sys
def minp():
return sys.stdin.readline().strip()
def mint():
return int(minp())
def mints():
return list(map(int, minp().split()))
def solve():
n = mint()
x = list(mints())
x.sort()
r = 0
w = [0] * (n + 2)
c = [0] * (n + 2)
for i in x:
c[i] += 1
... | IMPORT FUNC_DEF RETURN FUNC_CALL FUNC_CALL VAR 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 ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
a = {}
b = {}
for i in range(n + 1):
a[i] = 0
b[i] = 0
b[n + 1] = 0
for i in input().split():
i = int(i)
a[i] += 1
b[i] += 1
klx = 0
kln = 0
pr = 1
for i in range(1, n + 1):
if a[i - 1] + a[i] > 0:
klx += 1
if a[i - 1] == 0:
a[i] -= 1
elif a[i... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR DICT ASSIGN VAR DICT FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR VAR NUMBER ASSIGN VAR VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER NUMBER FOR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR VAR NUMBER VAR VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER AS... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | q = int(input())
w = list(map(int, input().split()))
e = [0] * (q + 3)
for i in w:
e[i] += 1
r = e.copy()
for i in range(1, q + 3):
if e[i] != 0:
e[i + 2] = 0
e[i + 1] = 0
for i in range(1, q + 3):
if r[i] > 0:
if r[i - 1] == 0:
r[i] -= 1
r[i - 1] = 1
if r... | 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 BIN_OP VAR NUMBER FOR VAR VAR VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR NUMBER BIN_OP VAR NUMBER IF VAR VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR BI... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | q = 1
for _ in range(q):
n = int(input())
v = list(map(int, input().split()))
v.sort()
a = [0] * 200002
b = [0] * 200002
for i in range(n):
if a[v[i] - 1] == 0:
a[v[i] - 1] = 1
elif a[v[i]] == 0:
a[v[i]] = 1
elif a[v[i] + 1] == 0:
a[v[i... | ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR 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 BIN_OP LIST NUMBER NUMBER ASSIGN VAR BIN_OP LIST NUMBER NUMBER FOR VAR FUNC_CALL VAR VAR IF VAR BIN_OP VAR VAR NUMBER NUMBER ASSIGN VAR BIN_... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
A = list(map(int, input().split()))
mp = {}
us = set()
A.sort()
for a in A:
if a in mp:
mp[a] += 1
else:
mp[a] = 1
ans = [0, 0]
p1 = 0
for a in A:
if a > p1:
ans[0] += 1
p1 = a + 2
for i in range(-1, 2):
if mp[a] > 0 and a + i not in us:
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR DICT ASSIGN VAR FUNC_CALL VAR EXPR FUNC_CALL VAR FOR VAR VAR IF VAR VAR VAR VAR NUMBER ASSIGN VAR VAR NUMBER ASSIGN VAR LIST NUMBER NUMBER ASSIGN VAR NUMBER FOR VAR VAR IF VAR VAR VAR NUMBER NUMBER ASSIG... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
arr = list(map(int, input().split()))
vis = [0] * (n + 2)
frec = [0] * (n + 2)
for x in arr:
frec[x] += 1
arr.sort()
mx = 0
for x in arr:
if vis[x - 1] == 0:
mx += 1
vis[x - 1] = 1
elif vis[x] == 0:
mx += 1
vis[x] = 1
elif vis[x + 1] == 0:
mx += 1... | 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 BIN_OP VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER FOR VAR VAR VAR VAR NUMBER EXPR FUNC_CALL VAR ASSIGN VAR NUMBER FOR VAR VAR IF VAR BIN_OP VAR NUMBER NUMBER VAR NUMBER... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | import sys
input = sys.stdin.readline
n = int(input())
A = list(map(int, input().split()))
A.sort()
B = {A[0] - 1}
C = {A[0] + 1}
for i in range(1, n):
if A[i] - 1 in B and A[i] in B:
B.add(A[i] + 1)
elif A[i] - 1 in B:
B.add(A[i])
else:
B.add(A[i] - 1)
if A[i] - 1 in C or A[i] ... | IMPORT ASSIGN VAR VAR 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 BIN_OP VAR NUMBER NUMBER ASSIGN VAR BIN_OP VAR NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR IF BIN_OP VAR VAR NUMBER VAR VAR VAR VAR EXPR FUNC_CALL VAR BIN_OP V... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int, input().split()))
A.sort()
max_occupied = [False] * (N + 3)
min_occupied = [False] * (N + 3)
a1 = 0
a2 = 0
for a in A:
need = True
for n in [a - 1, a, a + 1]:
if not max_occupied[n]:
max_occupied[n] = True
... | IMPORT ASSIGN VAR VAR 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 BIN_OP LIST NUMBER BIN_OP VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR VAR ASSIGN VAR NUMBER FOR VAR LIS... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | q = 1
for _ in range(q):
n = int(input())
l = list(map(int, input().split()))
a = l
arr = [0] * (2 * 10**5 + 1)
for i in range(n):
arr[l[i]] += 1
i = 1
while i < 2 * 10**5:
if arr[i] == 1:
if arr[i - 1] == 0:
arr[i - 1] = 1
arr[i] =... | ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR ASSIGN VAR BIN_OP LIST NUMBER BIN_OP BIN_OP NUMBER BIN_OP NUMBER NUMBER NUMBER FOR VAR FUNC_CALL VAR VAR VAR VAR VAR NUMBER ASSIGN VAR NUMBER WHILE VAR BIN... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
arr = [int(z) for z in input().split()]
ppl = [0] * (n + 2)
mintaken = [False] * (n + 2)
maxtaken = [False] * (n + 2)
for i in arr:
ppl[i] += 1
minimum, maximum = 0, 0
for i in range(1, n + 1):
if ppl[i] > 0:
if mintaken[i - 1] == False and mintaken[i] == False:
minimum += 1... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER FOR VAR VAR VAR VAR NUMBER ASSIGN VAR VAR NUMBER NUMBER FOR VAR FUNC_CALL VAR NU... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
l = list(map(int, input().split()))
l1 = [0] * n
for i in range(n):
l1[i] = l[i]
l.sort()
l1 = list(set(l1))
l1.sort()
ans1 = 0
tem = l1[0]
for i in range(len(l1)):
if l1[i] - tem > 2:
ans1 -= -1
tem = l1[i]
ans1 -= -1
for i in range(n):
if i - 1 >= 0:
if l[i] - 1 !=... | 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 VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR EXPR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR VAR NUMBER FOR VAR FU... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
f = list(map(int, input().split()))
f.sort()
f1 = []
for i in range(n):
f1.append(f[i])
if f1[0] > 0:
f1[0] -= 1
for i in range(1, n):
if f1[i] - f1[i - 1] > 1:
f1[i] -= 1
elif f1[i] == f1[i - 1]:
if i == n - 1 or f1[i + 1] > f1[i]:
f1[i] += 1
for i in range(... | 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 FOR VAR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR VAR VAR IF VAR NUMBER NUMBER VAR NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR IF BIN_OP VAR VAR VAR BIN_OP VAR NUMBER NUMBER VAR VAR... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
m = list(map(int, input().split()))
countMin = 0
houses = [0] * (n + 2)
for h in m:
houses[h] = houses[h] + 1
h = 1
while h < n + 1:
if houses[h] >= 1:
countMin = countMin + 1
h = h + 3
else:
h = h + 1
countMax = 0
p1 = 0
p2 = 0
presentCount = 0
for h in range(1, len... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER FOR VAR VAR ASSIGN VAR VAR BIN_OP VAR VAR NUMBER ASSIGN VAR NUMBER WHILE VAR BIN_OP VAR NUMBER IF VAR VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
a = [int(x) for x in input().split()]
xs = [0] * (n + 2)
for i in range(n):
xs[a[i]] += 1
min_dp = []
max_dp = []
for _ in range(n + 2):
min_dp.append([([0] * 2) for __ in range(2)])
max_dp.append([([0] * 2) for __ in range(2)])
min_dp[0][0][0] = 0
min_dp[0][1][0] = 100000000
min_dp[0][0][1... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER FOR VAR FUNC_CALL VAR VAR VAR VAR VAR NUMBER ASSIGN VAR LIST ASSIGN VAR LIST FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR BIN_OP LIST NUMBER NUMBER VAR FUNC_CALL ... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | N = int(input())
arr = [int(x) for x in input().split(" ")]
arr.sort()
MAX = 0
taken = None
for i in arr:
if taken == None:
taken = i - 1
MAX += 1
elif taken < i - 1:
taken = i - 1
MAX += 1
elif taken == i - 1:
taken = i
MAX += 1
elif taken == i:
t... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR STRING EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NONE FOR VAR VAR IF VAR NONE ASSIGN VAR BIN_OP VAR NUMBER VAR NUMBER IF VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER VAR NUMBER IF VAR BIN_OP VAR NUMBER ASSIGN VAR... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
l = list(map(int, input().split()))
l.sort()
s = set()
s1 = set()
ans = 0
for i in range(n):
if l[i] - 1 in s:
continue
elif l[i] in s:
continue
elif l[i] + 1 in s:
continue
else:
ans += 1
s.add(l[i] + 1)
ans1 = 0
for i in range(n):
if l[i] - ... | 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 FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR IF BIN_OP VAR VAR NUMBER VAR IF VAR VAR VAR IF BIN_OP VAR VAR NUMBER VAR VAR NUMBER EXPR FUNC_CALL VA... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
l = [int(i) for i in input().split()]
mp = dict()
ma = 0
l.sort()
for i in range(n):
if not mp.get(l[i] - 1):
mp[l[i] - 1] = 1
ma += 1
elif not mp.get(l[i]):
mp[l[i]] = 1
ma += 1
elif not mp.get(l[i] + 1):
mp[l[i] + 1] = 1
ma += 1
mp1 = dict()... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER EXPR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR IF FUNC_CALL VAR BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP VAR VAR NUMBER NUMBER VAR NUMBER IF FUNC_CALL VAR VAR VAR ASSIGN VAR VAR VAR NU... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
a = list(map(int, input().split()))
b = a
h = [0] * 200005
a.sort()
min = 1
a = list(set(a))
a[0] += 1
for i in range(1, len(a)):
if a[i] == a[i - 1]:
a[i] = a[i - 1]
elif a[i] - 1 == a[i - 1]:
a[i] = a[i - 1]
else:
min += 1
a[i] += 1
b.sort()
h[b[0] - 1] += ... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR ASSIGN VAR BIN_OP LIST NUMBER NUMBER EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR VAR IF VAR VAR VAR BI... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
b = list(map(int, input().split()))
visit = [(0) for i in range(n + 2)]
for i in range(n):
visit[b[i]] += 1
mini = 0
i = 0
while i <= n:
if visit[i] > 0:
i += 2
mini += 1
i += 1
maxi = 0
add = 0
pre = 0
a = []
sol = 0
for i in range(1, n + 2):
if visit[i] == 0:
i... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER VAR FUNC_CALL VAR BIN_OP VAR NUMBER FOR VAR FUNC_CALL VAR VAR VAR VAR VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR VAR IF VAR VAR NUMBER VAR NUMBER VAR NUMBER VAR NUMBER ASSIGN VAR NUM... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
d = {}
a = list(map(int, input().split()))
a.sort()
for i in a:
d[i] = d.get(i, 0) + 1
b = list(d.keys())
b.sort()
ind = b[0]
mi = 0
i = ind
while i < n + 1:
if i in d:
mi += 1
i += 2
i += 1
ma = [0] * (n + 2)
for i in b:
if d[i] == 1:
if ma[i - 1] == 0:
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR DICT ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR FOR VAR VAR ASSIGN VAR VAR BIN_OP FUNC_CALL VAR VAR NUMBER NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR EXPR FUNC_CALL VAR ASSIGN VAR VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR VAR ... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
x = [int(x) for x in input().split()]
x.sort()
st = set(x)
st2 = set()
for i in st:
st2.add(i - 1)
st2.add(i + 1)
st2.add(i)
ans = []
for i in x:
if i - 1 in st2:
ans.append(i - 1)
st2.remove(i - 1)
elif i in st2:
ans.append(i)
st2.remove(i)
elif ... | 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 FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FOR VAR VAR EXPR FUNC_CALL VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR VAR ASSIGN VAR LIST FOR VAR VAR IF BIN_OP VAR ... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | import sys
input = sys.stdin.readline
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
d = {}
for i in range(n):
if a[i] - 1 not in d:
if a[i] not in d:
d[a[i] + 1] = 1
else:
d[a[i]] = 1
else:
d[a[i] - 1] = 1
mini = len(d)
d = {}
for i in range(len... | IMPORT ASSIGN VAR VAR 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 DICT FOR VAR FUNC_CALL VAR VAR IF BIN_OP VAR VAR NUMBER VAR IF VAR VAR VAR ASSIGN VAR BIN_OP VAR VAR NUMBER NUMBER ASSIGN VAR VAR VAR NUMBER ASSIGN VAR BIN_OP VAR VAR NUMBE... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
X = [0] * (n + 2)
Y = [0] * (n + 2)
xx = [int(x) for x in input().strip().split()]
for a in xx:
X[a] += 1
Y[a + 1] += 1
for i in range(n):
if Y[i] == 0:
if Y[i + 1] > 0:
Y[i + 1] -= 1
Y[i] = 1
elif Y[i + 2] > 0:
Y[i + 2] -= 1
Y... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR FOR VAR VAR VAR VAR NUMBER VAR BIN_OP VAR NUMBER NUMBER FOR VAR FUNC_CALL VAR VAR IF VAR VAR NUMBER IF VAR BIN_OP VAR ... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | import sys
input = sys.stdin.readline
n = int(input())
x = list(map(int, input().split()))
y = [0] * (n + 5)
for i in x:
y[i] += 1
ans1 = 0
r = -1
for i in range(n + 5):
if i <= r:
continue
if y[i]:
r = i + 2
ans1 += 1
ans2 = 0
cnt, l = 0, 0
f, s = 0, -1
for i in range(n + 5):
i... | IMPORT ASSIGN VAR VAR 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 BIN_OP VAR NUMBER FOR VAR VAR VAR VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER IF VAR VAR IF VAR VAR ASSIGN VAR BIN_OP V... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
x, y, ansn, ansx, next = [0] * 200002, [0] * 200002, 0, 0, 0
p = list(map(int, input().split()))
for i in range(n):
x[p[i]] += 1
for i in range(1, n + 2):
if x[i - 1] > 0 and i >= next:
ansn += 1
next = i + 3
if x[i] > 0:
for i2 in range(min(x[i], 3)):
if... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR VAR BIN_OP LIST NUMBER NUMBER BIN_OP LIST NUMBER NUMBER NUMBER NUMBER NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR VAR VAR VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP VAR NUMBER IF VAR BIN_OP VAR NUMB... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
a = list(map(int, input().split()))
mp = {}
mp2 = {}
a.sort()
for i in a:
if i - 1 not in mp:
mp[i - 1] = 1
elif i not in mp:
mp[i] = 1
elif i + 1 not in mp:
mp[i + 1] = 1
if i - 1 not in mp2 and i not in mp2 and i + 1 not in mp2:
mp2[i + 1] = 1
print(sum... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR DICT ASSIGN VAR DICT EXPR FUNC_CALL VAR FOR VAR VAR IF BIN_OP VAR NUMBER VAR ASSIGN VAR BIN_OP VAR NUMBER NUMBER IF VAR VAR ASSIGN VAR VAR NUMBER IF BIN_OP VAR NUMBER VAR ASSIGN VAR BIN_OP VAR NUMBER NUM... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | n = int(input())
x = list(map(int, input().split()))
x.sort()
y = []
for i in range(n):
if i == 0 or x[i - 1] != x[i]:
y.append(x[i])
yend = [True] * len(y)
ansmin = len(y)
for i in range(len(y)):
if i == 0 or not yend[i]:
continue
if y[i - 1] + 1 == y[i] and yend[i - 1]:
yend[i - 1]... | 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 FOR VAR FUNC_CALL VAR VAR IF VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR EXPR FUNC_CALL VAR VAR VAR ASSIGN VAR BIN_OP LIST NUMBER FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR FOR V... |
Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...
$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with an integer coordinate $x_i$. The $i$-th friend can come celebrate the New Year to the house with coo... | import sys
n = int(sys.stdin.readline())
list_num = list(map(int, sys.stdin.readline().split()))
list_num.sort()
res = [0, 0]
list_check = [0] * (n + 2)
for num in list_num:
if not list_check[num - 1]:
list_check[num - 1] += 1
res[1] += 1
elif not list_check[num]:
list_check[num] += 1
... | IMPORT 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 NUMBER NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER FOR VAR VAR IF VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER NUMBER VAR NUMBER NUMBER IF VAR VAR VAR VAR NUMBER ... |
This is the easy version of this problem. The difference between easy and hard versions is only the constraints on $a_i$ and on $n$. You can make hacks only if both versions of the problem are solved.
Burenka is the crown princess of Buryatia, and soon she will become the $n$-th queen of the country. There is an ancie... | for _ in range(int(input())):
n = int(input())
a = list(map(int, input().split()))
t = 0
partial_xor = []
for i in range(0, n):
if a[i] == 0:
t += len(partial_xor)
partial_xor = []
continue
partial_xor = list(map(lambda x: x ^ a[i], partial_xor))
... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR LIST FOR VAR FUNC_CALL VAR NUMBER VAR IF VAR VAR NUMBER VAR FUNC_CALL VAR VAR ASSIGN VAR LIST ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR BI... |
This is the easy version of this problem. The difference between easy and hard versions is only the constraints on $a_i$ and on $n$. You can make hacks only if both versions of the problem are solved.
Burenka is the crown princess of Buryatia, and soon she will become the $n$-th queen of the country. There is an ancie... | def solve():
n = int(input())
lst = list(map(int, input().split()))
s = set()
s.add(0)
a = 0
c = 0
for i in lst:
a = a ^ i
if a in s:
s = {a}
else:
c += 1
s.add(a)
print(c)
for _ in range(int(input())):
solve() | FUNC_DEF ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR EXPR FUNC_CALL VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR VAR ASSIGN VAR BIN_OP VAR VAR IF VAR VAR ASSIGN VAR VAR VAR NUMBER EXPR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR V... |
Fox Ciel is playing a card game with her friend Jiro.
Jiro has n cards, each one has two attributes: position (Attack or Defense) and strength. Fox Ciel has m cards, each one has these two attributes too. It's known that position of all Ciel's cards is Attack.
Now is Ciel's battle phase, Ciel can do the following ope... | n, m = map(int, input().split())
a, d = [], []
for i in range(n):
t, val = input().split()
(a if t == "ATK" else d).append(int(val))
my = sorted([int(input()) for i in range(m)])
a.sort()
d.sort()
def solve1():
ret = 0
used = [False] * m
for val in d:
for i in range(m):
if not ... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR LIST LIST FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR STRING VAR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR EXPR FUNC_CALL VAR FUNC_DEF... |
Fox Ciel is playing a card game with her friend Jiro.
Jiro has n cards, each one has two attributes: position (Attack or Defense) and strength. Fox Ciel has m cards, each one has these two attributes too. It's known that position of all Ciel's cards is Attack.
Now is Ciel's battle phase, Ciel can do the following ope... | n, m = map(int, input().split())
a, d = [1000000000.0], [1000000000.0]
for x in range(n):
p, s = input().split()
[d, a][p < "B"].append(int(s))
v = [int(input()) for y in range(m)]
for q in [a, d, v]:
q.sort()
s = sum(v)
i = j = 0
for t in v:
if t > d[i]:
s, i = s - t, i + 1
elif t >= a[j]:
... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR LIST NUMBER LIST NUMBER FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL LIST VAR VAR VAR STRING FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR FOR VAR LIST VAR VAR VAR EXPR FUNC_CALL V... |
Fox Ciel is playing a card game with her friend Jiro.
Jiro has n cards, each one has two attributes: position (Attack or Defense) and strength. Fox Ciel has m cards, each one has these two attributes too. It's known that position of all Ciel's cards is Attack.
Now is Ciel's battle phase, Ciel can do the following ope... | def avoiddef(a, b):
b.reverse()
x = 0
i = 0
n = min(len(a), len(b))
while i < n and b[i] > a[i]:
x += b[i] - a[i]
i += 1
return x
def killdefs(d, a, b):
i = 0
n = len(b)
b2 = [bb for bb in b]
for dd in d:
while i < n and b2[i] <= dd:
i += 1
... | FUNC_DEF EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR WHILE VAR VAR VAR VAR VAR VAR VAR BIN_OP VAR VAR VAR VAR VAR NUMBER RETURN VAR FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR FOR VAR VAR WHILE VAR VAR VAR VAR VAR... |
Fox Ciel is playing a card game with her friend Jiro.
Jiro has n cards, each one has two attributes: position (Attack or Defense) and strength. Fox Ciel has m cards, each one has these two attributes too. It's known that position of all Ciel's cards is Attack.
Now is Ciel's battle phase, Ciel can do the following ope... | n, m = map(int, input().split())
u = [[], []]
for q in range(n):
p, s = input().split()
u[p == "ATK"].append(int(s))
d, a = [sorted(q) for q in u]
v = sorted(int(input()) for q in range(m))
k, s = 0, sum(v)
i = j = 0
for q in v:
if i < len(d) and q > d[i]:
s -= q
i += 1
elif j < len(a) a... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST LIST LIST FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR FUNC_CALL FUNC_CALL VAR EXPR FUNC_CALL VAR VAR STRING FUNC_CALL VAR VAR ASSIGN VAR VAR FUNC_CALL VAR VAR VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR ASSIGN V... |
This is the hard version of this problem. In this version, $n \le 5000$ holds, and this version has no restriction between $x$ and $y$. You can make hacks only if both versions of the problem are solved.
You are given two binary strings $a$ and $b$, both of length $n$. You can do the following operation any number of ... | import sys
def read(f):
n, x, y = map(int, f.readline().split())
a = f.readline().strip()
b = f.readline().strip()
zs = [i for i, (c, d) in enumerate(zip(a, b)) if c != d]
return zs, x, y
def solve():
zs, x, y = read(sys.stdin)
if len(zs) % 2 != 0:
print(-1)
return
if... | IMPORT FUNC_DEF ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR VAR VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR VAR VAR RETURN VAR VAR VAR FUNC_DEF ASSIGN VAR VAR VAR FUNC_CALL VAR VAR IF BIN_OP FUNC_CALL VAR VAR NUMBER NU... |
This is the hard version of this problem. In this version, $n \le 5000$ holds, and this version has no restriction between $x$ and $y$. You can make hacks only if both versions of the problem are solved.
You are given two binary strings $a$ and $b$, both of length $n$. You can do the following operation any number of ... | import sys
input = sys.stdin.readline
def solve():
n, x, y = map(int, input().split())
A = input().strip()
B = input().strip()
diff = []
for i in range(n):
if A[i] != B[i]:
diff.append(i)
m = len(diff)
if x >= y:
if m % 2:
return -1
elif m =... | IMPORT ASSIGN VAR VAR FUNC_DEF ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST FOR VAR FUNC_CALL VAR VAR IF VAR VAR VAR VAR EXPR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR IF VAR VAR IF BIN_OP VAR NUMBER RETURN NUMBER... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | import sys
input = sys.stdin.readline
for _ in range(int(input())):
n = int(input())
a = list(map(int, input().split()))
for i in range(n - 2, -1, -1):
if a[i + 1] > 1:
x = a[i + 1] // 2
a[i + 1] %= 2
a[i] -= x
for i in range(n - 2, -1, -1):
if a[i + ... | IMPORT ASSIGN VAR VAR FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR BIN_OP VAR BIN_OP VAR NUMBER NUMBER VAR BIN_O... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | for _ in range(int(input())):
n = int(input())
a = list(map(int, input().split()))
for i in range(n - 1, 0, -1):
if a[i] > 0:
t = a[i] // 2
a[i] -= 2 * t
a[i - 1] -= t
for i in range(n - 1, 0, -1):
if a[i] > 0 and a[i - 1] > 0:
t = (a[i] + ... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER ASSIGN VAR BIN_OP VAR VAR NUMBER VAR VAR BIN_OP NUMBER VAR VAR BIN_OP VAR NUMBER VAR FOR VAR... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | for _ in range(int(input())):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in reversed(range(1, n)):
if a[i] > 0:
moves = a[i] // 2
a[i] -= 2 * moves
a[i - 1] -= moves
for i in reversed(range(1, n)):
if a[i] > 0 and a[i - 1] >... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR NUMBER VAR IF VAR VAR NUMBER ASSIGN VAR BIN_OP VAR VAR NUMBER VAR VAR BIN_OP NUMBER VAR VAR BIN_OP VAR NUMBER ... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | for _ in range(int(input())):
n = int(input())
a = list(map(int, input().split()))
for i in range(n - 1, 0, -1):
if a[i] > 0:
div = a[i] // 2
a[i - 1] -= div
a[i] -= 2 * div
for i in range(n - 1, 0, -1):
if a[i - 1] > 0 and a[i] > 0:
a[i - ... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER ASSIGN VAR BIN_OP VAR VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP NUMBER VAR FOR VAR... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | def find_best_sub(arr, i, negative=False):
a, b = arr[i - 1], arr[i]
if b <= 0:
return 0
cand = b // 2
if a > cand and b % 2 == 1 and negative:
cand += 1
return cand
def main():
for _ in range(int(input())):
n = int(input())
a = list(map(int, input().split()))
... | FUNC_DEF NUMBER ASSIGN VAR VAR VAR BIN_OP VAR NUMBER VAR VAR IF VAR NUMBER RETURN NUMBER ASSIGN VAR BIN_OP VAR NUMBER IF VAR VAR BIN_OP VAR NUMBER NUMBER VAR VAR NUMBER RETURN VAR FUNC_DEF FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | for i in range(int(input())):
n = int(input())
l = list(map(int, input().split()))
ans = 0
for j in range(n - 2, -1, -1):
if l[j + 1] >= 2:
c = l[j + 1] // 2
l[j + 1] = l[j + 1] % 2
l[j] = l[j] - c
for j in range(n - 2, -1, -1):
if l[j + 1] > 0 and... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR BIN_OP VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR BI... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | t = int(input())
while t:
t -= 1
n = int(input())
a = list(map(int, input().split()))
for i in range(n - 1, 0, -1):
if a[i] > 0:
a[i - 1] -= a[i] // 2
a[i] %= 2
for i in range(n - 1, 0, -1):
if a[i] > 0 and a[i - 1] > 0:
a[i] -= 2
a[i -... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR WHILE VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER VAR BIN_OP VAR NUMBER BIN_OP VAR VAR NUMBER VAR VAR NUMBER FOR VAR FUNC_CALL VAR B... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | T = int(input())
for i in range(T):
N = int(input())
A = list(map(int, input().split(" ")))
S = 0
for i in range(N - 1, 0, -1):
if A[i] > 0:
q = int(A[i] / 2)
A[i] = A[i] % 2
A[i - 1] -= q
for i in range(N - 1, 0, -1):
if A[i] == 1 and A[i - 1] > 0... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR NUMBER ASSIG... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | for i in range(int(input())):
N = int(input())
arr = [int(x) for x in input().split()]
for i in range(len(arr) - 1, 0, -1):
if arr[i] < 0:
continue
x = arr[i] // 2
arr[i] = arr[i] - x * 2
arr[i - 1] = arr[i - 1] - x
for i in range(len(arr) - 1, 0, -1):
... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR FOR VAR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER ASSIGN VAR BIN_OP VAR VAR NUMBER ASSIGN VAR VAR BIN_OP VAR VAR BIN_OP VAR NUMBER ASSIGN ... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | def f(n, arr):
k = 0
for j in range(n - 2, -1, -1):
if arr[j + 1] <= 0:
k = 0
continue
if arr[j + 1] % 2 == 0 or k == 1:
arr[j] -= arr[j + 1] // 2
arr[j + 1] = 0
k = 0
elif j == 0:
if arr[j] - arr[j + 1] // 2 > 0:
... | FUNC_DEF ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR NUMBER IF BIN_OP VAR BIN_OP VAR NUMBER NUMBER NUMBER VAR NUMBER VAR VAR BIN_OP VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR NUMBER IF VAR NUMBER IF BIN_OP VAR VAR BI... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | t = int(input())
for e in range(t):
n = int(input())
l = list(map(int, input().split()))
i = len(l) - 2
while i >= 0:
if l[i + 1] >= 0:
q1 = int(l[i + 1] / 2)
q2 = l[i + 1] % 2
l[i] -= q1 * 1
l[i + 1] -= 2 * q1
i -= 1
s = 0
for i in... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR 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 FUNC_CALL VAR VAR NUMBER WHILE VAR NUMBER IF VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR FUNC_CALL VAR BIN_OP VAR BIN_OP VAR NUMBER NUM... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | t = int(input())
res = []
for _ in range(t):
n = int(input())
nums = [int(x) for x in input().split()]
for i in range(n - 1, 0, -1):
if nums[i] > 0:
times = nums[i] // 2
nums[i] -= 2 * times
nums[i - 1] -= times
for i in range(n - 1, 0, -1):
if nums[i]... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR LIST FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER ASSIGN VAR BIN_OP VAR VAR NUMBER VAR VAR BIN_OP NUMBER VAR VAR BIN_OP V... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | N = int(input())
while N > 0:
n = int(input())
a = input()
b = 0
a = a.split()
a = list(map(lambda x: int(x), a))
m = n
if n == 1:
if a[0] < 0:
a[0] = a[0] * -1
print(a[0])
else:
while n > 1:
if a[n - 1] >= 2:
div = a[n - 1]... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR WHILE VAR NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR ASSIGN VAR VAR IF VAR NUMBER IF VAR NUMBER NUMBER ASSIGN VAR NUMBER BIN_OP VAR NUMBER NUMBER EXP... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | import sys
def op(a, b):
if abs(a - 2) + abs(b - 1) < abs(a) + abs(b):
return True
return False
for _ in range(int(sys.stdin.readline())):
n = int(sys.stdin.readline())
arr = list(map(int, sys.stdin.readline().split()))
ans = 0
if n == 1:
print(abs(arr[0]))
else:
... | IMPORT FUNC_DEF IF BIN_OP FUNC_CALL VAR BIN_OP VAR NUMBER FUNC_CALL VAR BIN_OP VAR NUMBER BIN_OP FUNC_CALL VAR VAR FUNC_CALL VAR VAR RETURN NUMBER RETURN NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASS... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | for _ in range(int(input())):
N = int(input())
nums = list(map(int, input().split()))
s = abs(nums[0]) if N == 1 else (2 * 10) ** 5
for i in range(len(nums) - 1, 0, -1):
if nums[i] >= 2:
nums[i - 1] = nums[i - 1] - nums[i] // 2
nums[i] = nums[i] % 2
for i in range(len... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER BIN_OP BIN_OP NUMBER NUMBER NUMBER FOR VAR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR NUMBER NUMBER NUMBER IF VAR VAR NUM... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | for test in range(int(input())):
n = int(input())
a = [int(ai) for ai in input().split()]
for i in range(n - 1, 0, -1):
if a[i] >= 2 and a[i - 1] >= 1:
substract = min(a[i] // 2, a[i - 1])
a[i] -= 2 * substract
a[i - 1] -= 1 * substract
for i in range(n - 1, 0... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR NUMBER VAR BIN_OP VAR NUMBER VAR ... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | for _ in range(int(input())):
n = int(input())
a = list(map(int, input().split()))
sum = 0
for i in range(n - 1, 0, -1):
if a[i] <= 0:
continue
elif a[i] % 2 == 0:
a[i - 1] = int(a[i - 1] - a[i] / 2)
a[i] = 0
else:
a[i - 1] = int(a[... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER IF BIN_OP VAR VAR NUMBER NUMBER ASSIGN VAR BIN_OP VAR NUMBER FUNC_CALL VAR... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | for _ in range(int(input())):
array_len = int(input())
array = [int(num) for num in input().split()]
for i in range(array_len - 1, 0, -1):
if array[i] <= 0:
continue
if array[i] >= 2:
array[i - 1] -= array[i] // 2
array[i] %= 2
if (
arr... | FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER IF VAR VAR NUMBER VAR BIN_OP VAR NUMBER BIN_OP VAR VAR NUMBER VAR VAR NUMBER IF VAR VAR NUMBER VAR BIN... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | iter = int(input())
for z in range(iter):
n = int(input())
a = list(map(int, input().split(" ")))
ans = 0
for i in range(n - 1, 0, -1):
mult = 0
if a[i] > 0:
if a[i] & 1:
mult = a[i] // 2
a[i] = 1
else:
mult = a[i] /... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER ASSIGN VAR NUMBER IF VAR VAR NUMBER IF BIN_OP VAR VAR NUMBER ASSIGN VA... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | from sys import stdin
def sp(n, a):
if n == 1:
return abs(a[0])
ans = 0
for i in range(n - 1, 0, -1):
a1 = a[i - 1]
a2 = a[i]
if a2 <= 0:
continue
z = a2 // 2
a[i] -= z * 2
a[i - 1] -= z
for i in range(n - 1, 0, -1):
if a[i] >... | FUNC_DEF IF VAR NUMBER RETURN FUNC_CALL VAR VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER ASSIGN VAR VAR BIN_OP VAR NUMBER ASSIGN VAR VAR VAR IF VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | t = int(input())
for _ in range(t):
n = int(input())
a = [int(x) for x in input().split()]
for i in range(n - 1, 0, -1):
if a[i] > 0:
count = a[i] // 2
a[i] = a[i] - 2 * count
a[i - 1] = a[i - 1] - 1 * count
for i in range(n - 1):
if a[i] > 0 and a[i +... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER ASSIGN VAR BIN_OP VAR VAR NUMBER ASSIGN VAR VAR BIN_OP VAR VAR BIN_OP NUMBER VAR ASSIGN... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | def codeforces(arr, n):
for i in range(n - 1, 0, -1):
if arr[i] >= 2 and arr[i - 1] >= 1:
x = min(arr[i] // 2, arr[i - 1])
arr[i - 1] -= x
arr[i] -= 2 * x
for i in range(n - 1, 0, -1):
if arr[i] >= 2:
x = arr[i] // 2
arr[i - 1] -= x
... | FUNC_DEF FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR NUMBER VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP NUMBER VAR FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER ASSIGN VAR BIN_OP... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | import sys
input = sys.stdin.readline
def inp():
return int(input())
def inlt():
return list(map(int, input().split()))
def insr():
s = input()
return list(s[: len(s) - 1])
def invr():
return map(int, input().split())
def v(k, val1, val2):
val1 -= k
val2 -= 2 * k
return abs(va... | IMPORT ASSIGN VAR VAR 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 ASSIGN VAR FUNC_CALL VAR RETURN FUNC_CALL VAR VAR BIN_OP FUNC_CALL VAR VAR NUMBER FUNC_DEF RETURN FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF VAR VAR VAR BIN_OP NUMBE... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | import sys
input = sys.stdin.readline
for _ in range(int(input())):
n = int(input())
l = list(map(int, input().split()))
ans = 0
for i in range(n - 1, 0, -1):
if l[i] <= 0:
ans += abs(l[i])
else:
ans += l[i] % 2
l[i - 1] -= l[i] // 2
if l[... | IMPORT ASSIGN VAR VAR FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER VAR FUNC_CALL VAR VAR VAR VAR BIN_OP VAR VAR NUMBER ... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | t = int(input())
for _ in range(t):
n = int(input())
a = list(map(int, input().split()))
if n == 1:
print(abs(a[0]))
continue
else:
for i in range(n - 1, 0, -1):
if a[i] < 1:
continue
elif a[i] % 2 == 0 and a[i] >= 2:
diff =... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER IF BIN_OP VAR VAR N... |
You are given N integers A_{1}, A_{2}, \ldots, A_{N}.
You can perform the following operation any number of times:
Select any index i such that 1 β€ i β€ (N-1);
Subtract 1 from A_{i} and 2 from A_{i+1}.
Find the smallest possible value of |A_{1}| + |A_{2}| + \ldots + |A_{N}| you can achieve after performing any number... | def func():
n = int(input())
l = list(map(int, input().split()))
if n == 1:
print(abs(l[0]))
return
for i in range(n - 1, 0, -1):
if l[i] > 1:
if l[i] % 2 == 0:
x = l[i] // 2
l[i] = 0
l[i - 1] -= x
else:
... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER RETURN FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR NUMBER IF BIN_OP VAR VAR NUMBER NUMBER ASSIGN VAR BIN_OP VAR VAR NUMBER ASS... |
R3D3 spent some time on an internship in MDCS. After earning enough money, he decided to go on a holiday somewhere far, far away. He enjoyed suntanning, drinking alcohol-free cocktails and going to concerts of popular local bands. While listening to "The White Buttons" and their hit song "Dacan the Baker", he met anoth... | import sys
input = sys.stdin.readline
n, a, b = map(int, input().split())
if a < b:
a, b = b, a
if b == 0:
print((n - 1) * a)
else:
pascal = [[1] * 20005]
for i in range(20004):
newrow = [1]
for j in range(1, 20005):
newrow.append(newrow[-1] + pascal[-1][j])
if n... | IMPORT ASSIGN VAR VAR ASSIGN VAR VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR VAR ASSIGN VAR VAR VAR VAR IF VAR NUMBER EXPR FUNC_CALL VAR BIN_OP BIN_OP VAR NUMBER VAR ASSIGN VAR LIST BIN_OP LIST NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER ASSIGN VAR LIST NUMBER FOR VAR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_C... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input()
l = []
for i in range(len(s)):
if s[i] == ".":
l.append(i)
if len(s) == 1:
print("NO")
exit()
if len(l) == 0:
print("NO")
exit()
if len(s) - 1 - l[-1] > 3 or len(s) - 1 - l[-1] == 0:
print("NO")
exit()
i = 0
t1 = 0
if l[i] == 0:
print("NO")
exit()
if len(l) and l[... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR STRING EXPR FUNC_CALL VAR VAR IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR IF BIN_OP BIN_OP FUNC_CALL VAR VAR NUMBER VAR NUMBER... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | def main():
s = input()
a = list(s.split("."))
if len(a) == 1:
print("NO")
return
if "" in a:
print("NO")
return
if len(a[0]) > 8:
print("NO")
return
if len(a[-1]) > 3:
print("NO")
return
for i in range(1, len(a) - 1):
i... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR STRING IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING RETURN IF STRING VAR EXPR FUNC_CALL VAR STRING RETURN IF FUNC_CALL VAR VAR NUMBER NUMBER EXPR FUNC_CALL VAR STRING RETURN IF FUNC_CALL VAR VAR NUMBER NUMBER EXPR FUNC_CALL VAR STRING RET... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | R = lambda: map(int, input().split())
s = input()
arr = []
for i, c in enumerate(s):
if c == ".":
arr.append(i)
n = len(s)
if not arr or not 1 <= arr[0] <= 8 or not 1 <= n - arr[-1] - 1 <= 3:
print("NO")
elif not all(2 <= abs(y - x - 1) <= 11 for x, y in zip(arr, arr[1:])):
print("NO")
else:
pri... | ASSIGN VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST FOR VAR VAR FUNC_CALL VAR VAR IF VAR STRING EXPR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR IF VAR NUMBER VAR NUMBER NUMBER NUMBER BIN_OP BIN_OP VAR VAR NUMBER NUMBER NUMBER EXPR FUNC_CALL VAR STRING IF FUNC_CALL VAR NUMBE... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input().split(".")
if len(s) == 1:
print("NO")
exit()
elif len(s[0]) > 8 or len(s[0]) == 0:
print("NO")
exit()
D = []
a = s[0]
for i in range(1, len(s) - 1):
if len(s[i]) <= 1:
print("NO")
exit()
elif len(s[i]) > 11:
print("NO")
exit()
else:
b = s[... | ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR IF FUNC_CALL VAR VAR NUMBER NUMBER FUNC_CALL VAR VAR NUMBER NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP FUNC_CALL VAR VAR N... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | q = []
def is_valid(s, n):
first_dot = 0
last_dot = n - 1
for i in range(n):
if s[i] == ".":
break
first_dot += 1
for i in range(n - 1, -1, -1):
if s[i] == ".":
break
last_dot -= 1
if first_dot > last_dot:
return False
if first_do... | ASSIGN VAR LIST FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER FOR VAR FUNC_CALL VAR VAR IF VAR VAR STRING VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR VAR STRING VAR NUMBER IF VAR VAR RETURN NUMBER IF VAR NUMBER VAR NUMBER BIN_OP BIN_OP VAR NUMBER VAR NUMBER BIN_OP BIN_OP VAR NUMBER... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | ar = input().split(".")
if len(ar[0]) > 8 or len(ar[-1]) > 3 or "" in ar or len(ar) < 2:
print("NO")
exit()
for i in range(len(ar)):
if len(ar[i]) > 11:
print("NO")
exit()
out = []
for i in range(len(ar) - 1):
t = min(len(ar[i + 1]) - 1, 3)
if t == 0 and i + 1 != len(ar) - 1:
... | ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING IF FUNC_CALL VAR VAR NUMBER NUMBER FUNC_CALL VAR VAR NUMBER NUMBER STRING VAR FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF FUNC_CALL VAR VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR ASSIGN VAR LI... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = [x for x in input().split(".")]
if len(s) == 1:
print("NO")
exit(0)
file = s[0]
s = s[1:]
ending = s[-1]
s = s[:-1]
store = []
if len(file) == 0:
print("NO")
exit(0)
for x in s:
if len(x) > 11 or len(x) == 0:
print("NO")
exit(0)
if len(x) - 1 <= 8:
store.append(file +... | ASSIGN VAR VAR VAR FUNC_CALL FUNC_CALL VAR STRING IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR NUMBER ASSIGN VAR VAR NUMBER ASSIGN VAR VAR NUMBER ASSIGN VAR VAR NUMBER ASSIGN VAR VAR NUMBER ASSIGN VAR LIST IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR NUMBER FOR VA... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | def s():
a = input().split(".")
ans = [a[0] + "."]
for i in range(1, len(a) - 1):
i = a[i]
if len(i) < 2 or len(i) > 11:
print("NO")
return
if len(i) > 3:
ans[-1] += i[:3]
ans.append(i[3:] + ".")
else:
ans[-1] += i[0... | FUNC_DEF ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR LIST BIN_OP VAR NUMBER STRING FOR VAR FUNC_CALL VAR NUMBER BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR VAR VAR IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING RETURN IF FUNC_CALL VAR VAR NUMBER VAR NUMBER VAR NUMBER EXPR FUNC_CA... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | from sys import exit
s = input()
n = len(s)
a = s.find(".")
b = s.rfind(".")
if a == b == -1:
print("NO")
exit()
if a == 0 or n - b - 1 == 0:
print("NO")
exit()
if not 0 < a < 9 or not 0 < n - b - 1 < 4:
print("NO")
exit()
s2 = s[a + 1 : b + 1]
res = [s[: a + 1]]
app = res.append
length, item =... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR STRING IF VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR IF VAR NUMBER BIN_OP BIN_OP VAR VAR NUMBER NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR IF NUMBER VAR NUMBER NUMBER BIN_OP BIN_OP VA... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | import sys
def solve():
a = input().split(".")
if len(a) < 2:
print("NO")
return
res = [([""] * 2) for _ in range(len(a) - 1)]
res[0][0] = a[0]
res[len(res) - 1][1] = a[-1]
for i in range(1, len(a) - 1):
if len(a[i]) < 2:
print("NO")
return
... | IMPORT FUNC_DEF ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING RETURN ASSIGN VAR BIN_OP LIST STRING NUMBER VAR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR NUMBER NUMBER VAR NUMBER ASSIGN VAR BIN_OP FUNC_CALL VAR VAR NUMBER NUMBER VAR NUMBER FOR VAR FUNC_CALL... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input()
s = s.split(".")
f = 0
if (len(s[0]) <= 8 and len(s[0]) >= 1) and (len(s[-1]) <= 3 and len(s[-1]) >= 1):
pass
else:
f = 1
if len(s) < 2:
f = 1
for i in range(1, len(s) - 1):
if len(s[i]) <= 11 and len(s[i]) > 1:
pass
else:
f = 1
if f == 1:
print("NO")
else:
print(... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR STRING ASSIGN VAR NUMBER IF FUNC_CALL VAR VAR NUMBER NUMBER FUNC_CALL VAR VAR NUMBER NUMBER FUNC_CALL VAR VAR NUMBER NUMBER FUNC_CALL VAR VAR NUMBER NUMBER ASSIGN VAR NUMBER IF FUNC_CALL VAR VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP FUNC_CALL VAR ... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input()
arr = s.split(".")
for i in arr:
if len(i) == 0:
print("NO")
exit(0)
if len(arr) < 2:
print("NO")
exit(0)
ans = [""]
ans[0] = arr[0]
for i in range(1, len(arr) - 1, 1):
ans.append("")
if len(arr[i]) > 3:
ans[i - 1] = ans[i - 1] + "." + arr[i][:3]
ans[i] = ... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR STRING FOR VAR VAR IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR NUMBER IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR NUMBER ASSIGN VAR LIST STRING ASSIGN VAR NUMBER VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP FUN... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input()
words = s.split(".")
n = s.count(".")
numberOfWordsWithSizeLessThanTwo = len([x for x in words[1:-1] if len(x) < 2])
numberOfWordsWithSizeMoreThanEleven = len([x for x in words[1:-1] if len(x) > 11])
if len(words) == 1:
print("NO")
elif (
len(words[0]) < 1
or len(words[0]) > 8
or len(words[-... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR VAR VAR VAR NUMBER NUMBER FUNC_CALL VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR VAR VAR NUMBER NUMBER FUNC_CALL VAR VAR NUMBER IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING IF FUNC_CALL VAR VAR NUMB... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input()
n = len(s)
i = 0
x = []
ans = 1
for j in s:
if j == ".":
x.append(i)
i += 1
if not x:
print("NO")
elif x[0] == 0 or n - x[-1] - 1 > 3 or x[-1] == n - 1 or x[0] > 8:
print("NO")
else:
a = [s[: x[0] + 1]]
for i in range(1, len(x)):
if x[i] - x[i - 1] > 12 or x[i] - x[i ... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER ASSIGN VAR LIST ASSIGN VAR NUMBER FOR VAR VAR IF VAR STRING EXPR FUNC_CALL VAR VAR VAR NUMBER IF VAR EXPR FUNC_CALL VAR STRING IF VAR NUMBER NUMBER BIN_OP BIN_OP VAR VAR NUMBER NUMBER NUMBER VAR NUMBER BIN_OP VAR NUMBER VAR NUMBER NUMBER EXPR FUNC_... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input()
if s[0] == "." or s[-1] == ".":
print("NO")
quit()
s = s.split(".")
if len(s) == 1:
print("NO")
quit()
if not 1 <= len(s[-1]) <= 3 or not 1 <= len(s[0]) <= 8:
print("NO")
quit()
arr = [s[-1]]
s.pop()
n = len(s)
for i in range(n - 1, -1, -1):
p = len(s[i])
if i > 0 and not 2 <... | ASSIGN VAR FUNC_CALL VAR IF VAR NUMBER STRING VAR NUMBER STRING EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR STRING IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR IF NUMBER FUNC_CALL VAR VAR NUMBER NUMBER NUMBER FUNC_CALL VAR VAR NUMBER NUMBER EXPR FUNC_CALL VAR STRING... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | a = input().strip()
n = len(a)
possible = True
x = a.split(".")
y = []
y.append(x[0])
for i in range(1, len(x) - 1):
l = len(x[i])
if l == 1:
possible = False
else:
idx = min(3, l // 2)
y.extend([x[i][0:idx], x[i][idx:]])
y.append(x[-1])
n = len(y)
names = []
for i in range(1, n, 2):... | ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR STRING ASSIGN VAR LIST EXPR FUNC_CALL VAR VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR VAR IF VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR NUMBER BI... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input().strip().split(".")
d = {(2): 1, (3): 1, (4): 1, (5): 2, (6): 3, (7): 3, (8): 3, (9): 3, (10): 3, (11): 3}
if len(s) <= 1 or len(s[0]) > 8 or len(s[-1]) > 3 or len(s[0]) == 0 or len(s[-1]) == 0:
print("NO")
exit(0)
matches = []
for i in range(1, len(s) - 1):
if len(s[i]) not in d:
print("... | ASSIGN VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR DICT NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER NUMBER FUNC_CALL VAR VAR NUMBER NUMBER FUNC_CALL VAR VAR NU... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input()
v = s.split(sep=".")
flen = len(v[0])
llen = len(v[-1])
if len(v) < 2:
print("NO")
elif not (flen >= 1 and flen <= 8):
print("NO")
elif not (llen >= 1 and llen <= 3):
print("NO")
else:
for i in range(1, len(v) - 1):
if not (len(v[i]) >= 2 and len(v[i]) <= 11):
print("NO")... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR NUMBER IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING FOR VAR FUNC_CALL VAR NUMBER BIN_OP... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | import sys
def fail():
print("NO")
sys.exit()
parts = input().strip().split(".")
n = len(parts)
if n < 2:
fail()
result = (n - 1) * [None]
for i in range(1, n):
s, t = parts[i - 1], parts[i]
a, b = len(s), len(t)
if a < 1 or a > 8:
fail()
if b == 0:
fail()
c = max(1, ... | IMPORT FUNC_DEF EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR ASSIGN VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR VAR IF VAR NUMBER EXPR FUNC_CALL VAR ASSIGN VAR BIN_OP BIN_OP VAR NUMBER LIST NONE FOR VAR FUNC_CALL VAR NUMBER VAR ASSIGN VAR VAR VAR BIN_OP VAR NUMBER VAR VAR ASSIGN VAR VAR FUNC_C... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = list(input().split("."))
if len(s) == 1:
print("NO")
exit()
x = s[0]
y = ""
ans = []
for i in range(1, len(s) - 1):
if not 1 <= len(x) <= 8:
print("NO")
exit()
if 2 <= len(s[i]) <= 3:
y = s[i][:1]
ans.append(x + "." + y)
x = s[i][1:]
elif 4 <= len(s[i]) <=... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL FUNC_CALL VAR STRING IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR ASSIGN VAR VAR NUMBER ASSIGN VAR STRING ASSIGN VAR LIST FOR VAR FUNC_CALL VAR NUMBER BIN_OP FUNC_CALL VAR VAR NUMBER IF NUMBER FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CAL... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | a = input().split(".")
l = [[a[0]]]
for i in a[1:-1]:
m = min(3, len(i) - 1)
l[-1] += [i[:m]]
l += [[i[m:]]]
l[-1] += [a[-1]]
if len(a) < 2 or any(
len(i) not in range(1, 9) or len(j) not in range(1, 4) for i, j in l
):
print("NO")
else:
print("YES")
print("\n".join(".".join(i) for i in l)) | ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR LIST LIST VAR NUMBER FOR VAR VAR NUMBER NUMBER ASSIGN VAR FUNC_CALL VAR NUMBER BIN_OP FUNC_CALL VAR VAR NUMBER VAR NUMBER LIST VAR VAR VAR LIST LIST VAR VAR VAR NUMBER LIST VAR NUMBER IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL VAR NUMBER NU... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input()
if s == ".":
print("NO")
elif "." not in s:
print("NO")
else:
arr = s.split(".")
if arr[-1] == "" or arr[0] == "":
print("NO")
else:
ans = []
flag = 0
for i in range(1, len(arr) - 1):
s1 = arr[i - 1]
s2 = arr[i]
if len(s... | ASSIGN VAR FUNC_CALL VAR IF VAR STRING EXPR FUNC_CALL VAR STRING IF STRING VAR EXPR FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR STRING IF VAR NUMBER STRING VAR NUMBER STRING EXPR FUNC_CALL VAR STRING ASSIGN VAR LIST ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR VAR BIN_OP V... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | import sys
s = sys.stdin.readline()
k = 0
a = 1
dp = []
e = 0
lendp = 0
r = ""
for x in s:
if x == ".":
dp += [k]
lendp += 1
if e == 0:
a = 0
if k > 8 or k == 0:
a = 1
break
e = 1
elif k > 11 or k <= 1:
... | IMPORT ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR LIST ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR STRING FOR VAR VAR IF VAR STRING VAR LIST VAR VAR NUMBER IF VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER VAR NUMBER ASSIGN VAR NUM... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input().split(".")
if len(s) > 1:
if len(s) == 2:
if 1 <= len(s[0]) <= 8 and 1 <= len(s[-1]) <= 3:
print("YES")
print(s[0] + "." + s[1])
else:
print("NO")
elif (
1 <= len(s[0]) <= 8
and 1
< len(min(s[1 : len(s) - 1], key=lambda x: l... | ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING IF FUNC_CALL VAR VAR NUMBER IF FUNC_CALL VAR VAR NUMBER IF NUMBER FUNC_CALL VAR VAR NUMBER NUMBER NUMBER FUNC_CALL VAR VAR NUMBER NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR BIN_OP BIN_OP VAR NUMBER STRING VAR NUMBER EXPR FUNC_CALL VAR STRING IF NUMBER FUNC_CALL VAR VAR... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | tokens = input().split(".")
if len(tokens) == 1:
print("NO")
quit()
if len(tokens[0]) > 8 or len(tokens[0]) == 0:
print("NO")
quit()
to_print = []
for token in range(1, len(tokens)):
if len(tokens[token]) == 0 or len(tokens[token]) > 11:
print("NO")
quit()
elif len(tokens[token])... | ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR IF FUNC_CALL VAR VAR NUMBER NUMBER FUNC_CALL VAR VAR NUMBER NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR ASSIGN VAR LIST FOR VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR VAR IF FUNC_CALL VAR VAR VAR NUMBE... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input()
words = []
n = len(s)
i = 0
j = 0
flag = 1
word = ""
while i < n and j < n and flag == 1:
if s[i] != ".":
word += s[i]
i += 1
elif 8 >= i - j >= 1:
word += "."
i += 1
if i < n - 2 and "." not in s[i : i + 4]:
word += s[i : i + 3]
i += 3... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR STRING WHILE VAR VAR VAR VAR VAR NUMBER IF VAR VAR STRING VAR VAR VAR VAR NUMBER IF NUMBER BIN_OP VAR VAR NUMBER VAR STRING VAR NUMBER IF VAR BIN_OP VAR NUMBER STRING VAR VAR BIN_OP VAR... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | mas = list(input().split("."))
if len(mas) < 2:
print("NO")
exit(0)
if len(mas[0]) > 8 or len(mas[0]) < 1:
print("NO")
exit(0)
for i in range(1, len(mas) - 1):
if len(mas[i]) > 11 or len(mas[i]) < 2:
print("NO")
exit(0)
if len(mas[len(mas) - 1]) > 3 or len(mas[len(mas) - 1]) < 1:
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL FUNC_CALL VAR STRING IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR NUMBER IF FUNC_CALL VAR VAR NUMBER NUMBER FUNC_CALL VAR VAR NUMBER NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP FUNC_CALL VAR VAR NUMBER IF F... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | b = input()
a = list(b.split("."))
c = 0
for i in range(len(b)):
if b[i] == ".":
c += 1
ans = []
temp = []
w = 1
na = len(a)
for i in range(len(a) - 1):
if (
len(a[i]) >= 1
and len(a[i]) <= 8
and len(a[i + 1]) >= 1
and len(a[i + 1]) <= 3
and i + 1 == na - 1
):... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR STRING ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR STRING VAR NUMBER ASSIGN VAR LIST ASSIGN VAR LIST ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR FOR VAR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF FUNC_CALL VAR VAR VAR NUMB... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | ok = 1
s = input().split(".")
n = len(s)
ver = 0
if n < 2:
ok = 0
ver = 1
for i in range(1, n - 1):
t = s[i]
if not t.isalpha() or not t.islower() or len(t) < 2 or len(t) > 11:
ok = 0
ver = 2
break
t = s[0]
if not t.isalpha() or not t.islower() or len(t) < 1 or len(t) > 8:
ok... | ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER IF VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP VAR NUMBER ASSIGN VAR VAR VAR IF FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER ASSIGN VAR NUMBE... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | s = input().split(".")
y = 0 < len(s[0]) < 9 and 0 < len(s[-1]) < 4 and len(s) > 1
for i in range(1, len(s) - 1):
if len(s[i]) < 2 or len(s[i]) > 11:
y = 0
print(["NO", "YES"][y])
if y < 1:
exit()
print(s[0], end="")
for i in range(1, len(s) - 1):
print(
"." + [s[i][0] + "\n" + s[i][1:], s[i... | ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR NUMBER FUNC_CALL VAR VAR NUMBER NUMBER NUMBER FUNC_CALL VAR VAR NUMBER NUMBER FUNC_CALL VAR VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP FUNC_CALL VAR VAR NUMBER IF FUNC_CALL VAR VAR VAR NUMBER FUNC_CALL VAR VAR VAR NUMBER ASSIGN VAR NUMBER EXPR FUNC_CALL VAR LIST ... |
Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where:
* name is a string consisting of lowercase Latin lett... | def swap():
global flag, c
flag ^= 1
return [8, 3][flag]
s = input() + " "
if s[0] == ".":
exit(print("NO"))
flag, cur, ans, c = 0, "", [], 8
for i in range(len(s) - 2):
if s[i] == ".":
if s[i + 1] in ". " or s[i + 2] == ".":
exit(print("NO"))
c = swap()
cur = ... | FUNC_DEF VAR NUMBER RETURN LIST NUMBER NUMBER VAR ASSIGN VAR BIN_OP FUNC_CALL VAR STRING IF VAR NUMBER STRING EXPR FUNC_CALL VAR FUNC_CALL VAR STRING ASSIGN VAR VAR VAR VAR NUMBER STRING LIST NUMBER FOR VAR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR VAR STRING IF VAR BIN_OP VAR NUMBER STRING VAR BIN_OP VAR NU... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.