start
stringlengths 5
368
| code
stringlengths 5
143
| end
stringlengths 5
527
|
---|---|---|
a = [(0, 1), (1, 2)]; b = 0; k = 1
|
a.append((b, k - 1))
|
a = [(0, 1), (1, 2), (0, 0)]; b = 0; k = 1
|
i = 'c'; r = {'a': 2, 'b': 2, 'c': 1}
|
r[i] += 1
|
i = 'c'; r = {'a': 2, 'b': 2, 'c': 2}
|
i = 1; j = 5; t = [['O', 'O', 'O', 'O', 'O', 'O'], ['O', 'O', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.']]
|
t[i][j] = 'O'
|
i = 1; j = 5; t = [['O', 'O', 'O', 'O', 'O', 'O'], ['O', 'O', '.', '.', '.', 'O'], ['.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.']]
|
i = 4; j = 5
|
j = i - 1
|
i = 4; j = 3
|
c = [0, 0, 1001, 1000, 999]; i = 1; o = [0, 0, 1001, 1000, 999]; p = 1000; w = [0, 1, 1, 1, 999]
|
p = w[i] + w[i + 1] + o[i + 2] - c[i + 2]
|
c = [0, 0, 1001, 1000, 999]; i = 1; o = [0, 0, 1001, 1000, 999]; p = 2; w = [0, 1, 1, 1, 999]
|
e = 0; h = 2; u = [(0, 0), (2, 0)]
|
u.append(tuple([e, h]))
|
e = 0; h = 2; u = [(0, 0), (2, 0), (0, 2)]
|
g = [0, 1, 0, 0]; i = 2; j = 2
|
g[j] = i
|
g = [0, 1, 2, 0]; i = 2; j = 2
|
a = [1, 2, 3, 4]; c = [[0, inf, inf, inf, inf], [-2, -2, inf, inf, inf], [-6, -2, -6, inf, inf], [-12, 0, inf, inf, inf], [inf, inf, inf, inf, inf]]; i = 2; j = 1; k = 2; n = 4; r = 0
|
r = c[i][j] + a[i] * (i - j - (n - k - (i - j)))
|
a = [1, 2, 3, 4]; c = [[0, inf, inf, inf, inf], [-2, -2, inf, inf, inf], [-6, -2, -6, inf, inf], [-12, 0, inf, inf, inf], [inf, inf, inf, inf, inf]]; i = 2; j = 1; k = 2; n = 4; r = -2
|
f = deque([0])
|
m = f.popleft()
|
f = deque([]); m = 0
|
c = ['e', 'd', 'e', 'd', 'e', 'e', 'd', 'd', 'e', 'd']; i = ['e', 'e', 'd', 'e', 'd', 'd', 'e', 'e', 'd']
|
c = i.copy()
|
c = ['e', 'e', 'd', 'e', 'd', 'd', 'e', 'e', 'd']; i = ['e', 'e', 'd', 'e', 'd', 'd', 'e', 'e', 'd']
|
a = ['append', '1']; l = [5, 10, 9]
|
l.append(int(a[1]))
|
a = ['append', '1']; l = [5, 10, 9, 1]
|
j = 0; l = [2, 2, 3, 1, 2]; w = 1
|
l[j] = w
|
j = 0; l = [1, 2, 3, 1, 2]; w = 1
|
a = '11111111111111111111111111'
|
a += '1'
|
a = '111111111111111111111111111'
|
i = 17; n = 16; y = [0, 1, 3, 0, 4, 1, 7, 0, 8, 1, 11, 0, 12, 1, 15, 0, 16, 1, 19, 0, 20]
|
n = n ^ y[i]
|
i = 17; n = 17; y = [0, 1, 3, 0, 4, 1, 7, 0, 8, 1, 11, 0, 12, 1, 15, 0, 16, 1, 19, 0, 20]
|
d = 1, [1]; l = {(0): {'n': 0, 'items': []}}; n = 1
|
l[n] = {'n': d[0], 'items': d[1]}
|
d = (1, [1]); l = {0: {'n': 0, 'items': []}, 1: {'n': 1, 'items': [1]}}; n = 1
|
c = '1'; g = {(1): {}}; l = 1
|
g[l][c] = 1
|
c = '1'; g = {1: {'1': 1}}; l = 1
|
i = 0; k = 2; l = [{1, 2}, {2}, {3}]
|
l[k - 1] = l[k - 1].union(l[i])
|
i = 0; k = 2; l = [{1, 2}, {1, 2}, {3}]
|
f = [1, 1, 1, 1, 1]; o = 4; y = 4, [1, 1, 1, 1]
|
y = 1 + o, f
|
f = [1, 1, 1, 1, 1]; o = 4; y = (5, [1, 1, 1, 1, 1])
|
e = [[], []]; y = 5; z = 0
|
e[z].append(y)
|
e = [[5], []]; y = 5; z = 0
|
f = [0, 0, 0]; n = 5
|
f = [0] * n
|
f = [0, 0, 0, 0, 0]; n = 5
|
i = 0; o = [0, 0, 0, 0, 0]
|
o[i] += 1
|
i = 0; o = [1, 0, 0, 0, 0]
|
o = '3\n'
|
f = o.split(' ')
|
f = ['3\n']; o = '3\n'
|
t = 3
|
p = t - 1
|
p = 2; t = 3
|
i = [1, 0, 2]; x = 1; y = 1; z = 0
|
i = [x, y, z]
|
i = [1, 1, 0]; x = 1; y = 1; z = 0
|
a = ['Malika', 52.0, 56.0, '60']; j = 2
|
a[j + 1] = float(a[j + 1])
|
a = ['Malika', 52.0, 56.0, 60.0]; j = 2
|
b = {('b ', 0)}; u = {(' ', 0)}
|
u = b
|
b = {('b ', 0)}; u = {('b ', 0)}
|
w = ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1']
|
w.append('1')
|
w = ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1']
|
j = 2
|
j = j - 1
|
j = 1
|
g = [166, 0, 7, 1]; w = 0
|
g[w] += 1
|
g = [167, 0, 7, 1]; w = 0
|
i = 4; u = [2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; z = 'aabbccddeefghi'
|
u[ord(z[i]) - 97] += 1
|
i = 4; u = [2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; z = 'aabbccddeefghi'
|
k = [5, 7]; m = 7
|
k = (m - 1) / 2
|
k = 3.0; m = 7
|
f = 7
|
f = f + 1
|
f = 8
|
s = 'hackerhappy'; t = 'hackerrank'
|
h, j = s, t
|
h = 'hackerhappy'; j = 'hackerrank'; s = 'hackerhappy'; t = 'hackerrank'
|
h = 1
|
h += 1
|
h = 2
|
a = 2; i = 2; s = [3, 2, 4, 2, 2, 8]
|
s[i] = s[i] - a
|
a = 2; i = 2; s = [3, 2, 2, 2, 2, 8]
|
a = 'CABA['; b = deque(['A', 'A', 'B', 'A', 'B', 'A', 'C', 'A', 'B', 'A'])
|
b.append(a[0])
|
a = 'CABA['; b = deque(['A', 'A', 'B', 'A', 'B', 'A', 'C', 'A', 'B', 'A', 'C'])
|
c = {(63): 1, (25): 1, (73): 2, (1): 1, (98): 1, (56): 1, (84): 1, (86): 1, (57): 1, (16): 1, (83): 1}; q = 8
|
c[q] = 1
|
c = {63: 1, 25: 1, 73: 2, 1: 1, 98: 1, 56: 1, 84: 1, 86: 1, 57: 1, 16: 1, 83: 1, 8: 1}; q = 8
|
c = 2; o = 'b'; r = 'hefg'
|
o = ''.join(sorted(r[c + 1:]))
|
c = 2; o = 'g'; r = 'hefg'
|
q = 2; s = ['h', 'e', 'f', 'g']; v = ['a']
|
v = s[q:]
|
q = 2; s = ['h', 'e', 'f', 'g']; v = ['f', 'g']
|
i = 19; p = [0, 1, 5, 14, 30, 55, 91, 140, 204, 285, 385, 506, 650, 819, 1015, 1240, 1496, 1785, 2109]
|
p.append(p[i - 1] + i * i)
|
i = 19; p = [0, 1, 5, 14, 30, 55, 91, 140, 204, 285, 385, 506, 650, 819, 1015, 1240, 1496, 1785, 2109, 2470]
|
d = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]; i = 2; j = 0; q = [1, 2]
|
q.append(d[j][i])
|
d = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]; i = 2; j = 0; q = [1, 2, 3]
|
v = [1, 97]
|
p.append(v[1])
|
p = [97]; v = [1, 97]
|
k = 11
|
k = k + 1
|
k = 12
|
t = 5; z = 2
|
t += z
|
t = 7; z = 2
|
i = 4; k = []
|
k.append(i)
|
i = 4; k = [4]
|
b = '1'; f = ['1', '0', '0', '0', '0', '0', '0']
|
f.append('0' if b == '1' else '1')
|
b = '1'; f = ['1', '0', '0', '0', '0', '0', '0', '0']
|
c = 2; m = 1
|
m = c
|
c = 2; m = 2
|
b = 2; j = 21; p = -16.0; y = 19.0
|
p = j - b * y
|
b = 2; j = 21; p = -17.0; y = 19.0
|
e = 1; i = 8; q = ['2', '2', '2', '2', '2', '2', '2']; t = ['2', '2', '2', '2', '2', '2', '2']
|
t = q[e:i]
|
e = 1; i = 8; q = ['2', '2', '2', '2', '2', '2', '2']; t = ['2', '2', '2', '2', '2', '2']
|
l = [0, 1, 1, 2, 3, 5, 8, 102334155, 165580141, 267914296, 433494437, 701408733, 1134903170, 1836311903]; t = 2971215073
|
l.append(t)
|
l = [0, 1, 1, 2, 3, 5, 8, 102334155, 165580141, 267914296, 433494437, 701408733, 1134903170, 1836311903, 2971215073]; t = 2971215073
|
p = 4
|
p *= 3
|
p = 12
|
c = ['b', 'c', 'd']
|
c.pop(-1)
|
c = ['b', 'c']
|
k = [5]; o = 5
|
k.append(o)
|
k = [5, 5]; o = 5
|
h = deque(['42'])
|
h.popleft()
|
h = deque([])
|
a = ['d']; d = 'd'
|
a.remove(d)
|
a = []; d = 'd'
|
j = [2, 3, 4, 1]; n = 1
|
j = j[0:n] + sorted(j[n:])
|
j = [2, 1, 3, 4]; n = 1
|
i = 4; j = 4; p = 'ifailuhkqq'; s = ['h', 'i', 'l', 'u']
|
s = list(p[j:j + i])
|
i = 4; j = 4; p = 'ifailuhkqq'; s = ['l', 'u', 'h', 'k']
|
x = 1; y = 9; z = 2
|
y = z + x
|
x = 1; y = 3; z = 2
|
a = 1; y = '11'
|
y += str(a % 2)
|
a = 1; y = '111'
|
d = 2; e = 3
|
e = d
|
d = 2; e = 2
|
e = [False, False, False, False, False]; n = 0
|
e[n] = True
|
e = [True, False, False, False, False]; n = 0
|
q = 3
|
q -= 1
|
q = 2
|
a = 40; i = 11; j = 36
|
a = i ^ j
|
a = 47; i = 11; j = 36
|
a = 'i'; t = 'o'; z = 2
|
t = chr(ord('a') + (ord(a) - ord('a') + z) % 26)
|
a = 'i'; t = 'k'; z = 2
|
l = 25; n = 2; w = 6
|
l = w ** n
|
l = 36; n = 2; w = 6
|
a = [2, 4]
|
r = max(a)
|
a = [2, 4]; r = 4
|
l = {(3): 0}; o = [1, 9]
|
l[o[1]] = o[0]
|
l = {3: 0, 9: 1}; o = [1, 9]
|
r = 30; z = [1, 2, 3, 4, 10, 20]
|
z = z + [r]
|
r = 30; z = [1, 2, 3, 4, 10, 20, 30]
|
i = 8; j = 3; s = 'aaabbbbcccddd'
|
j += ord(s[i]) - ord('a') + 1
|
i = 8; j = 6; s = 'aaabbbbcccddd'
|
i = 0; j = 1; k = 2; m = [[0, 0, 0], [0, 0, 1], [0, 1, 0]]
|
m.append([i, j, k])
|
i = 0; j = 1; k = 2; m = [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 2]]
|
l = '01'
|
l += '0'
|
l = '010'
|
l = []; s = ['1', '26']
|
l.append(int(s[1]))
|
l = [26]; s = ['1', '26']
|
b = 'eeg'; h = 'eeg'; j = 1; t = 5
|
b = h[j:t]
|
b = 'eg'; h = 'eeg'; j = 1; t = 5
|
a = 23; j = 5; k = 3
|
a = 4 * j + 1 + k
|
a = 24; j = 5; k = 3
|
e = 39; i = 2; v = 38
|
e = v + i
|
e = 40; i = 2; v = 38
|
j = 4; n = 11; w = 33
|
w = n * j
|
j = 4; n = 11; w = 44
|
s = 0; u = [False, False, False]
|
u[s] = True
|
s = 0; u = [True, False, False]
|
i = 0; j = 1; r = {(1, 2), (0, 0), (1, 1), (2, 2)}
|
r.add((i, j))
|
i = 0; j = 1; r = {(1, 2), (0, 1), (0, 0), (2, 2), (1, 1)}
|
g = {'1': 1, '2': 1, '3': 1, '6': 1, '5': 1}; x = '4'
|
g[x] = g.get(x, 0) + 1
|
g = {'1': 1, '2': 1, '3': 1, '6': 1, '5': 1, '4': 1}; x = '4'
|
q = deque(['14', '28', '60', '78'])
|
q.popleft()
|
q = deque(['28', '60', '78'])
|
g = 3; i = 1; j = 1; z = [[1, 3, 1], [2, 1, 2], [3, 3, 3]]
|
g += z[j][i]
|
g = 4; i = 1; j = 1; z = [[1, 3, 1], [2, 1, 2], [3, 3, 3]]
|
o = 'ha'; s = 'haveaniceday'; t = 8
|
o += s[t]
|
o = 'hae'; s = 'haveaniceday'; t = 8
|
i = 0; p = [2]
|
p.append(i)
|
i = 0; p = [2, 0]
|
i = 3; k = 2; s = 'abccddde'
|
k = ord(s[i]) - 96
|
i = 3; k = 3; s = 'abccddde'
|
b = 1.0842021724855044e-19; f = 2
|
b /= f
|
b = 5.421010862427522e-20; f = 2
|
b = 0.0; q = 6.553600000000001e-12
|
b += q
|
b = 6.553600000000001e-12; q = 6.553600000000001e-12
|
m = 'g'; n = 'abcdefghhgfedecba'; r = {'a': 2, 'b': 2, 'c': 2, 'd': 2, 'e': 3, 'f': 2}
|
r[str(m)] = n.count(m)
|
m = 'g'; n = 'abcdefghhgfedecba'; r = {'a': 2, 'b': 2, 'c': 2, 'd': 2, 'e': 3, 'f': 2, 'g': 2}
|
i = 2.75; n = 5; u = 2.5
|
i, u = 1, n
|
i = 1; n = 5; u = 5
|
l = 4
|
c = l - 1 - i
|
c = -81; i = 84; l = 4
|
f = 4; w = 9
|
w += f
|
f = 4; w = 13
|
f = [1, 2, 1, 3]; i = 1; x = [0, 1, 0, 0]
|
x[f[i]] += 1
|
f = [1, 2, 1, 3]; i = 1; x = [0, 1, 1, 0]
|
e = ['3', '4', '8']; h = 4; w = ['3', '4', '8', '12', '16', '15', '14', '13', '9', '5', '1', '2']
|
e = w[-h + 1:][::-1]
|
e = ['2', '1', '5']; h = 4; w = ['3', '4', '8', '12', '16', '15', '14', '13', '9', '5', '1', '2']
|
n = '148 3'
|
j = int(n[-1])
|
j = 3; n = '148 3'
|
l = 7.0710678118654755
|
c = l
|
c = 7.0710678118654755; l = 7.0710678118654755
|
c = 2; v = 1
|
c += v
|
c = 3; v = 1
|
l = [1226800, 926891, 782725, 1023038, 1126293, 692565, 1033389, 1034165, 812094, 1351419, 801822, 1044266]; z = '722871'
|
l.append(int(z))
|
l = [1226800, 926891, 782725, 1023038, 1126293, 692565, 1033389, 1034165, 812094, 1351419, 801822, 1044266, 722871]; z = '722871'
|
i = 6; r = 5
|
r = i % 7
|
i = 6; r = 6
|
b = 100; c = [1, 2, 100]; i = 1
|
p += b - c[len(c) - i - 1]
|
b = 100; c = [1, 2, 100]; i = 1; p = 121
|
a = 4; v = 8; y = 11
|
y = v + a
|
a = 4; v = 8; y = 12
|
f = [2, 0]; j = 1
|
f.append(j)
|
f = [2, 0, 1]; j = 1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.