code stringlengths 3 6.57k |
|---|
np.zeros((n + 1, n + 1) |
range(n) |
print(s[a >= k].min() |
d() |
map(int, sys.stdin.read() |
split() |
np.array(tv) |
reshape(2, n) |
np.pad(t, pad_width=[2, 1], constant_values=0) |
np.cumsum(t, out=t) |
np.pad(v, pad_width=[1, 1], constant_values=0) |
np.arange(0, r[-1] + 0.1, 0.5, dtype=np.float32) |
np.stack([v-(x-l) |
np.zeros(r[-1]*2+1, dtype=np.float32) |
max(axis=0) |
min(axis=1) |
np.maximum(mx, v, out=mx) |
np.maximum(mx, v + (x - r) |
mx.min(axis=1) |
print(((y[:-1] + y[1:]) |
sum() |
d() |
int(sys.stdin.readline() |
rstrip() |
GeometryTopology.Graph(k) |
range(k) |
g.add_edge(i, i * 10 % k, weight=0) |
g.add_edge(i, (i + 1) |
print(1 + g.bfs01(1) |
d() |
map(int, sys.stdin.read() |
split() |
abs(a[0] - w) |
max(abs(a[-1] - w) |
abs(a[-1] - a[-2]) |
d() |
map(int, sys.stdin.read() |
split() |
np.array(I) |
reshape(10, 10) |
reshape(h, w) |
shortest_path(c.T, method="D", indices=1) |
astype(np.int32) |
print(c[a[a != -1]].sum() |
d() |
map(int, sys.stdin.read() |
split() |
np.zeros((c, 10**5 + 2) |
np.array(stc) |
reshape(n, 3) |
np.add.at(using, (c - 1, s) |
np.subtract.at(using, (c - 1, t + 1) |
np.cumsum(using, axis=1, out=using) |
print(np.count_nonzero(using, axis=0) |
max() |
d() |
map(int, sys.stdin.read() |
split() |
np.array(a) |
np.argmax(np.absolute(a) |
print(2 * n) |
range(n) |
print(i + 1, j + 1) |
range(n - 1) |
print(j + 1, j + 2) |
range(n - 1, 0, -1) |
print(j + 1, j) |
a() |
int(x) |
sys.stdin.readline() |
split() |
range(5) |
print(i + 1) |
b() |
map(int, sys.stdin.readline() |
split() |
print("Yes" if 2 * x <= y <= 4 * x and y % 2 == 0 else "No") |
c() |
map(int, sys.stdin.read() |
split() |
list(set(range(102) |
set(p) |
abs(y - x) |
print(sorted(a) |
d() |
map(int, sys.stdin.read() |
split() |
set(a) |
sorted(Counter(a) |
items() |
set(range(x * 2, 10**6 + 1, x) |
print(cnt) |
e() |
map(int, sys.stdin.readline() |
split() |
range(m) |
entry(i, k) |
heappop(infants[k]) |
heappush(queue, (rate[i], k, i) |
heappush(infants[k], (r, j) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.