code stringlengths 3 6.57k |
|---|
heappop(queue) |
uf.find(i) |
uf.unite(i, j) |
print(*res, sep="\n") |
a() |
sys.stdin.read() |
split() |
int(i) |
print(s[i - 1]) |
b() |
map(int, sys.stdin.readline() |
split() |
print(ans) |
c() |
map(int, sys.stdin.read() |
split() |
sorted(enumerate(a) |
print(i + 1) |
d() |
map(int, sys.stdin.read() |
split() |
zip(*[iter(xy) |
range(1 << n) |
range(n) |
not (g[j] & i) |
print(res[-1]) |
a() |
int(x) |
sys.stdin.readline() |
split() |
Counter(a) |
print("YES" if c[5] == 2 and c[7] == 1 else "NO") |
b() |
sys.stdin.read() |
split() |
print("".join(sorted(s) |
c() |
sys.stdin.read() |
split() |
len(n) |
sorted(set(string.digits) |
set(d) |
int("".join(p) |
itertools.product(ok, repeat=l) |
int(min(x for x in ok if x > "0") |
min(ok) |
print(cand[bi_l(cand, int(n) |
d() |
map(int, sys.stdin.read() |
split() |
np.arange(h - a, h) |
combinations(i + b - 1, i) |
combinations(h - i + w - b - 2, h - 1 - i) |
print((combinations(h + w - 2, h - 1) |
a() |
int(sys.stdin.readline() |
rstrip() |
print((1 + n) |
b() |
sys.stdin.readline() |
rstrip() |
print(t) |
c() |
map(int, sys.stdin.read() |
split() |
np.array(a) |
np.around(a.sum() |
astype(int) |
print(np.sum((a - x) |
d() |
sys.stdin.readline() |
rstrip() |
len(s) |
range(n - 1) |
print(i + 1, i + 2) |
range(n - 2) |
print(i + 1, i + 3) |
print(-1, -1) |
a() |
map(int, sys.stdin.read() |
split() |
print(min(n, k) |
max(0, n - k) |
b() |
Counter(sys.stdin.readline() |
rstrip() |
values() |
print("Yes" if len(res) |
res.pop() |
c() |
map(int, sys.stdin.read() |
split() |
np.zeros((n + 1, 2501) |
np.arange(1, n + 1) |
print(dp[i, i * a].sum() |
c_2() |
map(int, sys.stdin.read() |
split() |
range(n) |
defaultdict(int) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.