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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s139068227 | p00744 | u871901071 | 1405335773 | Python | Python3 | py | Runtime Error | 0 | 0 | 2134 | from collections import deque
inf = 100000000000000000
def bfs(graph, s, t):
V = len(graph)
q = deque([(s, -1, -1)])
prev = [(-1, -1)] * V
visited = [False] * V
while len(q) > 0:
(v, p, e) = q.popleft()
if visited[v]:
continue
visited[v] = True
prev[v] =... | File "/tmp/tmptszwurr1/tmp53bogw8l.py", line 40
h g = [[] for _ in range(V)]
^
SyntaxError: invalid syntax
| |
s526661185 | p00744 | u871901071 | 1405335834 | Python | Python3 | py | Runtime Error | 0 | 0 | 2074 | from collections import deque
inf = 100000000000000000
def bfs(graph, s, t):
V = len(graph)
q = deque([(s, -1, -1)])
prev = [(-1, -1)] * V
visited = [False] * V
while len(q) > 0:
(v, p, e) = q.popleft()
if visited[v]:
continue
visited[v] = True
prev[v] =... | File "/tmp/tmpc1n9b2v_/tmpk_1mjz1n.py", line 40
h g = [[] for _ in range(V)]
^
SyntaxError: invalid syntax
| |
s252909332 | p00744 | u871901071 | 1405335888 | Python | Python3 | py | Runtime Error | 0 | 0 | 2073 | from collections import deque
inf = 100000000000000000
def bfs(graph, s, t):
V = len(graph)
q = deque([(s, -1, -1)])
prev = [(-1, -1)] * V
visited = [False] * V
while len(q) > 0:
(v, p, e) = q.popleft()
if visited[v]:
continue
visited[v] = True
prev[v] =... | Traceback (most recent call last):
File "/tmp/tmpp9my63pi/tmp9jdcbham.py", line 82, in <module>
main()
File "/tmp/tmpp9my63pi/tmp9jdcbham.py", line 62, in main
m, n = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s895389148 | p00744 | u871901071 | 1405335977 | Python | Python3 | py | Runtime Error | 0 | 0 | 2134 | from collections import deque
inf = 100000000000000000
def bfs(graph, s, t):
V = len(graph)
q = deque([(s, -1, -1)])
prev = [(-1, -1)] * V
visited = [False] * V
while len(q) > 0:
(v, p, e) = q.popleft()
if visited[v]:
continue
visited[v] = True
prev[v] =... | File "/tmp/tmpqompi1sh/tmpgyf5lqw1.py", line 40
h g = [[] for _ in range(V)]
^
SyntaxError: invalid syntax
| |
s242592122 | p00744 | u871901071 | 1405336009 | Python | Python3 | py | Runtime Error | 39850 | 98524 | 2133 | from collections import deque
inf = 100000000000000000
def bfs(graph, s, t):
V = len(graph)
q = deque([(s, -1, -1)])
prev = [(-1, -1)] * V
visited = [False] * V
while len(q) > 0:
(v, p, e) = q.popleft()
if visited[v]:
continue
visited[v] = True
prev[v] =... | Traceback (most recent call last):
File "/tmp/tmp7qpbu9ws/tmpihxwa6hh.py", line 84, in <module>
main()
File "/tmp/tmp7qpbu9ws/tmpihxwa6hh.py", line 62, in main
m, n = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s492098535 | p00744 | u871901071 | 1405336176 | Python | Python3 | py | Runtime Error | 39860 | 98528 | 2173 | from collections import deque
inf = 100000000000000000
def bfs(graph, s, t):
V = len(graph)
q = deque([(s, -1, -1)])
prev = [(-1, -1)] * V
visited = [False] * V
while len(q) > 0:
(v, p, e) = q.popleft()
if visited[v]:
continue
visited[v] = True
prev[v] =... | Traceback (most recent call last):
File "/tmp/tmpcmswolz5/tmp23ntc68j.py", line 85, in <module>
main()
File "/tmp/tmpcmswolz5/tmp23ntc68j.py", line 62, in main
m, n = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s961697481 | p00744 | u871901071 | 1405337688 | Python | Python3 | py | Runtime Error | 39850 | 92328 | 2260 | from collections import deque
inf = 100000000000000000
def dfs(graph, s, t):
V = len(graph)
prev = [(-1, -1)] * V
visited = [False] * V
visited[0] = True
def iter(cur):
if cur == t:
return True
for i in range(len(graph[cur])):
e = graph[cur][i]
i... | Traceback (most recent call last):
File "/tmp/tmpdm2br8pj/tmpuxs6rv_i.py", line 88, in <module>
main()
File "/tmp/tmpdm2br8pj/tmpuxs6rv_i.py", line 65, in main
m, n = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s127894035 | p00744 | u844945939 | 1423750275 | Python | Python3 | py | Runtime Error | 19930 | 14820 | 1030 | from fractions import gcd
def add_edge(u, v):
G[u].append(v)
G[v].append(u)
def dfs(v):
used[v] = True
for u in G[v]:
w = match[u]
if w < 0 or not used[w] and dfs(w):
match[v] = u
match[u] = v
return True
else:
return False
def bipart... | Traceback (most recent call last):
File "/tmp/tmprad03gpu/tmp88fvsndq.py", line 1, in <module>
from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.py)
| |
s854257341 | p00744 | u844945939 | 1423750343 | Python | Python3 | py | Runtime Error | 19930 | 14824 | 1030 | from fractions import gcd
def add_edge(u, v):
G[u].append(v)
G[v].append(u)
def dfs(v):
used[v] = True
for u in G[v]:
w = match[u]
if w < 0 or not used[w] and dfs(w):
match[v] = u
match[u] = v
return True
else:
return False
def bipart... | Traceback (most recent call last):
File "/tmp/tmp2wgfser8/tmplj03dg7_.py", line 1, in <module>
from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.py)
| |
s587410174 | p00744 | u844945939 | 1423750643 | Python | Python3 | py | Runtime Error | 19920 | 14828 | 1031 |
from fractions import gcd
def add_edge(u, v):
G[u].append(v)
G[v].append(u)
def dfs(v):
used[v] = True
for u in G[v]:
w = match[u]
if w < 0 or not used[w] and dfs(w):
match[v] = u
match[u] = v
return True
else:
return False
def bipar... | Traceback (most recent call last):
File "/tmp/tmp6n2bmwl6/tmp_89aw93v.py", line 2, in <module>
from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.py)
| |
s952644784 | p00744 | u811733736 | 1521379727 | Python | Python3 | py | Runtime Error | 0 | 0 | 2107 | # -*- coding: utf-8 -*-
"""
Cards
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1163&lang=jp
"""
import sys
from sys import stdin
from collections import namedtuple
from fractions import gcd
input = stdin.readline
edge = namedtuple('edge', ['to', 'cap', 'rev'])
def add_edge(G, f, t, c):
G[f].append(ed... | Traceback (most recent call last):
File "/tmp/tmpla318aq_/tmpkh1kvfpo.py", line 10, in <module>
from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.py)
| |
s434684999 | p00744 | u811733736 | 1521380129 | Python | Python3 | py | Runtime Error | 0 | 0 | 2102 | # -*- coding: utf-8 -*-
"""
Cards
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1163&lang=jp
"""
import sys
from sys import stdin
from collections import namedtuple
from math import gcd
input = stdin.readline
edge = namedtuple('edge', ['to', 'cap', 'rev'])
def add_edge(G, f, t, c):
G[f].append(edge(t,... | Traceback (most recent call last):
File "/tmp/tmpeka5sct_/tmpfs3d5buq.py", line 87, in <module>
main(sys.argv[1:])
File "/tmp/tmpeka5sct_/tmpfs3d5buq.py", line 55, in main
m, n = map(int, input().split())
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s242171415 | p00744 | u811733736 | 1521413802 | Python | Python3 | py | Runtime Error | 0 | 0 | 2523 | # -*- coding: utf-8 -*-
"""
Cards
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1163&lang=jp
"""
import sys
from sys import stdin
from collections import namedtuple, deque
from math import gcd
input = stdin.readline
edge = namedtuple('edge', ['to', 'cap', 'rev'])
def add_edge(G, f, t, c):
G[f].append... | Traceback (most recent call last):
File "/tmp/tmpkcvh2clh/tmpnsu35fh9.py", line 104, in <module>
main(sys.argv[1:])
File "/tmp/tmpkcvh2clh/tmpnsu35fh9.py", line 72, in main
m, n = map(int, input().split())
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s536641198 | p00744 | u647766105 | 1386331311 | Python | Python | py | Runtime Error | 39850 | 36860 | 1331 | from collections import defaultdict
from fractions import gcd
INF = 2 << 30
MAX_V = 1002
G = [[] for _ in xrange(MAX_V)]
visited = [False]*MAX_V
def add_edge(fro, to, cap):
G[fro].append([to,cap,len(G[to])])
G[to].append([fro,0,len(G[fro])-1])
def dfs(v,t,f):
global visited
if v == t:
return ... | File "/tmp/tmpz79rmgpe/tmp3ypjmnez.py", line 56
print max_flow(MAX_V-2,MAX_V-1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s197023854 | p00744 | u647766105 | 1386331494 | Python | Python | py | Runtime Error | 39860 | 36860 | 1331 | from collections import defaultdict
from fractions import gcd
INF = 2 << 30
MAX_V = 1003
G = [[] for _ in xrange(MAX_V)]
visited = [False]*MAX_V
def add_edge(fro, to, cap):
G[fro].append([to,cap,len(G[to])])
G[to].append([fro,0,len(G[fro])-1])
def dfs(v,t,f):
global visited
if v == t:
return ... | File "/tmp/tmp5ojl3xuv/tmpgsuemkjz.py", line 56
print max_flow(MAX_V-2,MAX_V-1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s432972109 | p00744 | u647766105 | 1386331935 | Python | Python | py | Runtime Error | 39850 | 36860 | 1331 | from collections import defaultdict
from fractions import gcd
INF = 2 << 30
MAX_V = 1002
G = [[] for _ in xrange(MAX_V)]
visited = [False]*MAX_V
def add_edge(fro, to, cap):
G[fro].append([to,cap,len(G[to])])
G[to].append([fro,0,len(G[fro])-1])
def dfs(v,t,f):
global visited
if v == t:
return ... | File "/tmp/tmpaqhqj0r2/tmpxm5u5hai.py", line 56
print max_flow(MAX_V-2,MAX_V-1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s347629347 | p00744 | u647766105 | 1386332419 | Python | Python | py | Runtime Error | 39860 | 36864 | 1331 | from collections import defaultdict
from fractions import gcd
INF = 2 << 30
MAX_V = 1002
G = [[] for _ in xrange(MAX_V)]
visited = [False]*MAX_V
def add_edge(fro, to, cap):
G[fro].append([to,cap,len(G[to])])
G[to].append([fro,0,len(G[fro])-1])
def dfs(v,t,f):
global visited
if v == t:
return ... | File "/tmp/tmpf_w97vdj/tmp0gsqztuo.py", line 56
print max_flow(MAX_V-2,MAX_V-1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s577296836 | p00744 | u647766105 | 1386332546 | Python | Python | py | Runtime Error | 39860 | 36864 | 1274 | from fractions import gcd
INF = 2 << 30
V = 1003
G = [[] for _ in xrange(V)]
visited = [False]*V
def add_edge(fro, to, cap):
G[fro].append([to,cap,len(G[to])])
G[to].append([fro,0,len(G[fro])-1])
def dfs(v,t,f):
if v == t:
return f
visited[v] = True
for i,(to,cap,rev) in enumerate((G[v]))... | File "/tmp/tmp6vkhbxnp/tmpnqp5ko9o.py", line 55
print max_flow(V-2,V-1)
^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s392149434 | p00744 | u647766105 | 1386643452 | Python | Python | py | Runtime Error | 39860 | 36864 | 1265 | from fractions import gcd
INF = 2 << 30
V = 1002
G = [[] for _ in xrange(V)]
visited = [False]*V
def add_edge(fro, to, cap):
G[fro].append([to,cap,len(G[to])])
G[to].append([fro,0,len(G[fro])-1])
def dfs(v,t,f):
if v == t:
return f
visited[v] = True
for i,(to,cap,rev) in enumerate((G[v]))... | File "/tmp/tmpmskcfn3p/tmpnsu07027.py", line 55
print max_flow(V-2,V-1)
^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s068443553 | p00744 | u647766105 | 1386643688 | Python | Python | py | Runtime Error | 39850 | 36864 | 1361 | from fractions import gcd
INF = 2 << 30
V = 1002
G = [[] for _ in xrange(V)]
visited = [False]*V
def add_edge(fro, to, cap):
G[fro].append([to,cap,len(G[to])])
G[to].append([fro,0,len(G[fro])-1])
def dfs(v,t,f):
if v == t:
return f
visited[v] = True
for i,(to,cap,rev) in enumerate((G[v]))... | File "/tmp/tmpgjwhk6t8/tmpyhv3qfu2.py", line 60
print max_flow(V-2,V-1)
^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s492984252 | p00744 | u647766105 | 1386644849 | Python | Python | py | Runtime Error | 39850 | 36864 | 1339 | from fractions import gcd
INF = 2 << 30
V = 1002
G = [[] for _ in xrange(V)]
visited = [False]*V
def add_edge(fro, to, cap):
G[fro].append([to,cap,len(G[to])])
G[to].append([fro,0,len(G[fro])-1])
def dfs(v,t,f):
if v == t:
return f
visited[v] = True
for i,(to,cap,rev) in enumerate((G[v]))... | File "/tmp/tmphuzut5rw/tmpnohposvg.py", line 60
print max_flow(V-2,V-1)
^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s385782233 | p00744 | u647766105 | 1386646027 | Python | Python | py | Runtime Error | 39860 | 36864 | 1272 | from fractions import gcd
INF = 2 << 30
V = 1002
G = [[] for _ in xrange(V)]
visited = [False]*V
def add_edge(fro, to, cap):
G[fro].append([to,cap,len(G[to])])
G[to].append([fro,0,len(G[fro])-1])
def dfs(v,t,f):
if v == t:
return f
visited[v] = True
for i,(to,cap,rev) in enumerate((G[v]))... | File "/tmp/tmpcq3yqceu/tmpwtydcp_c.py", line 56
print max_flow(V-2,V-1)
^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s415400778 | p00746 | u616098312 | 1466507033 | Python | Python | py | Runtime Error | 0 | 0 | 671 | while True:
N=int(input())
if N==0:break
t=[0]
y=[0]
lst=list(range(N))
for k in lst[1:]:
[x,d]=input().slice()
[x,d]=[int(x),int(d)]
if d==0:
t=t+[t[x]]
y=y+[y[x]-1]
if d==1:
t=t+[t[x]-1]
y=y+[y[x]]
if d==2:... | Traceback (most recent call last):
File "/tmp/tmpcon6bwqm/tmp___cgp1b.py", line 2, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s919813666 | p00746 | u616098312 | 1466507044 | Python | Python3 | py | Runtime Error | 0 | 0 | 671 | while True:
N=int(input())
if N==0:break
t=[0]
y=[0]
lst=list(range(N))
for k in lst[1:]:
[x,d]=input().slice()
[x,d]=[int(x),int(d)]
if d==0:
t=t+[t[x]]
y=y+[y[x]-1]
if d==1:
t=t+[t[x]-1]
y=y+[y[x]]
if d==2:... | Traceback (most recent call last):
File "/tmp/tmpezyekn46/tmpjjsfi38d.py", line 2, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s240761145 | p00747 | u316268279 | 1422197165 | Python | Python3 | py | Runtime Error | 19920 | 18760 | 1584 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from heapq import heappop,heappush
def bfs(sx,sy,W,H):
queue = []
heappush(queue,(0,sx,sy))
dxdy = [(0,1),(0,-1),(1,0),(-1,0)]
visited = [[ 10**8 for i in range(W)] for j in range(H)]
while queue != []:
count,x,y = heappop(queue)
visit... | Traceback (most recent call last):
File "/tmp/tmpp4y0oqpw/tmpkggxr42o.py", line 26, in <module>
w,h = map(int,input().split(" "))
^^^^^^^
EOFError: EOF when reading a line
| |
s814024892 | p00747 | u120360464 | 1423713980 | Python | Python | py | Runtime Error | 19930 | 12096 | 1018 | #! /usr/bin/python
# -*- coding: utf-8 -*-
while 1:
ans = 0
(w, h) = map(int, raw_input().split())
used = [[False]*w for i in range(h)]
if h == 0:break
que = [[0, 0, 1]]
vir = []
hor = []
for i in range(h):
vir.append(map(int, raw_input().split()))
if i == h-1:break
... | File "/tmp/tmpigp5w6ft/tmpowavfukh.py", line 33
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s552003186 | p00747 | u661290476 | 1487657331 | Python | Python3 | py | Runtime Error | 0 | 0 | 1213 | def bfs(maze):
d = [[0] * 70 for i in range(70)]
d[1][1] = 1
que = [(1, 1)]
while 0 < len(que):
new_que = []
for x, y in que:
if x == 2 * w - 1 and y == 2 * h - 1:
return d[y][x]
for dx, dy in ((0, 1), (-1, 0), (0, -1), (1, 0)):
mx,... | Traceback (most recent call last):
File "/tmp/tmpwwwqjz5x/tmp2ori2ip_.py", line 22, in <module>
w, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s801936829 | p00747 | u131811591 | 1495030555 | Python | Python3 | py | Runtime Error | 40000 | 18392 | 1284 | # coding: utf-8
import sys
from collections import deque
if __name__ == '__main__':
while True:
m,n = map(int,input().split())
sw = []
bw = []
if m == 0 and n == 0:
break
for i in range(2*n-1):
if i % 2 == 0:
sw.append(list(map(int,in... | Traceback (most recent call last):
File "/tmp/tmpuk2f7wnz/tmp04lma5zv.py", line 8, in <module>
m,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s144418554 | p00747 | u131811591 | 1495030753 | Python | Python3 | py | Runtime Error | 40000 | 238116 | 1310 | # coding: utf-8
import sys
from collections import deque
if __name__ == '__main__':
while True:
m,n = map(int,input().split())
sw = []
bw = []
if m == 0 and n == 0:
break
for i in range(2*n-1):
if i % 2 == 0:
sw.append(list(map(int,in... | Traceback (most recent call last):
File "/tmp/tmpomw1y3r6/tmp40wpwmbc.py", line 8, in <module>
m,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s370608187 | p00747 | u131811591 | 1495031031 | Python | Python3 | py | Runtime Error | 40000 | 18084 | 1213 | # coding: utf-8
if __name__ == '__main__':
while True:
m,n = map(int,input().split())
sw = []
bw = []
if m == 0 and n == 0:
break
for i in range(2*n-1):
if i % 2 == 0:
sw.append(list(map(int,input().split())))
else:
... | Traceback (most recent call last):
File "/tmp/tmpsjk0gusb/tmpyrxeo66f.py", line 5, in <module>
m,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s062214134 | p00747 | u131811591 | 1495031102 | Python | Python3 | py | Runtime Error | 40000 | 18160 | 1065 | # coding: utf-8
while True:
m,n = map(int,input().split())
sw = []
bw = []
if m == 0 and n == 0:
break
for i in range(2*n-1):
if i % 2 == 0:
sw.append(list(map(int,input().split())))
else:
bw.append(list(map(int,input().split())))
flag = [[0 for i ... | Traceback (most recent call last):
File "/tmp/tmp4vhwsjdw/tmp3jcluoxt.py", line 3, in <module>
m,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s037974260 | p00747 | u131811591 | 1495031239 | Python | Python3 | py | Runtime Error | 40000 | 15908 | 1052 | # coding: utf-8
while True:
m,n = map(int,input().split())
sw = []
bw = []
if m == 0 and n == 0:
break
for i in range(2*n-1):
if i % 2 == 0:
sw.append(list(map(int,input().split())))
else:
bw.append(list(map(int,input().split())))
flag = [[0 for i ... | Traceback (most recent call last):
File "/tmp/tmpvjjicl42/tmprti1js0y.py", line 3, in <module>
m,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s994419513 | p00747 | u131811591 | 1495031563 | Python | Python3 | py | Runtime Error | 40000 | 15864 | 1036 | while True:
m,n = map(int,input().split())
sw = []
bw = []
if m == 0 and n == 0:
break
for i in range(2*n-1):
if i % 2 == 0:
sw.append(list(map(int,input().split())))
else:
bw.append(list(map(int,input().split())))
flag = [[0 for i in range(m)] for... | Traceback (most recent call last):
File "/tmp/tmpwdge7yde/tmpz2yzwbv1.py", line 2, in <module>
m,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s515661986 | p00747 | u131811591 | 1495031951 | Python | Python3 | py | Runtime Error | 40000 | 15860 | 922 | while True:
m,n = map(int,input().split())
sw = []
bw = []
if m == 0 and n == 0:
break
for i in range(2*n-1):
if i % 2 == 0:
sw.append(list(map(int,input().split())))
else:
bw.append(list(map(int,input().split())))
flag = [[0 for i in range(m)] for... | Traceback (most recent call last):
File "/tmp/tmpnvoq9__a/tmpbd_mbkzb.py", line 2, in <module>
m,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s345415612 | p00747 | u131811591 | 1495031981 | Python | Python3 | py | Runtime Error | 40000 | 15896 | 922 | while True:
m,n = map(int,input().split())
sw = []
bw = []
if m == 0 and n == 0:
break
for i in range(2*n-1):
if i % 2 == 0:
sw.append(list(map(int,input().split())))
else:
bw.append(list(map(int,input().split())))
flag = [[0 for i in range(m)] for... | Traceback (most recent call last):
File "/tmp/tmpj2u7gmcb/tmpjuugt4s2.py", line 2, in <module>
m,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s238299000 | p00747 | u131811591 | 1495032049 | Python | Python3 | py | Runtime Error | 40000 | 15996 | 923 | while True:
m,n = map(int,input().split())
sw = []
bw = []
if m == 0 and n == 0:
break
for i in range(2*n-1):
if i % 2 == 0:
sw.append(list(map(int,input().split())))
else:
bw.append(list(map(int,input().split())))
flag = [[0 for i in range(m)] for... | Traceback (most recent call last):
File "/tmp/tmpocm46oci/tmppioe7e1h.py", line 2, in <module>
m,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s937372317 | p00747 | u131811591 | 1495032666 | Python | Python3 | py | Runtime Error | 40000 | 15928 | 973 | while True:
w, h = map(int, input().split())
vart = []
hori = []
if w == 0 and h ==0:
break
for i in range(2*h-1):
if i % 2 == 0:
vart.append(list(map(int, input().split())))
else:
hori.append(list(map(int, input().split())))
node = [[0 for i in ra... | Traceback (most recent call last):
File "/tmp/tmp5s_f97lc/tmphsgllfe_.py", line 2, in <module>
w, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s826500961 | p00747 | u506554532 | 1513571138 | Python | Python3 | py | Runtime Error | 0 | 0 | 811 | from collections import deque
while True:
W,H = map(int, input().split())
if W == 0: break
es = [[] for i in range(W*H)]
for y in range(H):
walls_h = map(int, input().split())
for x in range(W-1):
if walls_h[x]: continue
es[y*W + x].append(y*W + x+1)
e... | Traceback (most recent call last):
File "/tmp/tmp6tu1vn6a/tmp5epbjxu_.py", line 3, in <module>
W,H = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s539806095 | p00747 | u506554532 | 1513578491 | Python | Python3 | py | Runtime Error | 0 | 0 | 824 | from collections import deque
while True:
W,H = map(int, input().split())
if W == 0: break
es = [[] for i in range(W*H)]
for y in range(H):
walls_h = map(int, input().split())
for x in range(W-1):
if walls_h[x]: continue
es[y*W + x].append(y*W + x+1)
e... | Traceback (most recent call last):
File "/tmp/tmpibatpbdi/tmpcvlcp193.py", line 3, in <module>
W,H = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s416948531 | p00747 | u855199458 | 1529674617 | Python | Python3 | py | Runtime Error | 0 | 0 | 1052 | # -*- coding: utf-8 -*-
from collections import defaultdict, deque
W, H = map(int, input().split())
while W:
G = defaultdict(list)
for h in range(H):
for w, b in enumerate(map(int, input().split())):
if b == 0:
G[(w, h)].append((w+1, h))
G[(w+1, h)].append((w... | Traceback (most recent call last):
File "/tmp/tmpsh29764r/tmpoqa87yrv.py", line 3, in <module>
W, H = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s818597404 | p00748 | u731235119 | 1422873161 | Python | Python | py | Runtime Error | 19930 | 99684 | 550 | MAX = 10**6 - 1
inf = float("inf")
tetra_sum = [inf for i in range(MAX+1)]
tetra_sum_odd = [inf for i in range(MAX+1)]
tetra_sum[0] = 0
tetra_sum_odd[0] = 0
for n in range(1,181):
tetra_n = n * (n+1) * (n+2) / 6
for i in range(tetra_n,MAX+1):
if tetra_sum[i-tetra_n] + 1 < tetra_sum[i]:
tetra_sum[i] = tetra_sum[i... | File "/tmp/tmpmad9ht60/tmpwqv9pdgv.py", line 18
print tetra_sum[N], tetra_sum_odd[N]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s312318744 | p00748 | u731235119 | 1422874416 | Python | Python | py | Runtime Error | 19930 | 75708 | 740 | MAX = 10**6 - 1
inf = float("inf")
tetra_n = [i*(i+1)*(i+2)/6 for i in range(1,181)]
tetra_sum = [inf for i in range(MAX+1)]
tetra_sum_odd = [inf for i in range(MAX+1)]
tetra_sum[0] = 0
tetra_sum_odd[0] = 0
tmp_max = 0
for tn in tetra_n:
tmp_max = max(tmp_max + 4 * tn, 5 * tn)
if (tn % 2) == 0:
for i in range(tn,mi... | File "/tmp/tmp19og09u0/tmp0qsv12hw.py", line 25
print tetra_sum[N], tetra_sum_odd[N]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s520790139 | p00748 | u731235119 | 1422874801 | Python | Python | py | Runtime Error | 19930 | 99700 | 655 | MAX = 10**6 - 1
inf = float("inf")
tetra_n = [i*(i+1)*(i+2)/6 for i in range(1,181)]
tetra_sum = [inf for i in range(MAX+1)]
tetra_sum_odd = [inf for i in range(MAX+1)]
tetra_sum[0] = 0
tetra_sum_odd[0] = 0
for tn in tetra_n:
if tn % 2 == 0:
for i in range(tn,MAX+1):
if tetra_sum[i-tn] + 1 < tetra_sum[i]:
te... | File "/tmp/tmpiuud3wf5/tmp03aob69b.py", line 23
print tetra_sum[N], tetra_sum_odd[N]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s680940224 | p00748 | u633068244 | 1423763325 | Python | Python | py | Runtime Error | 19930 | 19860 | 368 | R = 10**6+1
T = [i*(i+1)*(2*i+1)/6 for i in xrange(145)]
dp1 = [100]*R
dp2 = [100]*R
for t in T:
dp1[t] = 1
for i in xrange(t,R):
if dp1[i-t]: dp1[i] = min(dp1[i],dp1[i-t]+1)
if t%2 == 0: continue
dp2[t] = 1
for i in xrange(t,R):
if dp2[i-t]: dp1[i] = min(dp2[i],dp2[i-t]+1)
while 1:
... | File "/tmp/tmp_ii25e37/tmpxxoxjmrf.py", line 15
print dp1[n],dp2[n]
^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s052758497 | p00748 | u633068244 | 1423763689 | Python | Python | py | Runtime Error | 19930 | 67880 | 424 | R = 10**6+1
T = [i*(i+1)*(i+2)/6 for i in xrange(145)]
dp1 = [1e10]*R
dp2 = [1e10]*R
dp1[0] = dp2[0] = 0
for t in T:
dp1[t] = 1
for i in xrange(t,R):
if dp1[i-t] < 1e10: dp1[i] = min(dp1[i],dp1[i-t]+1)
if t%2 == 0: continue
dp2[t] = 1
for i in xrange(t,R):
if dp2[i-t] < 1e10: dp2[i] ... | File "/tmp/tmp202tz6rk/tmp0dezi819.py", line 18
print dp1[n],dp2[n]
^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s858023311 | p00748 | u383876854 | 1429602010 | Python | Python | py | Runtime Error | 19920 | 11180 | 828 | MAX=1000000
INF=100000
import math
def f(a):
return (a*(a+1)*(a+2))/6
def solve(lst):
global ans
global n
count=2
while True:
if ans[n]!=INF:
return ans[n]
keepans=[0]*(n+1)
for i in range(n+1):
if ans[i]!=INF:
for j in range(n+1):
if i+j<=n:
if ans[j]!=INF and ans[i+j]>ans[i... | File "/tmp/tmph9328wl9/tmpaxqx1__i.py", line 66
print solve(box)
^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s378559344 | p00748 | u383876854 | 1429602372 | Python | Python | py | Runtime Error | 19930 | 11184 | 833 | MAX=1000000
INF=100000
import math
def f(a):
return (a*(a+1)*(a+2))/6
def solve(lst):
global ans
global n
count=2
while True:
if ans[n]!=INF:
return ans[n]
keepans=list(ans)
for i in range(n+1):
if ans[i]!=INF:
for j in range(n+1):
if i+j<=n:
if ans[j]!=INF and keepans[i+j]>a... | File "/tmp/tmpspqwvvji/tmp66o0kxry.py", line 66
print solve(box)
^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s916743592 | p00748 | u383876854 | 1429607259 | Python | Python | py | Runtime Error | 19930 | 49564 | 775 | MAX=1000000
INF=100000
import math
def f(a):
return (a*(a+1)*(a+2))/6
def solve(lst):
global ans
global n
while True:
keepans=list(ans)
for i in range(n+1):
if ans[i]!=INF:
for j in range(n+1):
if ans[n]!=INF: return ans[n]
if i+j<=n:
if ans[j]!=INF and keepans[i+j]>ans[i]+ans[... | File "/tmp/tmpcjkm6md3/tmped_hvpy5.py", line 26
print i,j,"=",keepans[i+j]
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s196137769 | p00748 | u228002579 | 1462291107 | Python | Python | py | Runtime Error | 40000 | 101732 | 485 | MAX = 1000000
tetra = []
dp = [0] * (MAX+1)
dpodd = [0] * (MAX+1)
for i in range(1,MAX+1):
dp[i] = i
dpodd[i] = i
i = 0
while True:
i += 1
t = i * (i+1) * (i+2) / 6
if t > MAX: break
tetra.append(t)
for p in tetra:
#print(p)
for i in range(0,MAX-p):
dp[i+p] = min(dp[i+p], dp[... | File "/tmp/tmpzc5k2u6g/tmpibtj04vx.py", line 28
print dp[n],dpodd[n]
^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s476245124 | p00748 | u228002579 | 1462291609 | Python | Python3 | py | Runtime Error | 40000 | 86308 | 488 | MAX = 1000000
tetra = []
dp = [0] * (MAX+1)
dpodd = [0] * (MAX+1)
for i in range(1,MAX+1):
dp[i] = i
dpodd[i] = i
i = 0
while True:
i += 1
t = i * (i+1) * (i+2) // 6
if t > MAX: break
tetra.append(t)
for p in tetra:
#print(p)
for i in range(0,MAX-p):
dp[i+p] = min(dp[i+p], dp... | ||
s386263988 | p00748 | u228002579 | 1462291938 | Python | Python3 | py | Runtime Error | 40000 | 86384 | 488 | MAX = 1000010
tetra = []
dp = [0] * (MAX+1)
dpodd = [0] * (MAX+1)
for i in range(1,MAX+1):
dp[i] = i
dpodd[i] = i
i = 0
while True:
i += 1
t = i * (i+1) * (i+2) // 6
if t > MAX: break
tetra.append(t)
for p in tetra:
#print(p)
for i in range(0,MAX-p):
dp[i+p] = min(dp[i+p], dp... | ||
s800922311 | p00748 | u078042885 | 1485539638 | Python | Python3 | py | Runtime Error | 40000 | 97984 | 308 | while 1:
n=int(input())
if n==0:break
dp=[0]+[10**10]*n
odd=[0]+[10**10]*n
for i in range(1,n+1):
a=i*(i+1)*(i+2)//6
if a>n:break
for j in range(a,n+1):
dp[j]=min(dp[j],dp[j-a]+1)
if a&1:odd[j]=min(odd[j],odd[j-a]+1)
print(dp[n],odd[n]) | Traceback (most recent call last):
File "/tmp/tmp1omeo5ld/tmp2qo9meyp.py", line 2, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s112394936 | p00748 | u798803522 | 1485786813 | Python | Python3 | py | Runtime Error | 0 | 0 | 2602 | with open("input.txt") as f:
while True:
target = int(f.readline())
if target == 0:
break
pascal = []
tmp = 1
nexpas = 1
oddpas = []
while target >= nexpas:
pascal.append(nexpas)
if nexpas % 2 == 1:
oddpas.ap... | Traceback (most recent call last):
File "/tmp/tmpbypbdgka/tmperrwky87.py", line 1, in <module>
with open("input.txt") as f:
^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'input.txt'
| |
s961865082 | p00748 | u798803522 | 1485786891 | Python | Python3 | py | Runtime Error | 40000 | 62388 | 2272 | while True:
target = int(input())
if target == 0:
break
pascal = []
tmp = 1
nexpas = 1
oddpas = []
while target >= nexpas:
pascal.append(nexpas)
if nexpas % 2 == 1:
oddpas.append(nexpas)
tmp += 1
nexpas = (tmp * (tmp + 1) * (tmp + 2)) // 6
... | Traceback (most recent call last):
File "/tmp/tmp327i1a5v/tmphsm8k3fu.py", line 2, in <module>
target = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s414930942 | p00748 | u078042885 | 1485791953 | Python | Python3 | py | Runtime Error | 40000 | 93996 | 350 | dp = [0] + [10 ** 10] * 10**6
odd = [0] + [10 ** 10] * 10**6
for i in range(1, 10**6 + 1):
a = i * (i + 1) * (i + 2) // 6
if a > 10**6: break
for j in range(a, 10**6 + 1):
dp[j] = min(dp[j], dp[j - a] + 1)
if a & 1: odd[j] = min(odd[j], odd[j - a] + 1)
while 1:
n=int(input())
if n==0... | ||
s353971662 | p00748 | u078042885 | 1485794041 | Python | Python3 | py | Runtime Error | 40000 | 86424 | 300 | N=10**6
dp = [i for i in range(N+1)]
odd = [i for i in range(N+1)]
p=4;n=3
while p<=N:
for i in range(N+1-p):
dp[i+p]=min(dp[i+p],dp[i]+1)
if p&1:odd[i+p]=min(odd[i+p],odd[i]+1)
p=n*(n+1)*(n+2)//6
n+=1
while 1:
n=int(input())
if n==0:break
print(dp[n],odd[n]) | ||
s650629072 | p00748 | u144068724 | 1495445692 | Python | Python3 | py | Runtime Error | 0 | 0 | 1276 | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
// Scanner sc = new Scanner(System.in);
int[] list1 = new int[180];
int[] cnt1 = new int[1000001];
int[] cnt2 = new int[1000001];
fo... | File "/tmp/tmpxxzl1hka/tmp4hoe4lcs.py", line 28
// p?????????????????§??´??°
^
SyntaxError: invalid character '§' (U+00A7)
| |
s615743348 | p00748 | u598745142 | 1502084549 | Python | Python3 | py | Runtime Error | 40000 | 74036 | 788 | INF = 1000000
while True:
n = input()
n = int(n)
if n == 0:
break
i = 1
tetra = []
while True:
t = i*(1+i)*(2+i)/6
if t <= n:
tetra.append(int(t))
i += 1
else:
break
dp = [[INF for _ in range(n+1)] for _ in range(len(tet... | Traceback (most recent call last):
File "/tmp/tmp_7n3e0g4/tmpabxkkjv2.py", line 4, in <module>
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s843135898 | p00748 | u598745142 | 1502086913 | Python | Python3 | py | Runtime Error | 40000 | 14300 | 672 | INF = 1000000
while True:
n = input()
n = int(n)
if n == 0:
break
i = 1
tetra = []
while True:
t = i*(1+i)*(2+i)/6
if t <= n:
tetra.append(int(t))
i += 1
else:
break
dp1 = [INF for _ in range(n+1)]
dp2 = [INF for _ i... | Traceback (most recent call last):
File "/tmp/tmpl6hrbs_z/tmp33mfh7_p.py", line 4, in <module>
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s134883473 | p00748 | u672443148 | 1514949729 | Python | Python3 | py | Runtime Error | 0 | 0 | 554 | def pollockConjection():
inf=int(1e6)
dp=list(range(0,inf+1))
odp=list(range(0,inf+1))
n=2
s=1
os=1
while s<inf+1:
s=n*(n+1)*(n+2)//6
n+=1
if s%2==1:
os=s
for i in range(0,inf+1-s):
dp[i+s]=min(dp[i+s],dp[i]+1)
for i in range(0,... | ||
s537065841 | p00748 | u672443148 | 1514950415 | Python | Python3 | py | Runtime Error | 0 | 0 | 518 | def pollockConjection():
inf=int(1e6)
dp=list(range(0,inf+1))
odp=list(range(0,inf+1))
n=2
s=1
os=1
while s<inf+1:
s=n*(n+1)*(n+2)//6
n+=1
if s%2==1:
os=s
for i in range(0,inf+1-s):
dp[i+s]=min(dp[i+s],dp[i]+1)
odp[i+os]=min... | ||
s310094590 | p00748 | u672443148 | 1514951778 | Python | Python3 | py | Runtime Error | 0 | 0 | 506 | def pollockConjection():
inf=int(1e6)
dp=list(range(0,inf+1))
odp=list(range(0,inf+1))
n=2
s=1
os=1
while s<inf+1:
s=n*(n+1)*(n+2)//6
n+=1
if s%2==1:
os=s
for i in range(0,inf+1-s):
dp[i+s]=min(dp[i+s],dp[i]+1)
odp[i+os]=min... | File "/tmp/tmpf55isr79/tmpps42dqih.py", line 20
while True:
^
SyntaxError: invalid non-printable character U+3000
| |
s894459336 | p00748 | u506554532 | 1515034857 | Python | Python3 | py | Runtime Error | 0 | 0 | 764 | import bisect
import sys
MAX = 10**6
sys.setrecursionlimit(MAX)
arr1 = [1]
arr2 = [1]
n = 1
while True:
n += 1
tmp = n*(n+1)*(n+2)//6
if tmp > MAX: break
arr1.append(tmp)
if tmp%2:
arr2.append(tmp)
def rec(remain, depth, mindepth, onlyodd):
if remain == 0: return depth
if mindepth -... | Traceback (most recent call last):
File "/tmp/tmpszaogb1q/tmpo7c8aq9s.py", line 31, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s602084273 | p00748 | u266872031 | 1527081213 | Python | Python | py | Runtime Error | 0 | 0 | 695 | import itertools
P1=[p*(p+1)*(p+2)/6 for p in range(1,181)]
P2=[p for p in P1 if p%2]
maxnum=1000000
A1=[999999 for x in range(maxnum+1)]
A2=[999999 for x in range(maxnum+1)]
for X in [[P1,A1],[P2,A2]]:
P=X[0]
A=X[1]
tmp=P
bk=0
cnt=2
for p in tmp:
if p<maxnum:
A[p]=1
... | File "/tmp/tmp82lvnx7y/tmp0ji4zp56.py", line 35
print A1[n], A2[n]
^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s439975673 | p00748 | u509278866 | 1528277697 | Python | Python3 | py | Runtime Error | 0 | 0 | 1149 | import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF... | ||
s780214125 | p00748 | u072053884 | 1528689738 | Python | Python3 | py | Runtime Error | 0 | 0 | 1024 | def solve():
import sys
file_input = sys.stdin
def tetra_num(n):
for i in range(1, 181):
t = i * (i + 1) * (i + 2) // 6
if t <= n:
yield t
else:
break
while True:
n = int(file_input.readline())
if n == ... | Traceback (most recent call last):
File "/tmp/tmpb12vlegx/tmp_xxx3rkj.py", line 38, in <module>
solve()
File "/tmp/tmpb12vlegx/tmp_xxx3rkj.py", line 14, in solve
n = int(file_input.readline())
^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s479959703 | p00748 | u072053884 | 1528702152 | Python | Python3 | py | Runtime Error | 0 | 0 | 1000 | def solve():
rec = list(range(1000000))
odd_rec = rec.copy()
for i in range(2, 181):
t = i * (i + 1) * (i + 2) // 6
if t % 2 == 0:
for i, tpl in enumerate(zip(rec[t:], rec), start=t):
a, b = tpl
b += 1
if a < b:
... | ||
s406894994 | p00748 | u072053884 | 1528703536 | Python | Python3 | py | Runtime Error | 0 | 0 | 837 | def solve():
rec = list(range(1000000))
odd_rec = rec.copy()
for i in range(2, 181):
t = i * (i + 1) * (i + 2) // 6
if t % 2 == 0:
for i, tpl in enumerate(zip(rec[t:], rec), start=t):
a, b = tpl
b += 1
if b < a:
... | ||
s021655469 | p00748 | u072053884 | 1528704558 | Python | Python3 | py | Runtime Error | 0 | 0 | 877 | def solve():
rec = list(range(1000000))
odd_rec = rec.copy()
for i in range(2, 181):
t = i * (i + 1) * (i + 2) // 6
if t % 2 == 0:
for i, tpl in enumerate(zip(rec[t:], rec), start=t):
a, b = tpl
b += 1
if b < a:
... | ||
s920136880 | p00748 | u072053884 | 1528704612 | Python | Python3 | py | Runtime Error | 0 | 0 | 837 | def solve():
rec = list(range(1000000))
odd_rec = rec.copy()
for i in range(2, 181):
t = i * (i + 1) * (i + 2) // 6
if t % 2 == 0:
for i, tpl in enumerate(zip(rec[t:], rec), start=t):
a, b = tpl
b += 1
if b < a:
... | ||
s462965267 | p00748 | u072053884 | 1528704789 | Python | Python3 | py | Runtime Error | 0 | 0 | 767 | def solve():
rec = list(range(1000000))
odd_rec = rec.copy()
for i in range(2, 181):
t = i * (i + 1) * (i + 2) // 6
if t % 2 == 0:
for i, tpl in enumerate(zip(rec[t:], rec), start=t):
a, b = tpl
b += 1
if b < a:
... | ||
s383724048 | p00748 | u591052358 | 1528873330 | Python | Python3 | py | Runtime Error | 0 | 0 | 640 | N = 10**6
N1 = [i for i in range(N+40)]
N2 = [i for i in range(N+40)]
N1[0] = 0
N2[0] = 0
p = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1]
p2 = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1 and n *(n+1)*(n+2)//6 % 2 ==1 ]
#print(p2)
for p_ in p:
if p_ > len(N1) :
... | ||
s595096174 | p00748 | u591052358 | 1528873946 | Python | Python3 | py | Runtime Error | 0 | 0 | 626 | N = 10**6
N1 = [i for i in range(N+40)]
N2 = [i for i in range(N+40)]
N1[0] = 0
N2[0] = 0
p = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1]
p2 = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1 and n *(n+1)*(n+2)//6 % 2 ==1 ]
#print(p2)
for p_ in p:
if p_ > N +1:
con... | ||
s591553304 | p00748 | u591052358 | 1528895848 | Python | Python3 | py | Runtime Error | 0 | 0 | 698 | N = 10**6
N1 = [i for i in range(N+40)]
N2 = [i for i in range(N+40)]
#N1[0] = 0
#N2[0] = 0
p = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1]
p2 = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1 and n *(n+1)*(n+2)//6 % 2 ==1 ]
#print(p2)
for p_ in p:
if p_ > N +1:
c... | ||
s092368276 | p00748 | u591052358 | 1528895951 | Python | Python3 | py | Runtime Error | 0 | 0 | 714 | N = 10**6
N1 = [i for i in range(N+40)]
N2 = [i for i in range(N+40)]
#N1[0] = 0
#N2[0] = 0
p = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1]
p2 = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1 and n *(n+1)*(n+2)//6 % 2 ==1 ]
#print(p2)
for p_ in p:
if p_ > N +1:
c... | ||
s075297440 | p00748 | u591052358 | 1528897329 | Python | Python3 | py | Runtime Error | 0 | 0 | 715 | N = 10**6
N1 = [i for i in range(N+40)]
N2 = [i for i in range(N+40)]
#N1[0] = 0
#N2[0] = 0
p = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1]
p2 = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1 and n *(n+1)*(n+2)//6 % 2 ==1 ]
#print(p2)
for p_ in p:
if p_ > N +1:
c... | ||
s029445554 | p00748 | u591052358 | 1528898106 | Python | Python3 | py | Runtime Error | 0 | 0 | 715 | N = 10**6
N1 = [i for i in range(N+40)]
N2 = [i for i in range(N+40)]
#N1[0] = 0
#N2[0] = 0
p = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1]
p2 = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1 and n *(n+1)*(n+2)//6 % 2 ==1 ]
#print(p2)
for p_ in p:
if p_ > N +1:
c... | ||
s981025696 | p00748 | u591052358 | 1529584229 | Python | Python3 | py | Runtime Error | 0 | 0 | 714 | N = 10**6
N1 = [i for i in range(N+40)]
N2 = [i for i in range(N+40)]
#N1[0] = 0
#N2[0] = 0
p = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1]
p2 = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1 and n *(n+1)*(n+2)//6 % 2 ==1 ]
#print(p2)
for p_ in p:
if p_ > N +1:
c... | ||
s832215295 | p00748 | u591052358 | 1529587371 | Python | Python3 | py | Runtime Error | 0 | 0 | 867 | N = 1000000
N1 = [i for i in range(N+40)]
N2 = [i for i in range(N+40)]
#N1[0] = 0
#N2[0] = 0
p = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1]
p2 = [n*(n+1)*(n+2)//6 for n in range(1,200) if n *(n+1)*(n+2)//6< N+1 and n *(n+1)*(n+2)//6 % 2 ==1 ]
#print(p2)
for p_ in p:
#if p_ > N +1:
#... | ||
s129238903 | p00748 | u855199458 | 1529684345 | Python | Python3 | py | Runtime Error | 0 | 0 | 675 | from collections import defaultdict
from bisect import bisect_left, bisect
def solve():
i = 1
P = []
x = 1
M = 10**6
while x < M:
P.append(x)
i += 1
x = (i)*(i+1)*(i+2)//6
P = P[1:]
Q = [p for p in P if p%2]
DP1 = list(range(M+1))
DP2 = list(range(M+1))
... | ||
s390415633 | p00748 | u855199458 | 1529684476 | Python | Python3 | py | Runtime Error | 0 | 0 | 675 | from collections import defaultdict
from bisect import bisect_left, bisect
def solve():
i = 1
P = []
x = 1
M = 10**6
while x < M:
P.append(x)
i += 1
x = (i)*(i+1)*(i+2)//6
P = P[1:]
Q = [p for p in P if p%2]
DP1 = list(range(M+1))
DP2 = list(range(M+1))
... | ||
s773578364 | p00748 | u855199458 | 1529684972 | Python | Python3 | py | Runtime Error | 0 | 0 | 715 | from collections import defaultdict
from bisect import bisect_left, bisect
def solve():
ans = []
i = 1
P = []
x = 1
M = 10**6
while x < M:
P.append(x)
i += 1
x = (i)*(i+1)*(i+2)//6
P = P[1:]
Q = [p for p in P if p%2]
DP1 = list(range(M+1))
DP2 = list... | ||
s322365021 | p00748 | u855199458 | 1529685212 | Python | Python3 | py | Runtime Error | 0 | 0 | 671 | # -*- coding: utf-8 -*-
from bisect import bisect_left, bisect
def solve():
i = 1
P = []
x = 1
M = 10**6
while x < M:
P.append(x)
i += 1
x = (i)*(i+1)*(i+2)//6
P = P[1:]
Q = [p for p in P if p%2]
DP1 = list(range(M+1))
DP2 = list(range(M+1))
for... | ||
s960899134 | p00748 | u855199458 | 1529686526 | Python | Python3 | py | Runtime Error | 0 | 0 | 21 | while True:
pass
| ||
s742759000 | p00748 | u072053884 | 1530108952 | Python | Python3 | py | Runtime Error | 0 | 0 | 770 | def solve():
rec = list(range(1000000))
odd_rec = rec.copy()
for i in range(2, 181):
t = i * (i + 1) * (i + 2) // 6
if t % 2 == 0:
for i, tpl in enumerate(zip(rec[t:], rec), start=t):
a, b = tpl
b += 1
if b < a:
... | ||
s341430311 | p00748 | u352394527 | 1530531974 | Python | Python3 | py | Runtime Error | 0 | 0 | 650 | INIT = 100
query = []
ans = []
while True:
q = int(input())
if q == 0:
break
query.append(q)
MAX = max(query)
table = [INIT] * (MAX + 1)
table[0] = 0
all_item = [i * (i + 1) * (i + 2) // 6 for i in range(1, 181)]
odd_item = [i for i in all_item if i % 2]
eve_item = [i for i in all_item if not i % 2]
for v ... | Traceback (most recent call last):
File "/tmp/tmpepaxb37h/tmpfoxyn7up.py", line 6, in <module>
q = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s837412197 | p00753 | u023525982 | 1556368405 | Python | Python | py | Runtime Error | 0 | 0 | 591 | def get(num):
n=0
is_prime=[0]*200050
for i in range(0,num+1):
is_prime[i]=True
is_prime[0]=is_prime[1]=False
for i in range(2,num+1):
if(is_prime[i]):
n+=1
for j in range(2*i,num+1,i):
is_prime[j]=False
return n
while True:
try:
... | Traceback (most recent call last):
File "/tmp/tmpljm11hoi/tmpfg9m0n7j.py", line 16, in <module>
a=map(int,raw_input().strip().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s762149602 | p00753 | u023525982 | 1556368889 | Python | Python | py | Runtime Error | 0 | 0 | 523 | def get(num):
n=0
is_prime=[0]*200050
for i in range(0,num+1):
is_prime[i]=True
is_prime[0]=is_prime[1]=False
for i in range(2,num+1):
if(is_prime[i]):
n+=1
for j in range(2*i,num+1,i):
is_prime[j]=False
return n
while True:
a=map(int,... | Traceback (most recent call last):
File "/tmp/tmpe01z3hvy/tmpvbyauevb.py", line 15, in <module>
a=map(int,raw_input().strip().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s895304775 | p00753 | u023525982 | 1556369501 | Python | Python | py | Runtime Error | 0 | 0 | 118 | while True:
a, b = map(int, raw_input().strip().split())
if a == 0 and b == 0:
break
print a + b,
| File "/tmp/tmp4o8zz6ps/tmpqd4a0o6n.py", line 5
print a + b,
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s836273104 | p00753 | u731235119 | 1421923887 | Python | Python | py | Runtime Error | 19930 | 8088 | 220 | import math
while 1:
n = int(raw_input())
if n == 0:
break
count = 0
for p in range(n+1,2*n+1):
for d in range(2, int(math.sqrt(p)) + 1):
if p != d and p % d == 0:
break
else:
count += 1
print count | File "/tmp/tmp5baoawqi/tmpnb7opu_7.py", line 13
print count
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s233441900 | p00753 | u731235119 | 1421924248 | Python | Python | py | Runtime Error | 19930 | 8088 | 219 | import math
while 1:
n = int(raw_input())
if n == 0:
break
count = 0
for p in range(n+1,2*n+1):
for d in range(2, int(math.sqrt(p)) + 1):
if p != d and p % d == 0:
break
else:
count += 1
print count | File "/tmp/tmpuhno6c1c/tmpubejez41.py", line 13
print count
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s272676397 | p00753 | u731235119 | 1421937349 | Python | Python | py | Runtime Error | 19930 | 8076 | 235 | import math
while 1:
n = int(raw_input())
if n == 0:
break
count = 0
for p in range(n+1,2*n+1):
d = 2
ub = math.sqrt(p) + 1
while d <= ub :
if p != d and p % d == 0:
break
d += 1
else:
count += 1
print count | File "/tmp/tmpttga254_/tmpm059qymt.py", line 16
print count
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s700357513 | p00753 | u124909914 | 1426155194 | Python | Python3 | py | Runtime Error | 19930 | 10104 | 504 | from math import sqrt
while True:
n = int(input())
if n == 0: break
nums = [ x for x in range(n, 2*n+1) if x % 2 == 1 or x == 2]
#print(nums)
for i in range(2,int(sqrt(2*n))):
nums = [x for x in nums if x % i != 0 or x == i]
#print(i, nums)
print(len(nums))
# ans = 0
# fo... | Traceback (most recent call last):
File "/tmp/tmpxgh3yaep/tmplb_cwwkd.py", line 4, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s583607218 | p00753 | u124909914 | 1426231232 | Python | Python3 | py | Runtime Error | 19930 | 10108 | 257 | from math import sqrt
while True:
n = int(input())
if n == 0: break
nums = [ x for x in range(n, 2*n+1) if x % 2 == 1 or x == 2]
for i in range(2,int(sqrt(2*n))):
nums = [x for x in nums if x % i != 0 or x == i]
print(len(nums)) | Traceback (most recent call last):
File "/tmp/tmpxmtz0zjq/tmpt6sff3w5.py", line 4, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s900588899 | p00753 | u248416507 | 1464095498 | Python | Python | py | Runtime Error | 0 | 0 | 423 | import math
def isPrime(x):
if x == 2:
return True
if x < 2 or x % 2 == 0:
return False
for i in range(3, int(math.sqrt((x))) + 1, 2):
if x % i == 0:
return False
return True
if __name__ == "__main__":
while True:
n = input()
ans = 0
f... | File "/tmp/tmpvsav5h_g/tmpko_30zc9.py", line 24
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s037048887 | p00753 | u633333374 | 1503533674 | Python | Python | py | Runtime Error | 40000 | 8000 | 269 | while 1:
n = int(input())
if n == 0:
break
lst = []
for i in range(n+1,n*2+1,1):
sum = 0
for j in range(2,i/2+1):
if i%j == 0:
sum += 1
if sum == 0:
lst.append(i)
print len(lst) | File "/tmp/tmpx9stcath/tmpvb43mbvo.py", line 13
print len(lst)
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s814492273 | p00753 | u633333374 | 1503535179 | Python | Python | py | Runtime Error | 40000 | 10356 | 431 | import math
while 1:
n = int(input())
if n == 0:
break
lst = []
for i in range(n+1,n*2+1,1):
sum = 0
if isinstance(math.sqrt(i),int) == False:
x = math.floor(math.sqrt(i)) + 1
else:
x = math.sqrt(i) + 1
for j in range(2,math.trunc(x)):
... | File "/tmp/tmpst52rxje/tmpdn2iejab.py", line 18
print len(lst)
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s236736605 | p00753 | u814249052 | 1370883790 | Python | Python | py | Runtime Error | 20000 | 6508 | 395 | def isPrimeNumber(number):
return all([number % i != 0 for i in range(2, number)])
def result(number):
return sum([isPrimeNumber(i) for i in range(number + 1, number * 2 + 1)])
if __name__ == "__main__":
import sys
import fileinput
for line in fileinput.input():
n = int(line.strip())
... | File "/tmp/tmppiyhpb__/tmp9cixw8i9.py", line 17
print result(n)
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s136677171 | p00753 | u814249052 | 1370883978 | Python | Python | py | Runtime Error | 0 | 0 | 427 | def isPrimeNumber(number):
from math import sqrt
return all([number % i != 0 for i in range(2, sqrt(number))])
def result(number):
return sum([isPrimeNumber(i) for i in range(number + 1, number * 2 + 1)])
if __name__ == "__main__":
import sys
import fileinput
for line in fileinput.input():
... | File "/tmp/tmpwtog0v_x/tmpuf8f9nnw.py", line 18
print result(n)
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s406359578 | p00754 | u328199937 | 1556031211 | Python | Python | py | Runtime Error | 0 | 0 | 628 | ans_list = []
while True:
s = input()
if s == ".":
break
q_list = ["" for i in range(len(s))]
now = -1
ans = "yes"
for i in list(s):
if i == "(" or i == "[":
now += 1
q_list[now] = i
elif i == ")" or i == "]":
if (i == ")" and q_list[no... | Traceback (most recent call last):
File "/tmp/tmpmgb0wzr1/tmplgm0j5ee.py", line 3, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.