code stringlengths 3 6.57k |
|---|
c() |
d() |
map(int, sys.stdin.read() |
split() |
GeometryTopology.Graph(n) |
zip(*[iter(ab) |
g.add_edge(a, b) |
g.add_edge(b, a) |
g.bfs(0) |
g.bfs(n - 1) |
sum(d1[i] <= d2[i] for i in range(n) |
a() |
b() |
c() |
d() |
int(sys.stdin.readline() |
rstrip() |
print(n) |
divmod(k, n) |
np.arange(n - 1, -1, -1) |
print(*a) |
a() |
b() |
c() |
d() |
map(int, sys.stdin.read() |
split() |
range(n) |
range(a[i]) |
range(h) |
print(*row) |
d() |
int(sys.stdin.readline() |
rstrip() |
GeometryTopology.Graph(n) |
range(n - 1) |
map(int, sys.stdin.readline() |
split() |
g.add_edge(a, b, weight=c) |
g.add_edge(b, a, weight=c) |
map(int, sys.stdin.readline() |
split() |
g.bfs(k - 1) |
range(q) |
map(int, sys.stdin.readline() |
split() |
print(d[x] + d[y]) |
d() |
sys.stdin.read() |
split() |
int(n) |
list(zip(*s) |
range(1, n) |
print(dp[-1]) |
d() |
map(int, sys.stdin.read() |
split() |
print(cnt) |
a() |
b() |
c() |
d() |
map(int, sys.stdin.read() |
split() |
np.array(I) |
reshape(m, 3) |
csr_matrix((c, (a - 1, b - 1) |
astype(np.int32) |
np.array([*itertools.permutations(I[:r] - 1) |
print((d[r[:, :-1], r[:, 1:]].sum(axis=1) |
min() |
a() |
b() |
c() |
d() |
map(int, sys.stdin.read() |
split() |
np.array(a, dtype=np.int32) |
reshape(n, n) |
shortest_path(a, method="FW") |
astype(np.int32) |
if (b < a) |
any() |
print(-1) |
np.fill_diagonal(b, 10**9) |
np.any(b[:, None] + b <= a[:, :, None], axis=2) |
print(a.sum() |
a() |
b() |
c() |
d() |
map(int, sys.stdin.read() |
split() |
np.array(xy) |
reshape(n, 2) |
xy.copy() |
np.argsort(xy[:, 0]) |
xy.copy() |
np.argsort(xy[:, 1]) |
np.array([*itertools.combinations(range(n) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.