s_id string | p_id string | u_id string | date string | language string | original_language string | filename_ext string | status string | cpu_time string | memory string | code_size string | code string | error string | stdout string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s522289971 | p04002 | u375616706 | 1548706029 | Python | Python (3.4.3) | py | Runtime Error | 3330 | 1693428 | 514 | H, W, N = map(int, input().split())
mat = [[0]*W for _ in range(H)]
for _ in range(N):
a, b = map(int, input().split())
mat[a-1][b-1] = 1
dp = [[0]*(W-2) for _ in range(H)]
ran = range(W)
for h in range(H):
for a, b, c in zip(ran, ran[1:], ran[2:]):
co = mat[h][a]+mat[h][b]+mat[h][c]
dp[h... | Traceback (most recent call last):
File "/tmp/tmpir8byssh/tmp83ygbqx7.py", line 1, in <module>
H, W, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s441477800 | p04002 | u375616706 | 1548704882 | Python | Python (3.4.3) | py | Runtime Error | 3326 | 1693684 | 653 | H, W, N = map(int, input().split())
mat = [[0]*W for _ in range(H)]
for _ in range(N):
a, b = map(int, input().split())
mat[a-1][b-1] = 1
dp = [[0]*W for _ in range(H)]
for h in range(H):
cnt = 0
if mat[h][0] == 1:
dp[h][0] = 1
for w in range(1, W):
if mat[h][w] == 1:
... | Traceback (most recent call last):
File "/tmp/tmpn6kgu2of/tmpv4a7r1sr.py", line 1, in <module>
H, W, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s113961647 | p04002 | u375616706 | 1548704557 | Python | Python (3.4.3) | py | Runtime Error | 3330 | 1693556 | 653 | H, W, N = map(int, input().split())
mat = [[0]*W for _ in range(H)]
for _ in range(N):
a, b = map(int, input().split())
mat[a-1][b-1] = 1
dp = [[0]*W for _ in range(H)]
for h in range(H):
cnt = 0
if mat[h][0] == 1:
dp[h][0] = 1
for w in range(1, W):
if mat[h][w] == 1:
... | Traceback (most recent call last):
File "/tmp/tmprstana0b/tmpmv_40q1e.py", line 1, in <module>
H, W, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s776409646 | p04002 | u024809932 | 1541257620 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 888 | #include <iostream>
#include <algorithm>
#include <vector>
#include <unordered_map>
using namespace std;
int main(void){
long long h,w,n,d=1000000000,c[10]={0};
unordered_map<long long,int> m{};
cin>>h>>w>>n;
for(int i=0;i<n;i++){
long long a,b;
cin>>a>>b;
a--;
b--;
... | File "/tmp/tmplcid0wy6/tmpc8yr_p5t.py", line 5
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s403265982 | p04002 | u691493208 | 1525653761 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1211 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define UNIQUE(v) v.erase(unique(all(v)), v.end());
#define ZIP(v) sort(all(v)),UNIQUE(v)
#define repi(i,m,n) for(int i = m;i < n;i++)
#define drep(i,n,m) for(int i = n;i >= m;i--)
#define rep(i,n) repi(i,0,n)
#define rrep(i,n) repi(i,1,n+1)
#define ch... | File "/tmp/tmpm3q1c9z8/tmp0lkf8osr.py", line 2
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s570824002 | p04002 | u435281580 | 1519355726 | Python | Python (3.4.3) | py | Runtime Error | 310 | 16624 | 878 | def snuke_coloring(h, w, poses):
counts = np.zeros(10, np.int64)
searched = {}
for pos in poses:
for y in range(max(1, pos[0] - 2), min(h - 2, pos[0]) + 1):
for x in range(max(1, pos[1] - 2), min(w - 2, pos[1]) + 1):
index = (y - 1) * w + (x - 1)
if index... | Traceback (most recent call last):
File "/tmp/tmphycfd9ut/tmpw2gq7kk1.py", line 23, in <module>
h, w, n = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s190720751 | p04002 | u680619771 | 1473647110 | Python | Python (3.4.3) | py | Runtime Error | 40 | 3064 | 930 | import sys
grid = []
painted = []
height, width, n = sys.stdin.readline().strip().split()
height, width, n = int(height), int(width), int(n)
def checkGrid(x, y, grid):
count = 0
for col in range(x, x+3):
for row in range(y, y+3):
if grid[row][col] == 1:
count += 1
retur... | Traceback (most recent call last):
File "/tmp/tmp4cqsmwgi/tmpjsy4wkdv.py", line 5, in <module>
height, width, n = sys.stdin.readline().strip().split()
^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 3, got 0)
| |
s338119834 | p04003 | u401686269 | 1600981992 | Python | PyPy3 (7.3.0) | py | Runtime Error | 3332 | 862044 | 1101 | from collections import defaultdict
N,M=map(int,input().split())
if M == 0:
print(-1)
exit()
INF = 10**20
pqc = [tuple(map(lambda x:int(x)-1,input().split())) for _ in range(M)]
G = defaultdict(dict)
lines = [set() for _ in range(N)]
for p,q,c in pqc:
G[(p,c)][(q,c)] = G[(q,c)][(p,c)] = 0
lines[p].add(c)
... | Traceback (most recent call last):
File "/tmp/tmpb41uvvu7/tmppk1ff2cx.py", line 3, in <module>
N,M=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s972527330 | p04003 | u401686269 | 1600981158 | Python | Python (3.8.2) | py | Runtime Error | 3324 | 544160 | 1101 | from collections import defaultdict
N,M=map(int,input().split())
if M == 0:
print(-1)
exit()
INF = 10**20
pqc = [tuple(map(lambda x:int(x)-1,input().split())) for _ in range(N)]
G = defaultdict(dict)
lines = [set() for _ in range(N)]
for p,q,c in pqc:
G[(p,c)][(q,c)] = G[(q,c)][(p,c)] = 0
lines[p].add(c)
... | Traceback (most recent call last):
File "/tmp/tmpi3m2qmbw/tmphb8ysecg.py", line 3, in <module>
N,M=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s372568393 | p04003 | u183422236 | 1598275201 | Python | PyPy3 (7.3.0) | py | Runtime Error | 597 | 113020 | 660 | import collections
n, m = map(int, input().split())
g = [[] for _ in range(n)]
for _ in range(m):
p, q, c = map(lambda x:int(x) - 1, input().split())
g[p].append((q, c))
g[q].append((p, c))
que = collections.deque()
que.append((0, c))
cost = [float("INF")] * n
cost[0] = 0
while que:
ps, pc = que.popl... | Traceback (most recent call last):
File "/tmp/tmprxrgjb75/tmpakri2kba.py", line 3, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s213911564 | p04003 | u794173881 | 1593888534 | Python | PyPy3 (7.3.0) | py | Runtime Error | 3321 | 381964 | 1411 | import heapq
def dijkstra():
dp[sup_v][0] = 1
q = [(0, sup_v, 0)] # q = [(startからの距離, 現在地)]
while q:
d, v1, v2 = heapq.heappop(q)
if dp[v1][v2] < d:
continue
for nxt_v1, nxt_v2, cost in graph[v1][v2]:
if dp[v1][v2] + cost < dp[nxt_v1][nxt_v2]:
... | Traceback (most recent call last):
File "/tmp/tmpipj763p9/tmp5xudzawj.py", line 17, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s222981535 | p04003 | u608088992 | 1592531910 | Python | PyPy3 (7.3.0) | py | Runtime Error | 90 | 74628 | 1895 | import heapq
import sys
from collections import defaultdict
input = sys.stdin.readline
N, M = map(int, input().split())
Rails = [[] for _ in range(N)]
def constant_factory(value): return lambda: value
def solve():
Costs = defaultdict(constant_factory(1000000000))
Visited = defaultdict(constant_factory(False)... | File "/tmp/tmprxtz9ra8/tmpzphrtz3e.py", line 43
return 0
TabError: inconsistent use of tabs and spaces in indentation
| |
s960582771 | p04003 | u754022296 | 1591596377 | Python | PyPy3 (2.4.0) | py | Runtime Error | 1209 | 154624 | 678 | import sys
input = sys.stdin.readline
from collections import defaultdict, deque
n, m = map(int, input().split())
G = defaultdict(set)
seen = set()
for _ in range(n):
p, q, c = map(int, input().split())
G[(p, c)].add(((q, c), 0))
G[(q, c)].add(((p, c), 0))
G[(p, c)].add(((p, -1), 0))
G[(q, c)].add(((q, -1), ... | Traceback (most recent call last):
File "/tmp/tmpgr7nzqjj/tmptp_cd3bn.py", line 5, in <module>
n, m = map(int, input().split())
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s221327608 | p04003 | u754022296 | 1591596316 | Python | PyPy3 (2.4.0) | py | Runtime Error | 1107 | 154596 | 667 | import sys
input = sys.stdin.readline
from collections import defaultdict, deque
n, m = map(int, input().split())
G = defaultdict(set)
seen = set()
for _ in range(n):
p, q, c = map(int, input().split())
G[(p, c)].add(((q, c), 0))
G[(q, c)].add(((p, c), 0))
G[(p, c)].add(((p, -1), 0))
G[(q, c)].add(((q, -1), ... | Traceback (most recent call last):
File "/tmp/tmpgjnrqyvm/tmpc6_9r_dn.py", line 5, in <module>
n, m = map(int, input().split())
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s531554204 | p04003 | u358254559 | 1587501176 | Python | PyPy3 (2.4.0) | py | Runtime Error | 179 | 38768 | 886 | input=sys.stdin.readline
from collections import defaultdict
from heapq import heappush, heappop,heappushpop,heapify
n,m = map(int, input().split())
link = defaultdict(list)
chg=10**8
for _ in range(m):
p,q,c=map(int, input().split())
link[p].append([p+chg*c,1])
link[p+chg*c].append([p,1])
link[q+chg*c... | Traceback (most recent call last):
File "/tmp/tmpxjkw_jra/tmpa147zw3q.py", line 1, in <module>
input=sys.stdin.readline
^^^
NameError: name 'sys' is not defined
| |
s840802680 | p04003 | u358254559 | 1587499653 | Python | PyPy3 (2.4.0) | py | Runtime Error | 183 | 38640 | 382 | import sys
input=sys.stdin.readline
n,m = map(int, input().split())
link = defaultdict(list)
for _ in range(m):
p,q,c=map(int, input().split())
p-=1
q-=1
c-=1
link[(p,-1)].append([(p,c),1])
link[(p,c)].append([(p,-1),1])
link[(p,c)].append([(q,c),0])
link[(q,c)].append([(p,c),0])
lin... | Traceback (most recent call last):
File "/tmp/tmp0e7g5wb_/tmpo69u5quv.py", line 3, in <module>
n,m = map(int, input().split())
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s188482754 | p04003 | u340781749 | 1581642555 | Python | Python (3.4.3) | py | Runtime Error | 1419 | 175880 | 1110 | import sys
from collections import deque, defaultdict
def bfs01(s, t, links):
q = deque([(0, s, -1)]) # cost, station, last-company
visited = set()
while q:
d, v, e = q.popleft()
if v == t:
return d
if (v, e) in visited:
continue
visited.add((v, e))... | Traceback (most recent call last):
File "/tmp/tmpdl7iha0y/tmpipkwqo5p.py", line 35, in <module>
n, m = map(int, readline().split())
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s096665058 | p04003 | u619819312 | 1578629970 | Python | Python (3.4.3) | py | Runtime Error | 3160 | 79152 | 435 | n,m=map(int,input().split())
s=[[]for i in range(n+1)]
for j in range(m):
p,q,c=map(int,input().split())
s[p].append([q,c])
s[q].append([p,c])
l=[0]*(n+1)
l[1]=1
d=[[1,0,0]]
while not l[-1]:
a,b,c=d.pop(0)
for i,j in s[a]:
if not l[i]:
if j==b:
l[i]=c
... | Traceback (most recent call last):
File "/tmp/tmpbg40i7xz/tmpn7x2v_r7.py", line 1, in <module>
n,m=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s447660829 | p04003 | u892251744 | 1570495264 | Python | PyPy3 (2.4.0) | py | Runtime Error | 1245 | 99888 | 1229 | from collections import deque, defaultdict
import sys
input = sys.stdin.readline
N, M = map(int, input().split())
adj = [[] for _ in range(N+1)]
for _ in range(M):
p, q, c = map(int, input().split())
adj[p].append((q, c))
adj[q].append((p, c))
deq = deque()
cost = [10 ** 7] * (N+1)
seen = [0] * (N+1)
prev... | Traceback (most recent call last):
File "/tmp/tmp2obgd70k/tmpl_zxr4dx.py", line 5, in <module>
N, M = map(int, input().split())
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s796089193 | p04003 | u803848678 | 1563232721 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2563 | 218092 | 1466 | # https://juppy.hatenablog.com/entry/2019/04/10/ARC061_-_E_%E3%81%99%E3%81%AC%E3%81%91%E5%90%9B%E3%81%AE%E5%9C%B0%E4%B8%8B%E9%89%84%E6%97%85%E8%A1%8C_-_Python_%E7%AB%B6%E6%8A%80%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0_Atcoder
# 参考にさせていただきました。
from collections import deque, defaultdict
chg = 10*... | Traceback (most recent call last):
File "/tmp/tmpu976o3du/tmpw0ku1_ct.py", line 7, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s743137348 | p04003 | u729133443 | 1556966817 | Python | PyPy3 (2.4.0) | py | Runtime Error | 3168 | 303136 | 989 | from collections import*
from heapq import*
def dijkstra(s):
d=[inf]*n
used=[True]*n
d[s]=0
used[s]=False
edgelist=[]
for e in edge[s]:
heappush(edgelist,e)
while len(edgelist):
minedge=heappop(edgelist)
if not used[minedge[1]]:
continue
v=minedge[1]
d[v]=minedge[0]
used[v]=F... | Traceback (most recent call last):
File "/tmp/tmp5rtq3r82/tmpooypegux.py", line 23, in <module>
n,m,*t=map(int,open(0).read().split())
^^^^^^
ValueError: not enough values to unpack (expected at least 2, got 0)
| |
s651221053 | p04003 | u729133443 | 1556966207 | Python | PyPy3 (2.4.0) | py | Runtime Error | 3166 | 289436 | 995 | from collections import*
from heapq import*
def dijkstra(s):
d=[inf]*n
used=[True]*n
d[s]=0
used[s]=False
edgelist=[]
for e in edge[s]:
heappush(edgelist,e)
while len(edgelist):
minedge=heappop(edgelist)
if not used[minedge[1]]:
continue
v=minedge[1]
d[v]=minedge[0]
used[v]=F... | Traceback (most recent call last):
File "/tmp/tmpno9sp1lq/tmp8ld394rc.py", line 23, in <module>
n,m,*t=map(int,open(0).read().split())
^^^^^^
ValueError: not enough values to unpack (expected at least 2, got 0)
| |
s235624518 | p04003 | u729133443 | 1556965875 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2818 | 278304 | 979 | from collections import*
from heapq import*
def dijkstra(s):
d=[inf]*n
used=[True]*n
d[s]=0
used[s]=False
edgelist=[]
for e in edge[s]:
heappush(edgelist,e)
while len(edgelist):
minedge=heappop(edgelist)
if not used[minedge[1]]:
continue
v=minedge[1]
d[v]=minedge[0]
used[v]=F... | Traceback (most recent call last):
File "/tmp/tmphqt0n349/tmpy3fo1d01.py", line 23, in <module>
n,m,*t=map(int,open(0).read().split())
^^^^^^
ValueError: not enough values to unpack (expected at least 2, got 0)
| |
s650050328 | p04003 | u729133443 | 1556965347 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2160 | 244268 | 951 | from collections import*
from heapq import*
def dijkstra(s):
d=[inf]*n
used=[True]*n
d[s]=0
used[s]=False
edgelist=[]
for e in edge[s]:
heappush(edgelist,e)
while len(edgelist):
minedge=heappop(edgelist)
if not used[minedge[1]]:
continue
v=minedge[1]
d[v]=minedge[0]
used[v]=F... | Traceback (most recent call last):
File "/tmp/tmpzwvz_msk/tmpd9264ule.py", line 23, in <module>
n,m,*t=map(int,open(0).read().split())
^^^^^^
ValueError: not enough values to unpack (expected at least 2, got 0)
| |
s186239633 | p04003 | u729133443 | 1556964911 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2146 | 246888 | 931 | from collections import*
from heapq import*
def dijkstra(s):
d=[inf]*n
used=[True]*n
d[s]=0
used[s]=False
edgelist=[]
for e in edge[s]:
heappush(edgelist,e)
while len(edgelist):
minedge=heappop(edgelist)
if not used[minedge[1]]:
continue
v=minedge[1]
d[v]=minedge[0]
used[v]=F... | Traceback (most recent call last):
File "/tmp/tmp0m0mjk4t/tmpjl5ymzyg.py", line 23, in <module>
n,m,*t=map(int,open(0).read().split())
^^^^^^
ValueError: not enough values to unpack (expected at least 2, got 0)
| |
s040526336 | p04003 | u729133443 | 1556964641 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2314 | 251796 | 938 | from collections import*
from heapq import*
def dijkstra(s):
d=[float('inf')]*n
used=[True]*n
d[s]=0
used[s]=False
edgelist=[]
for e in edge[s]:
heappush(edgelist,e)
while len(edgelist):
minedge=heappop(edgelist)
if not used[minedge[1]]:
continue
v=minedge[1]
d[v]=minedge[0]
... | Traceback (most recent call last):
File "/tmp/tmp0nm6nk7j/tmplu1vsnrj.py", line 22, in <module>
n,m,*t=map(int,open(0).read().split())
^^^^^^
ValueError: not enough values to unpack (expected at least 2, got 0)
| |
s698287477 | p04003 | u368780724 | 1553032287 | Python | PyPy3 (2.4.0) | py | Runtime Error | 173 | 38384 | 892 | import sys
from collections import deque
N, M = map(int, input().split())
Edge = [[] for _ in range(N+1)]
comp = set()
for _ in range(M):
p, q, c = map(int, sys.stdin.readline().split())
Edge[p].append((q, c))
Edge[q].append((p, c))
comp.add(c)
dist = {(1, 0): 0}
Q = deque()
Q.append((1, 0))
visited = s... | File "/tmp/tmppw_x34hd/tmpd3zedy4v.py", line 22
continue
^
IndentationError: expected an indented block after 'if' statement on line 21
| |
s446321557 | p04003 | u368780724 | 1553031649 | Python | Python (3.4.3) | py | Runtime Error | 3169 | 204376 | 820 | import sys
from collections import deque
N, M = map(int, input().split())
Edge = [[] for _ in range(N+1)]
comp = set()
for _ in range(M):
p, q, c = map(int, sys.stdin.readline().split())
Edge[p].append((q, c))
Edge[q].append((p, c))
comp.add(c)
dist = {(1, 0): 0}
Q = deque()
Q.append((1, 0))
visited = s... | Traceback (most recent call last):
File "/tmp/tmp4zjxa334/tmprvx8mqv0.py", line 3, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s047606489 | p04003 | u368780724 | 1553031616 | Python | PyPy3 (2.4.0) | py | Runtime Error | 3171 | 240380 | 820 | import sys
from collections import deque
N, M = map(int, input().split())
Edge = [[] for _ in range(N+1)]
comp = set()
for _ in range(M):
p, q, c = map(int, sys.stdin.readline().split())
Edge[p].append((q, c))
Edge[q].append((p, c))
comp.add(c)
dist = {(1, 0): 0}
Q = deque()
Q.append((1, 0))
visited = s... | Traceback (most recent call last):
File "/tmp/tmpz6dpuwif/tmpyw550kx1.py", line 3, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s242660882 | p04003 | u631277801 | 1550278944 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2485 | 259124 | 2350 | import sys
stdin = sys.stdin
sys.setrecursionlimit(10**7)
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip(... | Traceback (most recent call last):
File "/tmp/tmp34b6uqmi/tmpv88ot2g5.py", line 56, in <module>
n,m = li()
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s479356914 | p04003 | u631277801 | 1550278147 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2467 | 185772 | 2392 | import sys
stdin = sys.stdin
sys.setrecursionlimit(10**7)
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip(... | Traceback (most recent call last):
File "/tmp/tmpjcp1mdps/tmpkpy__l8e.py", line 53, in <module>
n,m = li()
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s063981454 | p04003 | u631277801 | 1550277776 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2070 | 163056 | 2584 | import sys
stdin = sys.stdin
sys.setrecursionlimit(10**7)
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip(... | Traceback (most recent call last):
File "/tmp/tmprltkvjk6/tmp7qbwhxi9.py", line 53, in <module>
n,m = li()
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s911821410 | p04003 | u236127431 | 1545250339 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2204 | 232564 | 808 | from collections import defaultdict,deque
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
N,M=map(int,input().split())
if M==0:
print(-1)
exit()
G=defaultdict(set)
for i in range(M):
a,b,c=map(int,input().split())
G[a+(c<<30)].add(b+(c<<30))
G[b+(c<<30)].add(a+(c<<30))
G[a].add(a+(c<<30))
... | Traceback (most recent call last):
File "/tmp/tmpjf5frdi3/tmpde5r52j9.py", line 5, in <module>
N,M=map(int,input().split())
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s723047080 | p04003 | u236127431 | 1545250098 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2065 | 232564 | 779 | from collections import defaultdict,deque
import sys
input=sys.stdin.readline
N,M=map(int,input().split())
if M==0:
print(-1)
exit()
G=defaultdict(set)
for i in range(M):
a,b,c=map(int,input().split())
G[a+(c<<30)].add(b+(c<<30))
G[b+(c<<30)].add(a+(c<<30))
G[a].add(a+(c<<30))
G[b].add(b+(c<<30))
G[a+(c... | Traceback (most recent call last):
File "/tmp/tmpp4lwtur6/tmpi2ldcprr.py", line 4, in <module>
N,M=map(int,input().split())
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s479146398 | p04003 | u236127431 | 1545249539 | Python | PyPy3 (2.4.0) | py | Runtime Error | 1979 | 216064 | 761 | from collections import defaultdict,deque
import sys
input=sys.stdin.readline
N,M=map(int,input().split())
if M==0:
print(-1)
exit()
G=defaultdict(set)
for i in range(M):
a,b,c=map(int,input().split())
G[a+c<<30].add(b+c<<30)
G[b+c<<30].add(a+c<<30)
G[a].add(a+c<<30)
G[b].add(b+c<<30)
G[a+c<<30].add(a)
... | Traceback (most recent call last):
File "/tmp/tmpkbwsdowu/tmpssrxw7s1.py", line 4, in <module>
N,M=map(int,input().split())
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s753061269 | p04003 | u236127431 | 1545245466 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2774 | 292460 | 829 | from collections import defaultdict,deque
import sys
input=sys.stdin.readline
N,M=map(int,input().split())
G=defaultdict(set)
for i in range(M):
a,b,c=map(int,input().split())
G[(a-1,c-1)].add((b-1,c-1))
G[(b-1,c-1)].add((a-1,c-1))
G[(a-1,-1)].add((a-1,c-1))
G[(b-1,-1)].add((b-1,c-1))
G[(a-1,c-1)].add((a-1,... | Traceback (most recent call last):
File "/tmp/tmpajt_5yt1/tmp_ii0ihv_.py", line 4, in <module>
N,M=map(int,input().split())
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s443834586 | p04003 | u236127431 | 1545240536 | Python | PyPy3 (2.4.0) | py | Runtime Error | 3171 | 287852 | 806 | from collections import defaultdict,deque
import sys
input=sys.stdin.readline
N,M=map(int,input().split())
G=defaultdict(set)
for i in range(M):
a,b,c=map(int,input().split())
G[(a-1,c-1)].add((b-1,c-1))
G[(b-1,c-1)].add((a-1,c-1))
G[(a-1,-1)].add((a-1,c-1))
G[(b-1,-1)].add((b-1,c-1))
G[(a-1,c-1)].add((a-1,... | Traceback (most recent call last):
File "/tmp/tmp71cu71mw/tmpqwslajkf.py", line 4, in <module>
N,M=map(int,input().split())
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s858940406 | p04003 | u075012704 | 1535465421 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2834 | 286504 | 2166 | from collections import defaultdict
import heapq
N, M = map(int, input().split())
D = {}
Edges = []
Edge_dict = {}
class UnionFind:
def __init__(self, n):
self.par = [i for i in range(n)]
self.rank = [0] * n
# 検索
def find(self, x):
if self.par[x] == x:
return x
... | Traceback (most recent call last):
File "/tmp/tmpp1rz5g69/tmpbs4vexj7.py", line 4, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s826861239 | p04003 | u180908266 | 1529881376 | Python | Python (3.4.3) | py | Runtime Error | 2463 | 213896 | 1566 | from collections import deque
N, M = map(int, input().split())
if M == 0:
print(-1)
exit()
F_C_of_S = [{} for i in range(N)]
# Companies of Station
C_of_S = {}
# def Union-find
parent = {i:i for i in range(M)}
def root(x):
if x == parent[x]:
return x
parent[x] = y = root(parent[x])
return ... | Traceback (most recent call last):
File "/tmp/tmpzjvqdnoa/tmpx4vml2r6.py", line 3, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s861248931 | p04003 | u180908266 | 1529859607 | Python | Python (3.4.3) | py | Runtime Error | 2554 | 186312 | 1802 | from collections import deque
N, M = map(int, input().split())
F_C_of_S = [{} for i in range(N)]
#Companies of Station
C_of_S = {}
#def Union-find
parent = [-1]*M
def root(x):
if (parent[x] < 0): return x
else:
parent[x] = y = root(parent[x])
return y
def unite(x, y):
px = root(x)
py = root(y)
if (px == py):... | Traceback (most recent call last):
File "/tmp/tmp9sl47t9t/tmpna30skca.py", line 2, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s569342838 | p04003 | u180908266 | 1529803596 | Python | Python (3.4.3) | py | Runtime Error | 1965 | 125600 | 1753 | from collections import deque
N, M = map(int, input().split())
F_C_of_S = [{} for i in range(N)]
#Companies of Station
C_of_S = {}
#def Union-find
parent = [-1]*M
def root(x):
if (parent[x] < 0): return x
else:
parent[x] = y = root(parent[x])
return y
def unite(x, y):
px = root(x)
py = root(y)
if (px == py):... | Traceback (most recent call last):
File "/tmp/tmp02ldub81/tmpvej4srue.py", line 2, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s293986699 | p04003 | u180908266 | 1529717342 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 692 | from heapq import heappop, heappush
N,M = map(int, input().split())
edges = [[] for _ in range(N)]
cs = set{}
for i in range(M):
p,q,c = map(int, input().split())
cs += c
edges[p-1] += [[q-1, c]]
edges[q-1] += [[p-1, c]]
c_num = len(cs)
distance = [[float('inf')]*(c_num+1) for _ in range(N)]
distance[0][0] = 0
min_... | File "/tmp/tmprhd9jkj2/tmpevadexs8.py", line 4
cs = set{}
^
SyntaxError: invalid syntax
| |
s579180862 | p04003 | u180908266 | 1529716680 | Python | Python (3.4.3) | py | Runtime Error | 3699 | 1615072 | 757 | from collections import deque
N,M = map(int, input().split())
edges = [[] for _ in range(N)]
c_max = 0
for i in range(M):
p,q,c = map(int, input().split())
c_max = max(c, c_max)
edges[p-1] += [[q-1, c]]
edges[q-1] += [[p-1, c]]
distance = [[float('inf')]*(c_max+1) for _ in range(N)]
distance[0][0] = 0
min_distance ... | Traceback (most recent call last):
File "/tmp/tmpoo1p9287/tmp0rg3nd3s.py", line 2, in <module>
N,M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s277314546 | p04003 | u180908266 | 1529716456 | Python | Python (3.4.3) | py | Runtime Error | 3284 | 1615080 | 679 | from collections import deque
N,M = map(int, input().split())
edges = [[] for _ in range(N)]
c_max = 0
for i in range(M):
p,q,c = map(int, input().split())
c_max = max(c, c_max)
edges[p-1] += [[q-1, c]]
edges[q-1] += [[p-1, c]]
distance = [[float('inf')]*(c_max+1) for _ in range(N)]
distance[0][0] = 0
Q = deque([[0... | Traceback (most recent call last):
File "/tmp/tmpdbvwhi9c/tmp4526coyu.py", line 2, in <module>
N,M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s591339347 | p04003 | u180908266 | 1529716418 | Python | Python (3.4.3) | py | Runtime Error | 3380 | 1873872 | 675 | from collections import deque
N,M = map(int, input().split())
edges = [[] for _ in range(N)]
c_max = 0
for i in range(M):
p,q,c = map(int, input().split())
c_max = max(c, c_max)
edges[p-1] += [[q-1, c]]
edges[q-1] += [[p-1, c]]
distance = [[float('inf')]*(c+1) for _ in range(N)]
distance[0][0] = 0
Q = deque([[0,0]]... | Traceback (most recent call last):
File "/tmp/tmpv1p_2xrf/tmp2e6bj24l.py", line 2, in <module>
N,M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s435197331 | p04003 | u180908266 | 1529700215 | Python | Python (3.4.3) | py | Runtime Error | 3170 | 289676 | 1157 | from collections import deque
N,M = map(int, input().split())
if M == 0:
print(-1)
exit()
Q = {0:deque([1])}
distance = {1:0}
#辺へ重み付け
edges = {}
for _ in range(M):
p,q,c = map(int, input().split())
edge = {}
edge[c*10**6+q] = 0
edge[p] = 0
edges.setdefault(c*10**6+p, {})
edges[c*10**6+p].update(edge)
edge = {... | Traceback (most recent call last):
File "/tmp/tmpa5he2die/tmpx98y6hks.py", line 2, in <module>
N,M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s137441303 | p04003 | u180908266 | 1529692450 | Python | Python (3.4.3) | py | Runtime Error | 3170 | 267120 | 1175 | from collections import deque
N,M = map(int, input().split())
if M == 0:
print(-1)
exit()
Q = {0:deque([1])}
distance = {1:0}
#辺へ重み付け
edges = {}
for p,q,c in (list(map(int, input().split())) for _ in range(M)):
edge = {}
edge[c*10**6+q] = 0
edge[p] = 0
edges.setdefault(c*10**6+p, {})
edges[c*10**6+p].upda... | Traceback (most recent call last):
File "/tmp/tmpp0x6pk3c/tmpabdi3ha4.py", line 2, in <module>
N,M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s183394629 | p04003 | u180908266 | 1529556723 | Python | Python (3.4.3) | py | Runtime Error | 3614 | 2002640 | 1456 | N,M = map(int, input().split())
if M == 0:
print(-1)
exit()
pqcs = [list(map(int, input().split())) for _ in range(M)]
c_max = max(list(map(lambda x: x[2],pqcs)))
node_num = (c_max+1)*N
unsearached_nodes = list(range(node_num))#0~N-1(n-1)が乗換経由ノード/路線iの駅nは3*i+(n-1)番ノード
#opt_nodes = [-1]*node_num
distance = [float... | Traceback (most recent call last):
File "/tmp/tmpb31oe79_/tmpbdjk_u_c.py", line 1, in <module>
N,M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s315008567 | p04003 | u180908266 | 1529556427 | Python | Python (3.4.3) | py | Runtime Error | 5656 | 2002640 | 1404 | N,M = map(int, input().split())
if M == 0:
print(-1)
exit()
pqcs = [list(map(int, input().split())) for _ in range(M)]
c_max = max(list(map(lambda x: x[2],pqcs)))
node_num = (c_max+1)*N
unsearached_nodes = list(range(node_num))#0~N-1(n-1)が乗換経由ノード/路線iの駅nは3*i+(n-1)番ノード
#opt_nodes = [-1]*node_num
distance = [float... | Traceback (most recent call last):
File "/tmp/tmp7l5zg8z4/tmphsnjb5at.py", line 1, in <module>
N,M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s556250449 | p04003 | u180908266 | 1529556319 | Python | Python (3.4.3) | py | Runtime Error | 3758 | 2002900 | 1412 | N,M = map(int, input().split())
"""
if M == 0:
print(-1)
exit()
"""
pqcs = [list(map(int, input().split())) for _ in range(M)]
c_max = max(list(map(lambda x: x[2],pqcs)))
node_num = (c_max+1)*N
unsearached_nodes = list(range(node_num))#0~N-1(n-1)が乗換経由ノード/路線iの駅nは3*i+(n-1)番ノード
#opt_nodes = [-1]*node_num
distance ... | Traceback (most recent call last):
File "/tmp/tmpylu0q3ju/tmp2_cbfyld.py", line 1, in <module>
N,M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s127124546 | p04003 | u180908266 | 1529556232 | Python | Python (3.4.3) | py | Runtime Error | 3705 | 2002768 | 1411 | N,M = map(int, input().split())
"""
if M == 0:
print(-1)
exit()
"""
pqcs = [list(map(int, input().split())) for _ in range(M)]
c_max = max(list(map(lambda x: x[2],pqcs)))
node_num = (c_max+1)*N
unsearached_nodes = list(range(node_num))#0~N-1(n-1)が乗換経由ノード/路線iの駅nは3*i+(n-1)番ノード
#opt_nodes = [-1]*node_num
distance ... | Traceback (most recent call last):
File "/tmp/tmpuhvpw4li/tmpuojxhj2r.py", line 1, in <module>
N,M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s010712249 | p04003 | u180908266 | 1529555497 | Python | Python (3.4.3) | py | Runtime Error | 4712 | 2002896 | 1346 | N,M = map(int, input().split())
if M == 0:
print(-1)
exit()
pqcs = [list(map(int, input().split())) for _ in range(M)]
c_max = max(list(map(lambda x: x[2],pqcs)))
node_num = (c_max+1)*N
unsearached_nodes = list(range(node_num))#0~N-1(n-1)が乗換経由ノード/路線iの駅nは3*i+(n-1)番ノード
#opt_nodes = [-1]*node_num
distance = [float... | Traceback (most recent call last):
File "/tmp/tmpi7b6citk/tmpzsmcr9_d.py", line 1, in <module>
N,M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s605573397 | p04003 | u898651494 | 1520666331 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 3732 | #include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
using namespace std;
using ll = long long;
us... | File "/tmp/tmpgsnn5if8/tmptt6mkuxm.py", line 17
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s443598302 | p04003 | u435281580 | 1519677926 | Python | Python (3.4.3) | py | Runtime Error | 3179 | 307652 | 573 | import numpy as np
N, M = map(int, input().split())
routes = np.array([list(map(int, input().split())) for _ in range(M)], 'i')
queue = [(1, 0, 0)]
dist = np.zeros(N + 1, 'i')
dist[:] = 10000
while len(queue) > 0:
start, lastm, cost = queue[0]
del queue[0]
if start == N:
print(cost)
exit()... | Traceback (most recent call last):
File "/tmp/tmppo8z6b0y/tmpl6jtl3lp.py", line 3, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s753859761 | p04003 | u435281580 | 1519677032 | Python | Python (3.4.3) | py | Runtime Error | 3180 | 331532 | 462 | import numpy as np
N, M = map(int, input().split())
routes = np.array([list(map(int, input().split())) for _ in range(M)], 'i')
queue = [(1, 0, 0)]
while len(queue) > 0:
start, lastm, cost = queue[0]
del queue[0]
if start == N:
print(cost)
exit()
for (f, t, m) in routes[routes[:, 0] =... | Traceback (most recent call last):
File "/tmp/tmptcxfeen9/tmp7zr7pulf.py", line 3, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s664043234 | p04003 | u435281580 | 1519676266 | Python | Python (3.4.3) | py | Runtime Error | 3163 | 69444 | 595 | import numpy as np
N, M = map(int, input().split())
routes = np.array([list(map(int, input().split())) for _ in range(M)], 'i')
# i駅まで到達したときの最小コスト(最終電車がjで示される)
dp = [{} for _ in range(N + 1)]
dp[1][0] = 0
for i in range(2, N + 1):
for (f, t, m) in routes[routes[:, 1] == i]:
if m in dp[f]:
dp[... | Traceback (most recent call last):
File "/tmp/tmpa9k79flu/tmpfneo9m3n.py", line 3, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s852151449 | p04003 | u435281580 | 1519674454 | Python | Python (3.4.3) | py | Runtime Error | 3189 | 1600312 | 584 | import numpy as np
N, M = map(int, input().split())
routes = np.array([list(map(int, input().split())) for _ in range(M)], 'i')
#print(routes)
# i駅まで到達したときの最小コスト(最終電車がjで示される)
dp = np.zeros((N + 1, M + 1), 'i')
dp[:, :] = 10000
dp[1, 0] = 0
for i in range(2, N + 1):
for (f, t, m) in routes:
if t != i:
... | Traceback (most recent call last):
File "/tmp/tmpe6xklbu0/tmpcwq8k83k.py", line 3, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s754363807 | p04003 | u435281580 | 1519674408 | Python | Python (3.4.3) | py | Runtime Error | 3182 | 1600344 | 583 | import numpy as np
N, M = map(int, input().split())
routes = np.array([list(map(int, input().split())) for _ in range(M)], 'i')
print(routes)
# i駅まで到達したときの最小コスト(最終電車がjで示される)
dp = np.zeros((N + 1, M + 1), 'i')
dp[:, :] = 10000
dp[1, 0] = 0
for i in range(2, N + 1):
for (f, t, m) in routes:
if t != i:
... | Traceback (most recent call last):
File "/tmp/tmpj6aryibp/tmpljmn4atd.py", line 3, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s774543354 | p04004 | u100858029 | 1562436209 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1045 | #include<iostream>
#define MOD 1000000007
#define N 1000
using namespace std;
typedef long long LL;
LL mod_pow(LL base, LL exp)
{
if(exp==0) return 1;
if(exp&1) return (mod_pow(base,exp-1)*base)%MOD;
else return mod_pow((base*base)%MOD,exp/2);
}
LL fac[3*N+1];
LL fac_inv[3*N+1];
LL C(LL n, LL k)
{
if(k < 0 || n < k... | File "/tmp/tmpdnyfu2j9/tmpyt2brupr.py", line 4
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s034516980 | p04004 | u089230684 | 1538857794 | Python | Python (3.4.3) | py | Runtime Error | 3156 | 3188 | 383 | mod=int(1E9+7)
JS=[1]
for i in range(1,5000):
JS.append(JS[-1]*i%mod)
Cs=lambda x,y:js(x)*inv(js(y))*inv(js(x-y))%mod
inv =lambda x:pow(x,mod-2,mod)
js=lambda x:JS[x]
#while True:
A,B,C=map(int,input().split())
A-=1;B+=1;C+=1;
ans=0
for x in range(1,B+1):
for y in range(1,C+1):
ans+=Cs(A+B-x+C-y,A)*Cs(B... | Traceback (most recent call last):
File "/tmp/tmp0aur5ffi/tmpxphoxj9y.py", line 9, in <module>
A,B,C=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s874727383 | p04004 | u863370423 | 1538857702 | Python | Python (3.4.3) | py | Runtime Error | 3156 | 3188 | 383 | mod=int(1E9+7)
JS=[1]
for i in range(1,4000):
JS.append(JS[-1]*i%mod)
Cs=lambda x,y:js(x)*inv(js(y))*inv(js(x-y))%mod
inv =lambda x:pow(x,mod-2,mod)
js=lambda x:JS[x]
#while True:
A,B,C=map(int,input().split())
A-=1;B+=1;C+=1;
ans=0
for x in range(1,B+1):
for y in range(1,C+1):
ans+=Cs(A+B-x+C-y,A)*Cs(B... | Traceback (most recent call last):
File "/tmp/tmp2lu34zwp/tmpxegyrma_.py", line 9, in <module>
A,B,C=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s952328387 | p04005 | u468972478 | 1599785033 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9100 | 124 | s = sorted(list(map(int, input().split())))
a = s.pop(-1)
b,c = a // 2, a - (a//2)
d = s[0] * a[1]
print(abs(d * b - d * c)) | Traceback (most recent call last):
File "/tmp/tmp6kpvtsu2/tmpn9ny8l4r.py", line 1, in <module>
s = sorted(list(map(int, input().split())))
^^^^^^^
EOFError: EOF when reading a line
| |
s442961607 | p04005 | u547537397 | 1593489059 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9044 | 252 | import sys
input = sys.stdin.readline
def linput(ty=int, cvt=list):
return cvt(map(ty,input().split()))
def gcd(a: int, b: int):
while b: a, b = b, a%b
return a
def lcm(a: int, b: int):
return a * b // gcd(a, b)
def main():
#n=int(input()) | File "/tmp/tmpvw4gsd65/tmpfb6009pd.py", line 15
#n=int(input())
IndentationError: expected an indented block after function definition on line 14
| |
s714040157 | p04005 | u131453093 | 1593376777 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9032 | 197 | A, B, C = map(int, input().split())
if any(i % 2 == 0 for i in [A, B, C]):
print(0)
else:
AB = A * B
lis = [AB] * C
mid = len(lis) // 2
print(sum(lis[mid:]) - sum(lis[0:mid]))
| Traceback (most recent call last):
File "/tmp/tmpae4gpn7s/tmpht94yw8j.py", line 1, in <module>
A, B, C = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s436471343 | p04005 | u556589653 | 1593314873 | Python | PyPy3 (7.3.0) | py | Runtime Error | 96 | 74332 | 66 | a,b,c = map(int,input().split())
print(min(B * C,C * A,A * B)) | File "/tmp/tmp3f0lf7cg/tmpoes12_t7.py", line 2
print(min(B * C,C * A,A * B))
^
SyntaxError: invalid character ',' (U+FF0C)
| |
s506737742 | p04005 | u322171361 | 1592254203 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 80 | a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
a,b,c=[a,b,c].sort()
print(a*b) | Traceback (most recent call last):
File "/tmp/tmp2x77gfmg/tmpvpcuga91.py", line 1, in <module>
a,b,c=input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s903013426 | p04005 | u961683878 | 1591593071 | Python | Python (2.7.6) | py | Runtime Error | 224 | 16264 | 396 | #! /usr/bin/env python3
import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)
A, B, C = map(int, readline().split())
if (A % 2 == 0) or (B % 2 == 0) or (C % 2 == 0):
print(0)... | Traceback (most recent call last):
File "/tmp/tmpyyv_9ly0/tmpecywe_57.py", line 11, in <module>
A, B, C = map(int, readline().split())
^^^^^^^
ValueError: not enough values to unpack (expected 3, got 0)
| |
s844579471 | p04005 | u810288681 | 1590103493 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 127 | l = sorted(list(map((int, input().split()))))
ans = 0
if l[0]%2!=0 and l[1]%2!=0 and l[2]%2!=0:
ans += l[0]*l[1]
print(ans) | Traceback (most recent call last):
File "/tmp/tmpbogy933k/tmphwid4prh.py", line 1, in <module>
l = sorted(list(map((int, input().split()))))
^^^^^^^
EOFError: EOF when reading a line
| |
s116251230 | p04005 | u026788530 | 1589904058 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 115 | a=[int(_) for i in range(n)]
if a[0]%2==0 or a[1]%2==0 or a[2]%2==0:
print(0)
else:
a.sort()
print(a[0]*a[1]) | Traceback (most recent call last):
File "/tmp/tmpnnhys04x/tmplihaslqi.py", line 1, in <module>
a=[int(_) for i in range(n)]
^
NameError: name 'n' is not defined
| |
s556267653 | p04005 | u252828980 | 1588794407 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 134 | a,b,c = list(map(int,input().split()))
if any([i%2==0 for i in (a,b,c)]):
print(0)
else:
ans = min(a*b , c*b , a*c)
print(ans) | Traceback (most recent call last):
File "/tmp/tmpg04sfpqc/tmp7up1jwdo.py", line 1, in <module>
a,b,c = list(map(int,input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s446199180 | p04005 | u252828980 | 1588794025 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 200 | a,b,c = list(map(int,input().split()))
if any([i%2==0 for i in (a,b,c)]):
print(0)
else:
ans = min(a*b*(c//2+1) - a*b*(c//2) , c*b*(a//2+1) - c*b*(a//2) , a*c*(b//2+1) - a*c*(b//2))
print(ans) | Traceback (most recent call last):
File "/tmp/tmpj646dr__/tmpvzs5ghgn.py", line 1, in <module>
a,b,c = list(map(int,input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s811185887 | p04005 | u309141201 | 1587861668 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38640 | 286 | A, B, C = map(int, input().split())
if (A * B * C) % 2 == 0:
ans = 0
else:
V = A*B*C
AB = A*B
BC = B*C
CA = C*A
ans = min(V-(A//2)*BC, V-((A//2) + 1)*BC)
ans = min(V-(B//2)*CA, V-((B//2) + 1)*CA)
ans = min(V-(C//2)*AB, V-((C//2) + 1)*AB)
print(V - 2*ans) | Traceback (most recent call last):
File "/tmp/tmp7iiqeyt7/tmp18bxtuww.py", line 1, in <module>
A, B, C = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s969846267 | p04005 | u368563078 | 1587484022 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 164 | A,B,C = map(int,input())
num_list = [A,B,C]
list_s = sorted(num_list)
if A % 2 == 1 and B % 2 == 1 and C % 2 == 1:
print(list_s[0]*list_s[1])
else:
print(0) | Traceback (most recent call last):
File "/tmp/tmpuazhr5v4/tmp5u8pw9de.py", line 1, in <module>
A,B,C = map(int,input())
^^^^^^^
EOFError: EOF when reading a line
| |
s435884578 | p04005 | u368563078 | 1587483958 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 171 | A,B,C = map(int,input())
num_list = [A,B,C]
list_s = sorted(num_list)
if A % 2 == 1 and B % 2 == 1 and C % 2 == 1:
print(list_s[0]*list_s[1])
else:
print(0)
| File "/tmp/tmphsfpv05u/tmp5cstuy1d.py", line 3
list_s = sorted(num_list)
IndentationError: unexpected indent
| |
s993966385 | p04005 | u746428948 | 1587149937 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 702 | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
#define rrep(i,n) for(int i=1; i<=(int)(n); i++)
#define pb push_back
#define all(v) v.begin(),v.end()
#define fi first
#define se second
#define bigger (char)toupper
#define smaller (char)tolower
using namespace std;
typedef pair<int,int> pii;
typedef ... | File "/tmp/tmpdysdkh2a/tmp3es1fhkw.py", line 10
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s534081873 | p04005 | u098982053 | 1585506429 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 300 | Cube = [int(i) for i in input().split(" ")]
# 一番長い辺で切れば断面の数は最小
L = max(Cube)
plane = [i for i in Cube if i!=L]
if len(plane)==0:
A = L
B = L
elif len(plane)==1:
A = plane[0]
B = L
else:
A,B = map(int,plabe)
print(abs((A*B*(L//2))-(A*B*(L-(L//2))))) | Traceback (most recent call last):
File "/tmp/tmpira2n555/tmp5d702vkc.py", line 1, in <module>
Cube = [int(i) for i in input().split(" ")]
^^^^^^^
EOFError: EOF when reading a line
| |
s835226544 | p04005 | u098982053 | 1585506133 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 192 | Cube = [int(i) for i in input().split(" ")]
# 一番長い辺で切れば断面の数は最小
L = max(Cube)
A,B = map(int,[i for i in Cube if i!=L])
print(abs((A*B*(L//2))-(A*B*(L-(L//2))))) | Traceback (most recent call last):
File "/tmp/tmpv4t31vwq/tmptv4dytju.py", line 1, in <module>
Cube = [int(i) for i in input().split(" ")]
^^^^^^^
EOFError: EOF when reading a line
| |
s299925517 | p04005 | u835924161 | 1583748439 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 110 | a,b,c=map(int,input().split())
if a%2==0 or b%2==0 or c%2==0:
print(0)
exit()
print(min[a*b,b*c,c*a]) | Traceback (most recent call last):
File "/tmp/tmp_0wpzhla/tmp2kiwa4b_.py", line 1, in <module>
a,b,c=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s849433957 | p04005 | u693716675 | 1583556488 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 155 | a,b,c = [int(i) for i in input().split()]
if (a*b*c)%2==0:
print(0)
else:
ans = a*b
ans = min(ans, b*c)
ans = min(aans, c*a)
print(ans) | Traceback (most recent call last):
File "/tmp/tmpsv2peo97/tmp7sg9yr1u.py", line 1, in <module>
a,b,c = [int(i) for i in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s275727255 | p04005 | u252828980 | 1575689170 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 394 | a,b,c = map(int,input().split())
p = any((a%2 == 0,b%2 == 0,c%2 == 0))
if p:
print(0)
else:
L = []
for i in range(a//2,a//2+2):
L.append(i*b*c)
aa = abs(L[0]-L[1])
L = []
for j in range(b//2,b//2+2):
L.append(j*a*c)
bb = abs(L[0]-L[1])
L = []
for k in range(c//2,c//2... | Traceback (most recent call last):
File "/tmp/tmpp0l0otvh/tmpbx69zk6r.py", line 1, in <module>
a,b,c = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s034724514 | p04005 | u754022296 | 1573265653 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 117 | a, b, c = map(int, input().split())
if a%2 and b%2 and c%2:
l = sorted(a, b, c)
print(l[0]*l[1])
else:
print(0) | Traceback (most recent call last):
File "/tmp/tmp1oqg57l2/tmpopav98ft.py", line 1, in <module>
a, b, c = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s979365264 | p04005 | u204236873 | 1560577191 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 660 | if __name__ == "__main__":
N, x = input().split(" ")
N = int(N)
x = int(x)
a = []
for e in input().split(" "):
a.append(int(e))
min_cost = []
for i in range(N):
min_cost.append([0] * N)
min_total_cost = -1
for k in range(N):
temp_sum = 0
if k==0:
for i in range(N):
min_cost[k][i] = a[i]
te... | Traceback (most recent call last):
File "/tmp/tmpvudocbgu/tmpt9biam2t.py", line 2, in <module>
N, x = input().split(" ")
^^^^^^^
EOFError: EOF when reading a line
| |
s494821604 | p04005 | u623687794 | 1557718590 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | a=list(map(int,input().split()))
a.sort()
if a%2!=0 and b%2!=0 and c%2!=0:
print(a[0]*a[1])
else:
print("0")
| Traceback (most recent call last):
File "/tmp/tmp4765amhf/tmpr6i6z7th.py", line 1, in <module>
a=list(map(int,input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s964849111 | p04005 | u623687794 | 1557718522 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 112 | a=list(map(int,input().split()))
a.sort()
if a%2!=0 and b%2!=0 and c%2!=0:
print(a[0]*a[1])
elif:
print("0") | File "/tmp/tmp9y8wmpfa/tmpcg6ep8wc.py", line 5
elif:
^
SyntaxError: invalid syntax
| |
s480796509 | p04005 | u507116804 | 1557718284 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 111 | a,b,c=map(int,input().split())
m=a*b*c
k=max(a,b,c)
if m%2==0:
print(int(0))
else:
h=m/k
print(int((h)) | File "/tmp/tmpc5c5_c_i/tmpsj2_5e6j.py", line 10
print(int((h))
^
SyntaxError: '(' was never closed
| |
s447316080 | p04005 | u507116804 | 1557717757 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 126 | a,b,c=map(int,input().split())
m=a*b*c
k=max(a,b,c)
if m%2==0:
print(int(0))
else:
n=k//2
h=m/k
print(int((k-2n)*h)) | File "/tmp/tmp_2rrf95j/tmpry5t1hv2.py", line 11
print(int((k-2n)*h))
^
SyntaxError: invalid decimal literal
| |
s631290542 | p04005 | u227082700 | 1553833804 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | a=list(int,input().split());a.sort();s=a[0]*a[1]
if (a[2]*s)%2==0:print(0)
else:print(s) | Traceback (most recent call last):
File "/tmp/tmprxbngyml/tmpk0q0xjbu.py", line 1, in <module>
a=list(int,input().split());a.sort();s=a[0]*a[1]
^^^^^^^
EOFError: EOF when reading a line
| |
s190317035 | p04005 | u394721319 | 1552782742 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3316 | 165 | li = [int(i) for i in input().split()]
for i in li:
if i%2 == 0:
print(0)
exit()
li.pop(max(li))
ans = 1
for i in li:
ans *= i
print(ans)
| Traceback (most recent call last):
File "/tmp/tmp2hhr_g1i/tmpyymy1ck2.py", line 1, in <module>
li = [int(i) for i in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s913342716 | p04005 | u263933075 | 1549821610 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 149 | s=input().split();a,b,c=int(s[0]),int(s[1]),int(s[2])
ma,mi=max(a,b,c),min(a,b,c);me=sum(a,b,c)-ma-mi
if ma%2==0:
print(0)
else:
print(mi*me) | Traceback (most recent call last):
File "/tmp/tmpmnoimy49/tmp8mcmh6bi.py", line 1, in <module>
s=input().split();a,b,c=int(s[0]),int(s[1]),int(s[2])
^^^^^^^
EOFError: EOF when reading a line
| |
s309691044 | p04005 | u459233539 | 1546475161 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 63 | a,b,c=map(int,input().split())
print(min(a%*b*c,b%*a*c,c%*a*b)) | File "/tmp/tmpk6155wb_/tmpa7x980ot.py", line 2
print(min(a%*b*c,b%*a*c,c%*a*b))
^
SyntaxError: invalid syntax
| |
s634536664 | p04005 | u459233539 | 1546475097 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 70 |
a,b,c=map(int,input().split())
print(min((a%)*b*c,a*(b%)*c,a*b*(c%))) | File "/tmp/tmpub0iu6nm/tmpv3jx6nrb.py", line 3
print(min((a%)*b*c,a*(b%)*c,a*b*(c%)))
^
SyntaxError: invalid syntax
| |
s916052211 | p04005 | u459233539 | 1546475061 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 63 | a,b,c=map(int,input().split())
print(min(a%*b*c,a*b%*c,a*b*c%)) | File "/tmp/tmp0jx_l_wp/tmpwef_7cqb.py", line 2
print(min(a%*b*c,a*b%*c,a*b*c%))
^
SyntaxError: invalid syntax
| |
s475049765 | p04005 | u311944296 | 1542796102 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 504 | #include <bits/stdc++.h>
using namespace std;
typedef long long int64;
int64 a, b, c, ans = LLONG_MAX;
void calc(int64 a, int64 b, int64 c) {
int64 r = a / 2;
for(int64 i = max(1LL, r - 5); i <= min(r + 5, a - 1); i++) {
int64 v1 = i * b * c;
int64 v2 = (a - i) * b * c;
ans = min(ans, llabs(v1 - v2));
}
}
... | File "/tmp/tmpmjuscqke/tmplxflv1su.py", line 11
for(int64 i = max(1LL, r - 5); i <= min(r + 5, a - 1); i++) {
^
SyntaxError: invalid decimal literal
| |
s362840031 | p04005 | u311944296 | 1542795914 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 455 | from math import *
a, b, c = map(int, input().split())
def calc(a, b, c):
r = sqrt(a)
ans = a * b * c
for i in range(max(1, r - 5), min(r + 5, a - 1) + 1):
v1 = i * b * c
v2 = (a - i) * b * c
ans = min(ans, abs(v1 - v2))
return ans
res = a * b * c
res = min(res, calc(a, b, c))
res = min(res, calc(a, c, ... | Traceback (most recent call last):
File "/tmp/tmp9g81ou0u/tmpt48w9hdo.py", line 3, in <module>
a, b, c = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s801701820 | p04005 | u884982181 | 1541732213 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 111 | a = list(map(int,input().split()))
a.sort()
for i in a:
if a%2 == 0:
print(0)
exit()
print(a[0]*a[1]) | Traceback (most recent call last):
File "/tmp/tmpwr8slptc/tmps2625nvk.py", line 1, in <module>
a = list(map(int,input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s607652352 | p04005 | u333139319 | 1539111550 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 124 | [a,b,c] == [int(i) for i in input().split()]
if (a * b * c) % 2 == 0:
print(0)
else:
print(min(a * b,b * c,c * a))
| Traceback (most recent call last):
File "/tmp/tmppqps2i7h/tmpo9b6z7ak.py", line 1, in <module>
[a,b,c] == [int(i) for i in input().split()]
^
NameError: name 'a' is not defined
| |
s032473004 | p04005 | u824237520 | 1538510995 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 393 | n, x = map(int, input().split())
a = list(map(int, input().split()))
temp = 0
check = 0
for i in range(1, n):
if a[i] <= a[i - 1] + x:
check = 1
temp = i
break
if check == 1:
a = a[temp:] + a[:temp]
check = 1
for i in range(1, n):
if a[i] >= a[i - check] + x:
a[i] = a[i -... | Traceback (most recent call last):
File "/tmp/tmpn45lkbho/tmpfxxwbuzu.py", line 1, in <module>
n, x = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s170651349 | p04005 | u790301364 | 1537202448 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 462 | def main10():
buf = int(input(""));
strbuf = input("");
strbufs = strbuf.split();
buf2 = [];
for i in range(buf):
buf2.append(int(strbufs[i]));
if len(buf2) == 1:
return("YES");
else:
ki = 0;
for i in range(buf):
if buf2[i] % 2 == 1:
... | Traceback (most recent call last):
File "/tmp/tmp5q78z4sh/tmpqstsgvwk.py", line 23, in <module>
main10()
File "/tmp/tmp5q78z4sh/tmpqstsgvwk.py", line 2, in main10
buf = int(input(""));
^^^^^^^^^
EOFError: EOF when reading a line
| |
s179742963 | p04005 | u627417051 | 1531460529 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 147 | A, B, C = list(map(int, input().split()))
if A % 2 == 0 or B % 2 == 0 or C % 2 == 0:
print(0)
else:
ABC = sort([A, B, C])
print(ABC[0] * ABC[1]) | Traceback (most recent call last):
File "/tmp/tmpliry_n6h/tmpwieadjnh.py", line 1, in <module>
A, B, C = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s810180512 | p04005 | u813356465 | 1475473420 | Python | PyPy2 (5.6.0) | py | Runtime Error | 40 | 8944 | 532 | def min_k_shift(k, a, N, x, range_min):
cost = k*x
for j in range(N):
cost += range_min[(j-k)%N][j] #min(a[(j-sj)%N] for sj in range(k))
return cost
N, x = [int(s) for s in raw_input().split()]
a = [int(s) for s in raw_input().split()]
range_min = [[0]*N for st in range(N)]
for st in range(N):
... | Traceback (most recent call last):
File "/tmp/tmp2qil40xo/tmpj8sol5jm.py", line 7, in <module>
N, x = [int(s) for s in raw_input().split()]
^^^^^^^^^
NameError: name 'raw_input' is not defined
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.