code stringlengths 3 6.57k |
|---|
np.array(ab) |
np.zeros(n, dtype=np.int32) |
np.add.at(g, ab, 1) |
print(*g, sep="\n") |
c() |
map(int, sys.stdin.read() |
split() |
np.transpose(np.array(ab) |
reshape(n, 2) |
np.argsort(ab[0]) |
print(a[np.cumsum(b) |
d() |
map(int, sys.stdin.read() |
split() |
np.array(abc) |
reshape(m, 3) |
np.append(a, n - 1) |
np.append(b, 0) |
connected_components(g, connection="strong") |
csr_matrix((c[bl], (a[bl], b[bl]) |
shortest_path(g, method="BF", directed=True, indices=0) |
astype(int) |
print("inf") |
d_2() |
map(int, sys.stdin.read() |
split() |
np.array(abc) |
reshape(m, 3) |
np.full(n, np.inf) |
range(n - 1) |
np.minimum.at(d, b, d[a] + c) |
np.zeros(n, dtype=np.bool) |
range(n) |
np.logical_or.at(neg_cycle, b, d[a] + c < d[b]) |
np.minimum.at(d, b, d[a] + c) |
print(inf if neg_cycle[-1] else -d[-1].astype(int) |
a() |
map(int, sys.stdin.readline() |
split() |
print("Yes" if g[x - 1] == g[y - 1] else "No") |
b() |
map(int, sys.stdin.readline() |
split() |
list(s) |
sys.stdin.read() |
split() |
np.pad(a, pad_width=1, constant_values="#") |
print("".join(s) |
c() |
map(int, sys.stdin.readline() |
split() |
print(0) |
minimize(h, w) |
range(w // 3, w // 3 + 2) |
print(min(minimize(h, w) |
minimize(w, h) |
d() |
map(int, sys.stdin.read() |
split() |
np.array(a) |
optimize(a) |
list(a) |
heapify(l) |
sum(l) |
range(n) |
heappop(l) |
heappush(l, max(x, r[i]) |
max(0, r[i] - x) |
np.array(s) |
optimize(a[: 2 * n]) |
optimize(-a[-1 : n - 1 : -1]) |
max() |
a() |
sum(map(int, sys.stdin.readline() |
split() |
print("error" if a >= 10 else a) |
b() |
sys.stdin.readline() |
rstrip() |
print("yes" if len(set(s) |
len(s) |
c() |
map(int, sys.stdin.read() |
split() |
np.array(a) |
a.sum() |
print(s) |
np.count_nonzero(a % 10) |
print(0) |
print(s - a[a % 10 != 0].min() |
d() |
map(int, sys.stdin.read() |
split() |
np.array(h) |
possible(c) |
h.copy() |
np.maximum(hh - b * c, 0, out=hh) |
return ((hh + d - 1) |
sum() |
binary_search() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.