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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s704836804 | p00481 | u940190657 | 1433661599 | Python | Python3 | py | Runtime Error | 19930 | 18644 | 1396 | import queue
# directions
x_dir = [0, 1, 0, -1]
y_dir = [1, 0, -1, 0]
# initialization visited maps
def init_visited_maps(h, w):
return [[True for i in range(w)] for j in range(h)]
# bfs algorithm
def bfs(h, w, cheese, maps, sx, sy, moves):
que = queue.Queue()
que.put((moves, sx, sy))
visited = in... | Traceback (most recent call last):
File "/tmp/tmpbs879o36/tmprvi4dldg.py", line 68, in <module>
main()
File "/tmp/tmpbs879o36/tmprvi4dldg.py", line 50, in main
str = (input()).split()
^^^^^^^
EOFError: EOF when reading a line
| |
s207319350 | p00481 | u940190657 | 1433662020 | Python | Python3 | py | Runtime Error | 19920 | 18648 | 1404 | import queue
# directions
x_dir = [0, 1, 0, -1]
y_dir = [1, 0, -1, 0]
# bfs algorithm
def bfs(h, w, cheese, maps, sx, sy, moves, visited):
que = queue.Queue()
que.put((moves, sx, sy))
for i in range(h):
for j in range(w):
visited[i][j] = True
visited[sy][sx] = False
while ... | Traceback (most recent call last):
File "/tmp/tmpyfkyml3a/tmpgc_3w9u8.py", line 69, in <module>
main()
File "/tmp/tmpyfkyml3a/tmpgc_3w9u8.py", line 51, in main
str = (input()).split()
^^^^^^^
EOFError: EOF when reading a line
| |
s226872146 | p00481 | u940190657 | 1433663434 | Python | Python3 | py | Runtime Error | 19920 | 19492 | 1438 | import queue
# directions
x_dir = [0, 1, 0, -1]
y_dir = [1, 0, -1, 0]
visited = [[True for i in range(1000)] for j in range(1000)]
maps = []
# bfs algorithm
def bfs(h, w, cheese, sx, sy, moves):
que = queue.Queue()
que.put((moves, sx, sy))
for i in range(h):
for j in range(w):
visi... | Traceback (most recent call last):
File "/tmp/tmpel7fv3d5/tmpbpy1x6a2.py", line 74, in <module>
main()
File "/tmp/tmpel7fv3d5/tmpbpy1x6a2.py", line 54, in main
str = (input()).split()
^^^^^^^
EOFError: EOF when reading a line
| |
s279781729 | p00481 | u940190657 | 1433664782 | Python | Python3 | py | Runtime Error | 19920 | 18612 | 1280 | import queue
# directions
x_dir = [0, 1, 0, -1]
y_dir = [1, 0, -1, 0]
# map info
visited = []
maps = []
# bfs algorithm
def bfs(h, w, cheese, sx, sy, moves):
que = queue.Queue()
que.put((moves, sx, sy))
for i in range(h):
for j in range(w):
visited[i][j] = (maps[i][j] != 'X')
v... | Traceback (most recent call last):
File "/tmp/tmpj_bdpkmq/tmp_l9p_b1o.py", line 41, in <module>
str = (input()).split()
^^^^^^^
EOFError: EOF when reading a line
| |
s945219944 | p00481 | u940190657 | 1434379919 | Python | Python3 | py | Runtime Error | 0 | 0 | 1228 | # directions
x_dir = [0, 1, 0, -1]
y_dir = [1, 0, -1, 0]
# map info
visited = []
maps = []
# bfs algorithm
def bfs(h, w, cheese, sx, sy, moves):
que = [(moves, sx, sy)]
for i in range(h):
for j in range(w):
visited[i][j] = (maps[i][j] != 'X')
visited[sy][sx] = False
while len(qu... | Traceback (most recent call last):
File "/tmp/tmpyc6xfno8/tmpv1rr0a7t.py", line 37, in <module>
str = (input()).split()
^^^^^^^
EOFError: EOF when reading a line
| |
s069891944 | p00481 | u421925564 | 1461728425 | Python | Python3 | py | Runtime Error | 40000 | 47972 | 1422 | import copy
h = w = 0
mymap =[]
const_mymap = []
qlist = []
ans = 0
def bfs(n):
while True:
if len(qlist) != 0:
temp = qlist.pop(0)
x = temp[0]
y = temp[1]
deep = temp[2]
#print(temp)
if mymap[y][x] == str(n):
return ... | Traceback (most recent call last):
File "/tmp/tmpsycqvyfy/tmpka6l4gqu.py", line 35, in <module>
h, w, n = list(map(lambda x: int(x), input().split(" ")))
^^^^^^^
EOFError: EOF when reading a line
| |
s529528600 | p00481 | u884495090 | 1461826976 | Python | Python | py | Runtime Error | 40000 | 38828 | 849 | #!/usr/bin/env python
vector = [[1,0],[-1,0],[0,1],[0,-1]]
matrix = []
visited = []
q = []
h,w,n = map(int,raw_input().split())
s_x = 0
s_y = 0
for i in xrange(h):
matrix.append( list(raw_input()))
visited.append([0]*w)
if 'S' in matrix[i]:
s_y = i
s_x = matrix[i].index('S')
ans = 0
for t in xrange(n)... | File "/tmp/tmpphcvtyq0/tmph3zufyl2.py", line 43
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s856809203 | p00481 | u577311000 | 1493719860 | Python | Python3 | py | Runtime Error | 40000 | 7800 | 1342 | # -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**7)
def search(field,distance,ch,cv,eh,ev,step):
if not (0<=ch<len(field)): return
if not (0<=cv<len(field[ch])): return
if field[ch][cv]=='X': return
if distance[ch][cv]<step: return
distance[ch][cv] = step
search(field,distance,ch+1,cv,eh,ev,st... | Traceback (most recent call last):
File "/tmp/tmpccj2a72s/tmptm34n4f9.py", line 52, in <module>
main()
File "/tmp/tmpccj2a72s/tmptm34n4f9.py", line 37, in main
line=input().strip()
^^^^^^^
EOFError: EOF when reading a line
| |
s208116348 | p00481 | u577311000 | 1493723004 | Python | Python3 | py | Runtime Error | 0 | 0 | 1355 | # -*- coding: utf-8 -*-
def get_shortest_distance(field,locations,current_HP):
is_visit = [[False for _ in range(len(field[0]))] for __ in range(len(field))]
frontier = set()
frontier.add(locations[current_HP-1])
for step in xrange(10**10):
for cx,cy in frontier:
if (cx,cy)==locations[current_HP]: return step... | Traceback (most recent call last):
File "/tmp/tmpf40jtyhp/tmp9xj495wc.py", line 47, in <module>
main()
File "/tmp/tmpf40jtyhp/tmp9xj495wc.py", line 32, in main
line=input().strip()
^^^^^^^
EOFError: EOF when reading a line
| |
s336608824 | p00481 | u940389926 | 1493742517 | Python | Python3 | py | Runtime Error | 0 | 0 | 3212 | import sys
import numpy
sys.setrecursionlimit(1000000)
class MouseClass:
def __init__(self):
self.X = 0
self.Y = 0
self.LIFE = 1
self.factoriesAble = []
self.factoriesGone = []
self.factoriesWill = []
self.distance = 0
def get_field(self, field:list):
self.field = field
def gen_factoriesInfo(self,... | Traceback (most recent call last):
File "/tmp/tmp7qgy9i3a/tmpdqoonbev.py", line 114, in <module>
Field.loadField()
File "/tmp/tmp7qgy9i3a/tmpdqoonbev.py", line 86, in loadField
H, W = int(line[0]), int(line[1])
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s007533167 | p00481 | u945345165 | 1494905257 | Python | Python3 | py | Runtime Error | 40000 | 69400 | 1001 | def bfs(count, x, y, cheese):
queue = [(count,x,y)]
while len(queue)>0:
tempc,tempx,tempy = queue.pop(0)
if geo[tempx][tempy] == cheese:
return tempc,tempx,tempy
for i in range(4):
neox = tempx+dx[i]
neoy = tempy+dy[i]
if canGoTo(neox,neoy)... | Traceback (most recent call last):
File "/tmp/tmpeap7re3a/tmpmzqd2dvq.py", line 23, in <module>
data = input().split(' ')
^^^^^^^
EOFError: EOF when reading a line
| |
s450836795 | p00481 | u945345165 | 1494927972 | Python | Python3 | py | Runtime Error | 40000 | 7896 | 1058 | def bfs(count, x, y, cheese):
queue = [(count,x,y)]
while len(queue)>0:
tempc,tempx,tempy = queue.pop(0)
if geo[tempx][tempy] == cheese:
return tempc,tempx,tempy
for i in range(4):
neox = tempx+dx[i]
neoy = tempy+dy[i]
if canGoTo(neox,neoy)... | Traceback (most recent call last):
File "/tmp/tmpkfncawnh/tmpsr_purre.py", line 24, in <module>
data = input().split(' ')
^^^^^^^
EOFError: EOF when reading a line
| |
s041011298 | p00481 | u028939600 | 1495362775 | Python | Python3 | py | Runtime Error | 0 | 0 | 2389 | import sys
sys.setrecursionlimit(100000000)
def getStart(field): # before this, cut the first [H,W,N]
search_field = field[1:]
for i in range(len(search_field)):
for j in range(len(search_field[0])):
if search_field[i][j] == "S":
print("start point ({},{})".format(i+1,j... | Traceback (most recent call last):
File "/tmp/tmphv2q9vt_/tmpgzi4l9a3.py", line 77, in <module>
main()
File "/tmp/tmphv2q9vt_/tmpgzi4l9a3.py", line 72, in main
field = getField()
^^^^^^^^^^
File "/tmp/tmphv2q9vt_/tmpgzi4l9a3.py", line 38, in getField
row = input().split()
^^^^^^^... | |
s608561953 | p00481 | u028939600 | 1495377707 | Python | Python3 | py | Runtime Error | 0 | 0 | 2047 | def getField():
matrix = []
while True:
row = input().split()
if len(row) == 1:
re_row = []
for char in row[0]:
if char.isdigit():
re_row.append(int(char))
else:
re_row.append(char)
matrix... | Traceback (most recent call last):
File "/tmp/tmp1qt3qykr/tmphmkxjv1x.py", line 63, in <module>
main()
File "/tmp/tmp1qt3qykr/tmphmkxjv1x.py", line 58, in main
field = getField()
^^^^^^^^^^
File "/tmp/tmp1qt3qykr/tmphmkxjv1x.py", line 4, in getField
row = input().split()
^^^^^^^
... | |
s897980623 | p00481 | u028939600 | 1495378199 | Python | Python3 | py | Runtime Error | 0 | 0 | 1941 |
def getStart(field):
search_field = field[1:] # cut the first [H,W,N] for min_path matrix
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],... | Traceback (most recent call last):
File "/tmp/tmps5bj3q8r/tmplno8w0gq.py", line 45, in <module>
row = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s639789445 | p00481 | u028939600 | 1495378389 | Python | Python3 | py | Runtime Error | 0 | 0 | 2486 | import sys
sys.setrecursionlimit(100000000)
def getStart(field):
search_field = field[1:] # cut the first [H,W,N] for min_path matrix
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,star... | Traceback (most recent call last):
File "/tmp/tmp28pjzizf/tmpok4vfe7p.py", line 61, in <module>
row = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s396944705 | p00481 | u028939600 | 1495379029 | Python | Python3 | py | Runtime Error | 0 | 0 | 2412 |
def getStart(field):
search_field = field[1:] # cut the first [H,W,N] for min_path matrix
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],... | Traceback (most recent call last):
File "/tmp/tmpe_ax_e_o/tmpefknkg31.py", line 57, in <module>
row = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s155197109 | p00481 | u028939600 | 1495379096 | Python | Python3 | py | Runtime Error | 0 | 0 | 2418 |
def getStart(field):
search_field = field[1:] # cut the first [H,W,N] for min_path matrix
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],... | Traceback (most recent call last):
File "/tmp/tmpub1hya06/tmpuzyph6wk.py", line 57, in <module>
row = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s607279528 | p00481 | u028939600 | 1495379261 | Python | Python3 | py | Runtime Error | 0 | 0 | 2427 |
def getStart(field):
search_field = field[1:] # cut the first [H,W,N] for min_path matrix
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],... | Traceback (most recent call last):
File "/tmp/tmpuo2lwl8c/tmp7su6ssja.py", line 57, in <module>
row = input().rstrip().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s373074667 | p00481 | u028939600 | 1495379902 | Python | Python3 | py | Runtime Error | 0 | 0 | 1662 | import sys
sys.setrecursionlimit(100000000)
moves = [(0, -1), (0, 1), (-1, 0), (1, 0)]
def search(dataset):
min_time = 0
mouse = 1
gx, gy = get_start(dataset)
for i in xrange(N):
gx, gy, min_time_tmp = bfs(dataset, (gx, gy), mouse)
mouse += 1
min_time += min_time_tmp
pr... | File "/tmp/tmpzbskgi80/tmpntq59575.py", line 15
print min_time
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s561358968 | p00481 | u028939600 | 1495385789 | Python | Python3 | py | Runtime Error | 0 | 0 | 1672 |
def getStart(field):
search_field = field[1:]
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
gotten_cheese = 1
d... | Traceback (most recent call last):
File "/tmp/tmpyi_rbprv/tmpk9mjrc2m.py", line 44, in <module>
row = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s422169442 | p00481 | u028939600 | 1495385902 | Python | Python3 | py | Runtime Error | 0 | 0 | 1689 |
def getStart(field):
search_field = field[1:]
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
gotten_cheese = 1
d... | Traceback (most recent call last):
File "/tmp/tmp5mtt6mcw/tmpthk9ob7r.py", line 44, in <module>
row = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s794314891 | p00481 | u028939600 | 1495385952 | Python | Python3 | py | Runtime Error | 0 | 0 | 1698 |
def getStart(field):
search_field = field[1:]
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
gotten_cheese = 1
d... | Traceback (most recent call last):
File "/tmp/tmpls2p7c0d/tmpdgq1l781.py", line 44, in <module>
row = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s848212421 | p00481 | u028939600 | 1495386065 | Python | Python3 | py | Runtime Error | 0 | 0 | 1707 |
def getStart(field):
search_field = field[1:]
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
gotten_cheese = 1
d... | Traceback (most recent call last):
File "/tmp/tmpf193ing3/tmpuhc7f_zk.py", line 44, in <module>
row = input().rstrip().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s143027214 | p00481 | u028939600 | 1495386130 | Python | Python3 | py | Runtime Error | 0 | 0 | 1694 |
def getStart(field):
search_field = field[1:]
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
gotten_cheese = 1
d... | Traceback (most recent call last):
File "/tmp/tmp4z8afx48/tmps59bhu9f.py", line 44, in <module>
row = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s655580596 | p00481 | u028939600 | 1495386679 | Python | Python3 | py | Runtime Error | 0 | 0 | 1693 |
def getStart(field):
search_field = field[1:]
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
gotten_cheese = 1
d... | Traceback (most recent call last):
File "/tmp/tmpewberiz6/tmpe0x5357r.py", line 44, in <module>
row = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s261745845 | p00481 | u028939600 | 1495386969 | Python | Python3 | py | Runtime Error | 0 | 0 | 1695 |
def getStart(field):
search_field = field[1:]
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
gotten_cheese = 1
d... | Traceback (most recent call last):
File "/tmp/tmp86cjgn9n/tmp7qf0jgqd.py", line 44, in <module>
row = [input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s043942970 | p00481 | u028939600 | 1495387025 | Python | Python3 | py | Runtime Error | 0 | 0 | 2791 |
def getStart(field):
search_field = field[1:] # cut the first [H,W,N] for min_path matrix
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],... | Traceback (most recent call last):
File "/tmp/tmp_w85dm2e/tmpc0wexy9y.py", line 57, in <module>
row = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s287158648 | p00481 | u028939600 | 1495426084 | Python | Python3 | py | Runtime Error | 0 | 0 | 2650 |
def getStart(field):
search_field = field[1:] # cut the first [H,W,N] for min_path matrix
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goal_N):
direction = [[-1,0],... | File "/tmp/tmpaaoaeuig/tmpl66jd1be.py", line 17
min_path = [[INF] * field[0][1]] for i in range(field[0][0])] #[[INF for j in range(field[0][1])] for i in range(field[0][0])]
^
SyntaxError: unmatched ']'
| |
s734329953 | p00481 | u028939600 | 1495429033 | Python | Python3 | py | Runtime Error | 30 | 8052 | 2598 | from collections import deque
def getStart(field):
search_field = field[1:] # cut the first [H,W,N] for min_path matrix
for y in range(len(search_field)):
for x in range(len(search_field[0])):
if search_field[y][x] == "S":
return x,y+1
def bfs(field,start_x,start_y,goa... | Traceback (most recent call last):
File "/tmp/tmprpsot327/tmpb943peeu.py", line 62, in <module>
row = input().rstrip().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s828713832 | p00481 | u028939600 | 1495436212 | Python | Python3 | py | Runtime Error | 0 | 0 | 1754 |
def bfs(field,start_x,start_y,tmp_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
que = []
que.append([start_x,start_y])
INF = 1000000
min_path = [[INF] * field[0][1] for i in range(field[0][0])]
min_path[start_y][start_x] = 0
while len(que) != 0:
current = que.pop(0)
for d in d... | Traceback (most recent call last):
File "/tmp/tmpm3xpmzoi/tmpn6gyjhq7.py", line 58, in <module>
main()
File "/tmp/tmpm3xpmzoi/tmpn6gyjhq7.py", line 40, in main
matrix,N = getField()
^^^^^^^^^^
File "/tmp/tmpm3xpmzoi/tmpn6gyjhq7.py", line 23, in getField
first = input().strip()
... | |
s620733962 | p00481 | u028939600 | 1495437196 | Python | Python3 | py | Runtime Error | 0 | 0 | 1609 | moves = [(0, -1), (0, 1), (-1, 0), (1, 0)]
def search(dataset):
min_time = 0
mouse = 1
gx, gy = get_start(dataset)
for i in xrange(N):
gx, gy, min_time_tmp = bfs(dataset, (gx, gy), mouse)
mouse += 1
min_time += min_time_tmp
print(min_time)
def bfs(dataset, start, mous... | Traceback (most recent call last):
File "/tmp/tmp91b704gb/tmpw5nr0_1p.py", line 49, in <module>
line = input().rstrip().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s687817971 | p00481 | u028939600 | 1495437895 | Python | Python3 | py | Runtime Error | 0 | 0 | 1563 | def bfs(field,H,W,start_x,start_y,tmp_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
que = []
que.append([start_x,start_y])
INF = 1000000
min_path = [[INF] * W for i in range(H)]
min_path[start_y][start_x] = 0
while len(que) != 0:
current = que.pop(0)
for d in direction:
... | Traceback (most recent call last):
File "/tmp/tmpm7fm8me0/tmpgv8gycl6.py", line 52, in <module>
main()
File "/tmp/tmpm7fm8me0/tmpgv8gycl6.py", line 39, in main
matrix,H,W,N = getField()
^^^^^^^^^^
File "/tmp/tmpm7fm8me0/tmpgv8gycl6.py", line 22, in getField
first = input().strip()
... | |
s295165093 | p00481 | u198881450 | 1495438126 | Python | Python3 | py | Runtime Error | 0 | 0 | 1563 | def bfs(field,H,W,start_x,start_y,tmp_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
que = []
que.append([start_x,start_y])
INF = 1000000
min_path = [[INF] * W for i in range(H)]
min_path[start_y][start_x] = 0
while len(que) != 0:
current = que.pop(0)
for d in direction:
... | Traceback (most recent call last):
File "/tmp/tmpt6jb2cqd/tmp31_s9s0h.py", line 52, in <module>
main()
File "/tmp/tmpt6jb2cqd/tmp31_s9s0h.py", line 39, in main
matrix,H,W,N = getField()
^^^^^^^^^^
File "/tmp/tmpt6jb2cqd/tmp31_s9s0h.py", line 22, in getField
first = input().strip()
... | |
s621955689 | p00481 | u198881450 | 1495438309 | Python | Python | py | Runtime Error | 0 | 0 | 1570 | def bfs(field,H,W,start_x,start_y,tmp_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
que = []
que.append([start_x,start_y])
INF = 1000000
min_path = [[INF] * W for i in xrange(H)]
min_path[start_y][start_x] = 0
while len(que) != 0:
current = que.pop(0)
for d in direction:
... | File "/tmp/tmp996sx_6_/tmp9nu4tpak.py", line 49
print distance
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s345091932 | p00481 | u198881450 | 1495438449 | Python | Python | py | Runtime Error | 0 | 0 | 1571 | def bfs(field,H,W,start_x,start_y,tmp_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
que = []
que.append([start_x,start_y])
INF = 1000000
min_path = [[INF] * W for i in xrange(H)]
min_path[start_y][start_x] = 0
while len(que) != 0:
current = que.pop(0)
for d in direction:
... | File "/tmp/tmpkhad65qb/tmp17_ibzj0.py", line 49
print distance
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s012309421 | p00481 | u198881450 | 1495438542 | Python | Python | py | Runtime Error | 0 | 0 | 1571 | def bfs(field,H,W,start_x,start_y,tmp_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
que = []
que.append([start_x,start_y])
INF = 1000000
min_path = [[INF] * W for i in xrange(H)]
min_path[start_y][start_x] = 0
while len(que) != 0:
current = que.pop(0)
for d in direction:
... | File "/tmp/tmpf_zdc7t8/tmpsbhbai2u.py", line 49
print distance
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s080984529 | p00481 | u198881450 | 1495438558 | Python | Python | py | Runtime Error | 0 | 0 | 1542 | def bfs(field,H,W,start_x,start_y,tmp_N):
direction = [[-1,0],[1,0],[0,-1],[0,1]]
que = []
que.append([start_x,start_y])
INF = 1000000
min_path = [[INF] * W for i in xrange(H)]
min_path[start_y][start_x] = 0
while len(que) != 0:
current = que.pop(0)
for d in direction:
... | File "/tmp/tmp0bqq5szs/tmpo4b1lndy.py", line 49
print distance
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s105604092 | p00481 | u695154284 | 1505318719 | Python | Python3 | py | Runtime Error | 0 | 0 | 1210 | from collections import deque
d = [(1, 0), (-1, 0), (0, 1), (0, -1)]
def bfs(n):
global pos_x, pos_y
while len(que) != 0:
x, y = que.popleft()
for dx, dy in d:
if 0 <= x + dx < W and 0 <= y + dy < H:
if meiz[x + dx][y + dy] == str(n):
pos_x = x ... | Traceback (most recent call last):
File "/tmp/tmpfcz4dwrl/tmpl88cte4m.py", line 24, in <module>
H, W, N = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s432873299 | p00481 | u072053884 | 1517476399 | Python | Python3 | py | Runtime Error | 30 | 6008 | 2125 | import sys
file_input = sys.stdin
H, W, N = map(int, file_input.readline().split())
town_map = file_input.read()
start_index = town_map.index('S')
mouse = [start_index, 0, [start_index]]
# position, elapsed time, visited lot
from collections import deque
for goal in range(1, N + 1):
q = deque()
goal = st... | Traceback (most recent call last):
File "/tmp/tmp6dnm1k6h/tmpg2ngi165.py", line 5, in <module>
H, W, N = map(int, file_input.readline().split())
^^^^^^^
ValueError: not enough values to unpack (expected 3, got 0)
| |
s609816599 | p00481 | u766926358 | 1525857000 | Python | Python3 | py | Runtime Error | 30 | 6012 | 1009 | from collections import deque
import sys
sys.setrecursionlimit(10000)
H, W, N = map(int, input().split())
field = [list(input()) for i in range(H)]
us = [str(i) for i in range(N, 0, -1)]
queue = deque([])
dx = [1,0,-1,0]
dy = [0,1,0,-1]
def search(posi):
global flag
global us
global count
global queue
x, y, c =... | Traceback (most recent call last):
File "/tmp/tmpwy4fr62n/tmp6iq23h4c.py", line 5, in <module>
H, W, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s788381983 | p00481 | u766926358 | 1525858381 | Python | Python3 | py | Runtime Error | 30 | 6012 | 899 | from collections import deque
import sys
sys.setrecursionlimit(10000)
H, W, N = map(int, input().split())
field = [list(input()) for i in range(H)]
us = [str(i) for i in range(N, 0, -1)]
queue = deque([])
dx = [1,0,-1,0]
dy = [0,1,0,-1]
def search():
global flag
global us
global count
global queue
x, y, c = que... | Traceback (most recent call last):
File "/tmp/tmpm9vnux4a/tmpnw42qwnu.py", line 5, in <module>
H, W, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s678880456 | p00481 | u766926358 | 1525858590 | Python | Python3 | py | Runtime Error | 30 | 6012 | 890 | from collections import deque
H, W, N = map(int, input().split())
field = [list(input()) for i in range(H)]
us = [str(i) for i in range(N, 0, -1)]
queue = deque([])
dx = [1,0,-1,0]
dy = [0,1,0,-1]
def search():
global flag
global us
global count
global queue
while queue:
x, y, c = queue.popleft()
if (fie... | Traceback (most recent call last):
File "/tmp/tmpcdg9zpeg/tmps0d0b3tt.py", line 3, in <module>
H, W, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s773936454 | p00481 | u766926358 | 1525864102 | Python | Python3 | py | Runtime Error | 1430 | 18712 | 806 | from collections import deque
H, W, N = map(int, input().split())
field = [list(input()) for i in range(H)]
node_posi = {}
Q = deque()
def search(start, goal):
Q.append(start)
while Q:
x, y, c = Q.popleft()
searched[y][x] = 1
if ([x, y, 0] == goal):
return c
for q in range(4):
nx = x + [1,0,-1,0... | Traceback (most recent call last):
File "/tmp/tmp84c_3ap0/tmpc52qbj_7.py", line 3, in <module>
H, W, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s645155206 | p00481 | u766926358 | 1525864299 | Python | Python3 | py | Runtime Error | 1570 | 18712 | 779 | from collections import deque
H, W, N = map(int, input().split())
field = [list(input()) for i in range(H)]
node_posi = {}
Q = deque()
def search(start, goal):
Q.append(start)
while Q:
x, y, c = Q.popleft()
searched[y][x] = 1
if ([x, y, 0] == goal):
return c
for q in range(4):
nx = x + [1,0,-1,0... | Traceback (most recent call last):
File "/tmp/tmpexxlhrbi/tmp08_cg182.py", line 3, in <module>
H, W, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s606138553 | p00481 | u352394527 | 1525936944 | Python | Python3 | py | Runtime Error | 60 | 7172 | 1095 | import queue
h,w,n = map(int,input().split())
factrys = [None] * (n + 1)
ss = ["X" * (w + 2)]
for i in range(h):
s = "X" + input() + "X"
if "S" in s:
factrys[0] = (i + 1,s.index("S"))
for j in range(1,n + 1):
if str(j) in s:
factrys[j] = (i + 1,s.index(str(j)))
ss.append(s)
ss.append("X" * (w + 2)... | Traceback (most recent call last):
File "/tmp/tmpehyznflw/tmpj7gzf7vq.py", line 2, in <module>
h,w,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s100498812 | p00481 | u352394527 | 1525937057 | Python | Python3 | py | Runtime Error | 140 | 10844 | 1138 | import sys
import queue
sys.setrecursionlimit(10000000)
h,w,n = map(int,input().split())
factrys = [None] * (n + 1)
ss = ["X" * (w + 2)]
for i in range(h):
s = "X" + input() + "X"
if "S" in s:
factrys[0] = (i + 1,s.index("S"))
for j in range(1,n + 1):
if str(j) in s:
factrys[j] = (i + 1,s.index(str(... | Traceback (most recent call last):
File "/tmp/tmpdj5kghpv/tmp4cv80bqz.py", line 4, in <module>
h,w,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s495741969 | p00481 | u352394527 | 1525937774 | Python | Python3 | py | Runtime Error | 140 | 6952 | 1129 | import queue
h,w,n = map(int,input().split())
factrys = [None] * (n + 1)
ss = ["X" * (w + 2)]
for i in range(h):
s = "X" + input() + "X"
if "S" in s:
factrys[0] = (i + 1,s.index("S"))
for j in range(1,n + 1):
if str(j) in s:
factrys[j] = (i + 1,s.index(str(j)))
ss.append(s)
ss.append("X" * (w + 2)... | Traceback (most recent call last):
File "/tmp/tmpv23rfgx4/tmpft546afr.py", line 2, in <module>
h,w,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s037771115 | p00481 | u352394527 | 1525941083 | Python | Python3 | py | Runtime Error | 0 | 0 | 1499 | import queue
h,w,n = map(int,input().split())
factrys = [None] * (n + 1)
ss = ["X" * (w + 2)]
for i in range(h):
s = "X" + input() + "X"
if "S" in s:
factrys[0] = (i + 1, s.index("S"))
for j in range(1,n + 1):
if str(j) in s:
factrys[j] = (i + 1, s.index(str(j)))
ss.append(s)
ss.append("X" * (w + ... | File "/tmp/tmpfq2k5bji/tmp6xkghwae.py", line 56
que = queue.Queue()]
^
SyntaxError: unmatched ']'
| |
s042477423 | p00481 | u352394527 | 1525941164 | Python | Python3 | py | Runtime Error | 50 | 6856 | 1498 | import queue
h,w,n = map(int,input().split())
factrys = [None] * (n + 1)
ss = ["X" * (w + 2)]
for i in range(h):
s = "X" + input() + "X"
if "S" in s:
factrys[0] = (i + 1, s.index("S"))
for j in range(1,n + 1):
if str(j) in s:
factrys[j] = (i + 1, s.index(str(j)))
ss.append(s)
ss.append("X" * (w + ... | Traceback (most recent call last):
File "/tmp/tmp5av144_t/tmporo6f74_.py", line 2, in <module>
h,w,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s806718734 | p00481 | u352394527 | 1525941354 | Python | Python3 | py | Runtime Error | 140 | 6952 | 1498 | import queue
h,w,n = map(int,input().split())
factrys = [None] * (n + 1)
ss = ["X" * (w + 2)]
for i in range(h):
s = "X" + input() + "X"
if "S" in s:
factrys[0] = (i + 1, s.index("S"))
for j in range(1,n + 1):
if str(j) in s:
factrys[j] = (i + 1, s.index(str(j)))
ss.append(s)
ss.append("X" * (w + ... | Traceback (most recent call last):
File "/tmp/tmpinxu9ywm/tmpc0ljnpj_.py", line 2, in <module>
h,w,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s302069088 | p00481 | u352394527 | 1525942887 | Python | Python3 | py | Runtime Error | 0 | 0 | 1189 | import queue
h,w,n = map(int,input().split())
factrys = [None] * (n + 1)
ss = ["X" * (w + 2)]
for i in range(h):
s = "X" + input() + "X"
if "S" in s:
factrys[0] = (i + 1, s.index("S"))
for j in range(1,n + 1):
if str(j) in s:
factrys[j] = (i + 1, s.index(str(j)))
ss.append(s)
ss.append("X" * (w + ... | Traceback (most recent call last):
File "/tmp/tmpqqzjcmju/tmpvd2b4uhb.py", line 2, in <module>
h,w,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s576183556 | p00481 | u352394527 | 1525943016 | Python | Python3 | py | Runtime Error | 160 | 6948 | 1186 | import queue
h,w,n = map(int,input().split())
factrys = [None] * (n + 1)
ss = ["X" * (w + 2)]
for i in range(h):
s = "X" + input() + "X"
if "S" in s:
factrys[0] = (i + 1, s.index("S"))
for j in range(1,n + 1):
if str(j) in s:
factrys[j] = (i + 1, s.index(str(j)))
ss.append(s)
ss.append("X" * (w + ... | Traceback (most recent call last):
File "/tmp/tmp0u47j21c/tmp9l2sn9v7.py", line 2, in <module>
h,w,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s499563284 | p00481 | u352394527 | 1525943502 | Python | Python3 | py | Runtime Error | 130 | 6900 | 1189 | import queue
from collections import deque
h,w,n = map(int,input().split())
factrys = [None] * (n + 1)
ss = ["X" * (w + 2)]
for i in range(h):
s = "X" + input() + "X"
if "S" in s:
factrys[0] = (i + 1, s.index("S"))
for j in range(1,n + 1):
if str(j) in s:
factrys[j] = (i + 1, s.index(str(j)))
ss.a... | Traceback (most recent call last):
File "/tmp/tmpwddmdel9/tmpilb3bama.py", line 3, in <module>
h,w,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s896918749 | p00481 | u766926358 | 1525968760 | Python | Python3 | py | Runtime Error | 0 | 0 | 1297 | h,w,n = map(int, input().split())
stage = [input() for i in range(h)]
starts = [str(i) for i in range(n)]
goals = [str(i+1) for i in range(n)]
starts_y = [0 for i in range(n)]
starts_x = [0 for i in range(n)]
goals_y = [0 for i in range(n)]
goals_x = [0 for i in range(n)]
starts[0] = "S"
for y in range(h):
for x in r... | Traceback (most recent call last):
File "/tmp/tmp96tvelj9/tmpjqf6l7f3.py", line 1, in <module>
h,w,n = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s961259576 | p00481 | u766926358 | 1525968806 | Python | Python3 | py | Runtime Error | 0 | 0 | 1297 | h,w,n = map(int, input().split())
stage = [input() for i in range(h)]
starts = [str(i) for i in range(n)]
goals = [str(i+1) for i in range(n)]
starts_y = [0 for i in range(n)]
starts_x = [0 for i in range(n)]
goals_y = [0 for i in range(n)]
goals_x = [0 for i in range(n)]
starts[0] = "S"
for y in range(h):
for x in r... | Traceback (most recent call last):
File "/tmp/tmpp5w4_t09/tmpxphsowj2.py", line 1, in <module>
h,w,n = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s251392599 | p00481 | u766926358 | 1525969022 | Python | Python3 | py | Runtime Error | 0 | 0 | 1313 | h,w,n = map(int, input().split())
stage = [input() for i in range(h)]
starts = [str(i) for i in range(n)]
goals = [str(i+1) for i in range(n)]
starts_y = [0 for i in range(n)]
starts_x = [0 for i in range(n)]
goals_y = [0 for i in range(n)]
goals_x = [0 for i in range(n)]
starts[0] = "S"
for y in range(h):
for x in r... | Traceback (most recent call last):
File "/tmp/tmpxri9fykl/tmpoi4imvgg.py", line 1, in <module>
h,w,n = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s393386398 | p00481 | u766926358 | 1525970567 | Python | Python3 | py | Runtime Error | 1590 | 18712 | 779 | from collections import deque
H, W, N = map(int, input().split())
field = [list(input()) for i in range(H)]
node_posi = {}
Q = deque()
def search(start, goal):
Q.append(start)
while Q:
x, y, c = Q.popleft()
searched[y][x] = 1
if ([x, y, 0] == goal):
return c
for q in range(4):
nx = x + [1,0,-1,0... | Traceback (most recent call last):
File "/tmp/tmpitv01936/tmp_m_k96vt.py", line 3, in <module>
H, W, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s911736805 | p00481 | u766926358 | 1525970800 | Python | Python3 | py | Runtime Error | 5360 | 18360 | 740 | H, W, N = map(int, input().split())
field = [list(input()) for i in range(H)]
node_posi = {}
Q = []
def search(start, goal):
Q.append(start)
while Q:
x, y, c = Q.pop(0)
searched[y][x] = 1
if ([x, y, 0] == goal):
return c
for q in range(4):
nx = x + [1,0,-1,0][q]
ny = y + [0,1,0,-1][q]
if (n... | Traceback (most recent call last):
File "/tmp/tmp5fskaj_0/tmps_oibogv.py", line 1, in <module>
H, W, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s868628418 | p00481 | u766926358 | 1525971119 | Python | Python3 | py | Runtime Error | 5990 | 18364 | 719 | H, W, N = map(int, input().split())
field = [list(input()) for i in range(H)]
node_posi = {}
Q = []
for i in range(H):
for j in range(W):
if field[i][j] in 'S123456789':
node_posi[field[i][j]] = [j, i, 0]
s = 'S123456789'
cost = 0
for i in range(len(node_posi)-1):
Q.clear()
searched = [[0]*W for i in range(H)... | Traceback (most recent call last):
File "/tmp/tmpa0hp7z76/tmpt6stkgnm.py", line 1, in <module>
H, W, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s212897917 | p00481 | u531592024 | 1529421214 | Python | Python3 | py | Runtime Error | 30 | 6344 | 1300 | import copy
(h, w, n) = list(map(int, input().split()))
dis = [[] for i in range(n + 1)]
def setArr(ph):
global dis
res = [False for i in range(w + 2)]
for i, x in enumerate(list(input())):
if x == "X":
continue
res[i + 1] = True
if x == ".":
continue
... | Traceback (most recent call last):
File "/tmp/tmps42hnuih/tmp5fnl8oyx.py", line 3, in <module>
(h, w, n) = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s737171396 | p00481 | u011621222 | 1530087212 | Python | Python3 | py | Runtime Error | 190 | 7176 | 1095 | from queue import Queue
from collections import defaultdict
try:
d = [[1, 0], [-1, 0], [0, 1], [0, -1]]
H, W, N = map(int, input().split())
G = []
sx = sy = 0
for i in range(H):
G.append(input())
for j, c in enumerate(G[i]):
if c == 'S':
sx,... | EOF when reading a line
| |
s727593766 | p00481 | u011621222 | 1530088257 | Python | Python3 | py | Runtime Error | 200 | 7164 | 1212 | from queue import Queue
from collections import defaultdict
try:
d = [[1, 0], [-1, 0], [0, 1], [0, -1]]
H, W, N = map(int, input().split())
G = []
sx = sy = 0
for i in range(H):
G.append(input())
for j, c in enumerate(G[i]):
if c == 'S':
sx, sy = i, j
... | EOF when reading a line
| |
s393832534 | p00481 | u260980560 | 1382805533 | Python | Python | py | Runtime Error | 0 | 0 | 996 | from queue import Queue
INF = 20000000
q = Queue()
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]
smp = [[INF for i in range(1002)] for j in range(1002)]
mp = [['X' for i in range(1002)] for j in range(1002)]
ipt = input().split('\n')
H, W, n = map(int,ipt[0].split())
for i in range(1, H+1):
for j in range(1, W+1):
... | Traceback (most recent call last):
File "/tmp/tmpf1r4kywb/tmpgk4r1_5x.py", line 8, in <module>
ipt = input().split('\n')
^^^^^^^
EOFError: EOF when reading a line
| |
s568703582 | p00481 | u260980560 | 1382805714 | Python | Python | py | Runtime Error | 0 | 0 | 1000 | from Queue import Queue
INF = 20000000
q = Queue()
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]
smp = [[INF for i in range(1002)] for j in range(1002)]
mp = [['X' for i in range(1002)] for j in range(1002)]
ipt = raw_input().split('\n')
H, W, n = map(int,ipt[0].split())
for i in range(1, H+1):
for j in range(1, W+1):
... | Traceback (most recent call last):
File "/tmp/tmppjfmkw49/tmpcfsvxpji.py", line 1, in <module>
from Queue import Queue
ModuleNotFoundError: No module named 'Queue'
| |
s347495805 | p00482 | u150984829 | 1526567784 | Python | Python3 | py | Runtime Error | 60 | 5600 | 623 | M, N = map(int, input().split())
cloth = sum([[*input()]for _ in[0] * M], [])
ans = 3**cloth.count('?')
def have_JOI(cloth):
for i, p in enumerate(cloth[:-N]):
if p == 'J' and cloth[i + 1] == 'O' and cloth[i + N] == 'I':
return True
return False
def search(cloth):
if have_JOI(cloth):... | Traceback (most recent call last):
File "/tmp/tmp3rghd2oi/tmptyx3be00.py", line 1, in <module>
M, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s890935664 | p00482 | u150984829 | 1526568201 | Python | Python3 | py | Runtime Error | 70 | 5596 | 646 | M, N = map(int, input().split())
cloth = sum([[*input()]for _ in[0] * M], [])
ans = 3 ** cloth.count('?')
def have_JOI(cloth):
for i, p in enumerate(cloth[:-N]):
if i % N != N-1 and p == 'J' and cloth[i + 1] == 'O' and cloth[i + N] == 'I':
return True
return False
def search(cloth):
if h... | Traceback (most recent call last):
File "/tmp/tmps6a0gp98/tmps_14ssy9.py", line 1, in <module>
M, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s146815062 | p00482 | u150984829 | 1526568372 | Python | Python3 | py | Runtime Error | 70 | 5596 | 743 | M, N = map(int, input().split())
cloth = sum([[*input()]for _ in[0] * M], [])
ans = 3 ** cloth.count('?')
def have_JOI(cloth):
for i, p in enumerate(cloth[:-N]):
if i % N != N-1 and p == 'J' and cloth[i + 1] == 'O' and cloth[i + N] == 'I':
return True
return False
def search(cloth):
if '... | Traceback (most recent call last):
File "/tmp/tmpqcccdjjx/tmph2o79iqq.py", line 1, in <module>
M, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s322382938 | p00483 | u633068244 | 1416591208 | Python | Python | py | Runtime Error | 19930 | 6168 | 325 | M,N = map(int,raw_input().split())
K = int(raw_input())
A = [raw_input() for i in range(M)]
for roop in range(K):
a,b,c,d = map(int,raw_input().split())
j = o = i = 0
for m in range(a-1,c):
j += A[m][b-1:d].count("J")
o += A[m][b-1:d].count("O")
i += A[m][b-1:d].count("I")
print ... | File "/tmp/tmp5_4n_ck5/tmpfbnte59n.py", line 11
print j,o,i
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s892196579 | p00483 | u633068244 | 1416592098 | Python | Python | py | Runtime Error | 19930 | 35572 | 650 | M,N = map(int,raw_input().split())
K = int(raw_input())
A = [raw_input() for i in range(M)]
J,O,I = [[0]*(N+1) for i in range(M)],[[0]*(N+1) for i in range(M)],[[0]*(N+1) for i in range(M)]
for m in range(M):
j = o = i = 0
for n in range(N):
if A[m][n] == "J": j += 1
elif A[m][n] == "O": o += ... | File "/tmp/tmp23gdfcc7/tmp1aa2it6a.py", line 18
print j,o,i
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s410031603 | p00483 | u633068244 | 1416592263 | Python | Python | py | Runtime Error | 19920 | 35576 | 696 | M,N = map(int,raw_input().split())
K = int(raw_input())
A = [raw_input() for i in range(M)]
J,O,I = [[0]*(N+1) for i in range(M)],[[0]*(N+1) for i in range(M)],[[0]*(N+1) for i in range(M)]
for m in range(M):
j = o = i = 0
for n in range(N):
if A[m][n] == "J": j += 1
elif A[m][n] == "O": o += ... | File "/tmp/tmpn4df8dn2/tmpllz7firr.py", line 21
print j,o,i
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s253638563 | p00483 | u186082958 | 1430035303 | Python | Python3 | py | Runtime Error | 0 | 0 | 541 | w=input()
height=int(w[0])
wide=int(w[2])
pattern_num=int(input())
a=[]
for i in range(pattern_num):
a.append(input())
for i in range(pattern_num):
y=input()
north=int(y[0])-1; west=int(y[2])-1
south=int(y[4])-1; east=int(y[6])-1
jungle=0;ocean=0;ice=0;
for j in range(north,south+1):
... | Traceback (most recent call last):
File "/tmp/tmph7a2izrm/tmpe7wsc4de.py", line 1, in <module>
w=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s725957125 | p00483 | u186082958 | 1430035398 | Python | Python3 | py | Runtime Error | 0 | 0 | 554 | w=input()
height=int(w[0])
wide=int(w[2])
pattern_num=int(input())
a=[]
for i in range(pattern_num):
a.append(input())
for i in range(pattern_num):
y=input()
north=int(y[0])-1
west=int(y[2])-1
south=int(y[4])-1
east=int(y[6])-1
jungle=0
ocean=0
ice=0
for j in range(north,south... | Traceback (most recent call last):
File "/tmp/tmphoxx6mq4/tmp7pm0f9f8.py", line 1, in <module>
w=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s819415994 | p00483 | u186082958 | 1430035513 | Python | Python3 | py | Runtime Error | 0 | 0 | 554 | w=input()
height=int(w[0])
wide=int(w[2])
pattern_num=int(input())
a=[]
for i in range(pattern_num):
a.append(input())
for i in range(pattern_num):
y=input()
north=int(y[0])-1
west=int(y[2])-1
south=int(y[4])-1
east=int(y[6])-1
jungle=0
ocean=0
ice=0
for j in range(north,south... | Traceback (most recent call last):
File "/tmp/tmpmyov_oum/tmpzifnxyxx.py", line 1, in <module>
w=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s822497270 | p00483 | u186082958 | 1430036103 | Python | Python3 | py | Runtime Error | 0 | 0 | 642 | w=input()
height=int(w[0])
wide=int(w[2])
pattern_num=int(input())
a=[]
for i in range(pattern_num):
a.append(input())
for i in range(pattern_num):
y=input()
north=int(y[0])-1
west=int(y[2])-1
south=int(y[4])-1
east=int(y[6])-1
jungle=0
ocean=0
ice=0
for j in range(north,south... | Traceback (most recent call last):
File "/tmp/tmpx9xb8hot/tmpak6v77tj.py", line 1, in <module>
w=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s800889078 | p00483 | u186082958 | 1430036213 | Python | Python3 | py | Runtime Error | 0 | 0 | 624 | w=input()
height=int(w[0])
wide=int(w[2])
pattern_num=int(input())
a=[]
for i in range(pattern_num):
a.append(input())
for i in range(pattern_num):
y=input()
north=int(y[0])-1
west=int(y[2])-1
south=int(y[4])-1
east=int(y[6])-1
jungle=0
ocean=0
ice=0
for j in range(north,south... | Traceback (most recent call last):
File "/tmp/tmp8ufe6bln/tmpsljjbbw6.py", line 1, in <module>
w=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s866969345 | p00483 | u186082958 | 1430037107 | Python | Python3 | py | Runtime Error | 0 | 0 | 554 | line =input()
w=line.split(" ")
height=int(w[0])
wide=int(w[1])
pattern_num=int(input())
a=[]
for i in range(pattern_num):
a.append(input())
for i in range(pattern_num):
y=input()
north=int(y[0])-1
west=int(y[2])-1
south=int(y[4])-1
east=int(y[6])-1
jungle=0
ocean=0
ice=0
for ... | Traceback (most recent call last):
File "/tmp/tmp3g7nhube/tmp2buci085.py", line 1, in <module>
line =input()
^^^^^^^
EOFError: EOF when reading a line
| |
s959047668 | p00483 | u186082958 | 1430037227 | Python | Python3 | py | Runtime Error | 0 | 0 | 587 | line =input()
w=line.split(" ")
height=int(w[0])
wide=int(w[1])
pattern_num=int(input())
a=[]
for i in range(pattern_num):
a.append(input())
for i in range(pattern_num):
aline =input()
aw=aline.split(" ")
north=int(aw[0])-1
west=int(aw[1])-1
south=int(aw[2])-1
east=int(aw[3])-1
jungle=... | Traceback (most recent call last):
File "/tmp/tmpdjat7md6/tmpx3hs0f9c.py", line 1, in <module>
line =input()
^^^^^^^
EOFError: EOF when reading a line
| |
s173196310 | p00483 | u186082958 | 1430037462 | Python | Python3 | py | Runtime Error | 19920 | 6888 | 610 | line =input()
w=line.split(" ")
height=int(w[0])
wide=int(w[1])
pattern_num=int(input())
a=[]
for i in range(height):
a.append(input())
for i in range(pattern_num):
aline =input()
aw=aline.split(" ")
north=int(aw[0])-1
west=int(aw[1])-1
south=int(aw[2])-1
east=int(aw[3])-1
jungle=0
... | Traceback (most recent call last):
File "/tmp/tmpf5rmlkik/tmpwuethsmw.py", line 1, in <module>
line =input()
^^^^^^^
EOFError: EOF when reading a line
| |
s612748927 | p00483 | u228488524 | 1508219352 | Python | Python3 | py | Runtime Error | 0 | 0 | 939 | # coding: utf-8
M, N = list(map(int, input().split()))
q = int(input())
Map = []
for i in range(M):
Map.append(input)
def get_slide_sum(Map, kw):
l = []
for r in range(M):
tmp = []
for c in range(N):
ll = 0 if c == 0 else tmp[c-1]
ul = 0 if r == 0 or c == 0 else l[r... | Traceback (most recent call last):
File "/tmp/tmpj2bev2g7/tmpl7va4di7.py", line 2, in <module>
M, N = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s901582256 | p00483 | u228488524 | 1508221591 | Python | Python3 | py | Runtime Error | 0 | 0 | 958 | # coding: utf-8
# Here your code !
M, N = list(map(int, input().split()))
q = int(input())
Map = []
for i in range(M):
Map.append(input)
def get_slide_sum(Map, kw):
l = []
for r in range(M):
tmp = []
for c in range(N):
ll = 0 if c == 0 else tmp[c-1]
ul = 0 if r == 0... | Traceback (most recent call last):
File "/tmp/tmp8goalypz/tmp5zu9t7jd.py", line 3, in <module>
M, N = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s972016185 | p00483 | u829501316 | 1518280028 | Python | Python3 | py | Runtime Error | 4700 | 11828 | 1096 | M, N = map(int, input().split())
K = int(input())
P = ['_' * (N + 1) for _ in range(M + 1)]
for mi in range(1, M + 1):
P[mi] = '_' + input() # for p in P:
# print('p', p)
J = [[0 for _ in range(N + 1)] for _ in range(M + 1)]
O = [[0 for _ in range(N + 1)] for _ in range(M + 1)]
I = [[0 for _ in ran... | Traceback (most recent call last):
File "/tmp/tmpjad8g87w/tmplzk6eds8.py", line 1, in <module>
M, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s419402601 | p00483 | u847467233 | 1530335684 | Python | Python3 | py | Runtime Error | 430 | 32144 | 530 | # AOJ 0560: Planetary Exploration
# Python3 2018.6.30 bal4u
tr = { 'J':0, 'O':1, 'I':2 }
s = [[[0 for c in range(1002)] for r in range(1002)] for k in range(3)]
m, n = map(int, input().split())
k = int(input())
for r in range(1, m+1):
buf = input().strip()
for c in range(1, n+1):
for i in range(3): s[i][r][c] = s... | Traceback (most recent call last):
File "/tmp/tmp248pkab1/tmped8f82aa.py", line 7, in <module>
m, n = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s590258743 | p00483 | u452764412 | 1377132525 | Python | Python | py | Runtime Error | 20000 | 13724 | 381 | M, N = map(int, raw_input().split())
K = input()
d = {}
for i in range(M):
a = raw_input()
for j in range(N):
d[i+1, j+1] = a[j]
for _ in range(K):
b = map(int, raw_input().split())
D = {}
D['J'] = D['O'] = D['I'] = 0
for i in range(b[0], b[2]+1):
for j in range(b[1], b[3]+1):... | File "/tmp/tmp0q4_ww6s/tmp8mxa9bj8.py", line 18
print D['J'], D['O'], D['I']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s341275728 | p00483 | u872035937 | 1383261874 | Python | Python | py | Runtime Error | 39860 | 7780 | 574 | sn_km, ew_km = map(int, raw_input().split())
seek_area = int(raw_input())
zone = sn_km*[ew_km*[0]]
def cnt_zone(idx, first, last, str_for_count):
return int(str(zone[idx])[first:last].count(str_for_count))
for i in range(sn_km):
zone[i] = raw_input()
for i in range(seek_area):
J = O = I = 0
a, b,... | File "/tmp/tmpv7404hv0/tmpqyzr2jqc.py", line 18
print "%d %d %d" % (J, O, I)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s285444654 | p00483 | u872035937 | 1383262016 | Python | Python | py | Runtime Error | 39860 | 7780 | 574 | sn_km, ew_km = map(int, raw_input().split())
seek_area = int(raw_input())
zone = sn_km*[ew_km*[0]]
def cnt_zone(idx, first, last, str_for_count):
return int(str(zone[idx])[first:last].count(str_for_count))
for i in range(sn_km):
zone[i] = raw_input()
for i in range(seek_area):
J = O = I = 0
a, b,... | File "/tmp/tmpvry85_k7/tmp6pgo77l2.py", line 18
print "%d %d %d" % (J, O, I)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s770683576 | p00484 | u797673668 | 1454129542 | Python | Python3 | py | Runtime Error | 40000 | 8072 | 677 | from collections import deque
from itertools import chain, combinations
n, k = map(int, input().split())
books = [[] for _ in range(10)]
while n:
c, g = map(int, input().split())
books[g - 1].append(c)
n -= 1
for q in books:
q.sort(reverse=True)
done = set()
max_cost = 0
for book_combi in combinati... | Traceback (most recent call last):
File "/tmp/tmpy7rghdpg/tmpy0mhkj3h.py", line 4, in <module>
n, k = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s959809106 | p00484 | u894114233 | 1475047026 | Python | Python | py | Runtime Error | 0 | 0 | 536 | n,k=map(int,raw_input().split())
g=[[] for _ in xrange(10)]
for i in xrange(n):
v,j=map(int,raw_input().split())
g[j-1].append(v)
for i in xrange(10):
g[i].sort()
g[i].reverse()
books=[[0]*(k+1) for _ in xrange(10)]
for i in xrange(10):
for j in xrange(1,len(g[i])+1):
books[i][j]=books[i][j... | Traceback (most recent call last):
File "/tmp/tmplmw92xt2/tmp4sev3mb4.py", line 1, in <module>
n,k=map(int,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s185922554 | p00484 | u197615397 | 1509891721 | Python | Python3 | py | Runtime Error | 0 | 0 | 965 | def solve():
N, K = map(int, input().split())
a = [[] for _ in [0]*10]
l = []
for c, g in (tuple(map(int, input().split())) for _ in [0]*N):
a[g-1].append(c)
for i, prices in enumerate(a):
ln = len(prices)
if ln == 0:
continue
dp = [[-1]*(K+1) for _ in [0... | Traceback (most recent call last):
File "/tmp/tmp66oyf1ex/tmpjenzvn86.py", line 33, in <module>
solve()
File "/tmp/tmp66oyf1ex/tmpjenzvn86.py", line 2, in solve
N, K = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s513355749 | p00484 | u266872031 | 1521364134 | Python | Python | py | Runtime Error | 0 | 0 | 575 | [N,K]=map(int, raw_input().split())
C=[[] for i in range(11)]
D=[[0 for j in range(K+1)] for i in range(11)]
M=[0 for i in range(11)]
for i in range(N):
c,g=map(int, raw_input().split())
C[g].append(c)
M[g]+=1
for i in range(1,11):
y=sorted(C[i], reverse=True)
for j in range(len(y)):
n = j+... | File "/tmp/tmp12w5t18e/tmpbxl6q2u8.py", line 21
print DP[10][K]
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s977990382 | p00486 | u013637113 | 1526639254 | Python | Python3 | py | Runtime Error | 0 | 0 | 1218 | import numpy
def cal_time(W, H, x, y):
return 2*(abs(W-x) + abs(H-y))
geo = input("Input W H: ").split()
W = int(geo[0])
H = int(geo[1])
if W<1 or W>1000000000:
print("wrong W")
exit()
if H<1 or H>1000000000:
print("wrong H")
exit()
N = int(input("N: "))
if N<1 or N>100000:
print("wrong N")
... | Traceback (most recent call last):
File "/tmp/tmpaadm801i/tmpb2iqxs3j.py", line 6, in <module>
geo = input("Input W H: ").split()
^^^^^^^^^^^^^^^^^^^^
EOFError: EOF when reading a line
| Input W H: |
s036486093 | p00486 | u013637113 | 1526639370 | Python | Python3 | py | Runtime Error | 0 | 0 | 1200 | import numpy
def cal_time(W, H, x, y):
return 2*(abs(W-x) + abs(H-y))
geo = input().split()
W = int(geo[0])
H = int(geo[1])
if W<1 or W>1000000000:
print("wrong W")
exit()
if H<1 or H>1000000000:
print("wrong H")
exit()
N = int(input())
if N<1 or N>100000:
print("wrong N")
exit()
total_... | Traceback (most recent call last):
File "/tmp/tmp1wrw3wc3/tmp8edmkbog.py", line 6, in <module>
geo = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s815565455 | p00486 | u013637113 | 1526639444 | Python | Python3 | py | Runtime Error | 0 | 0 | 1200 | import numpy
def cal_time(W, H, x, y):
return 2*(abs(W-x) + abs(H-y))
geo = input().split()
W = int(geo[0])
H = int(geo[1])
if W<1 or W>1000000000:
print("wrong W")
exit()
if H<1 or H>1000000000:
print("wrong H")
exit()
N = int(input())
if N<1 or N>100000:
print("wrong N")
exit()
total_... | Traceback (most recent call last):
File "/tmp/tmp0zx6jvcm/tmpbg3brolb.py", line 6, in <module>
geo = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s147410937 | p00486 | u013637113 | 1526639501 | Python | Python3 | py | Runtime Error | 0 | 0 | 1193 | import numpy
def cal_time(W, H, x, y):
return 2*(abs(W-x) + abs(H-y))
geo = input().split()
W = int(geo[0])
H = int(geo[1])
if W<1 or W>1000000000:
print("wrong W")
exit()
if H<1 or H>1000000000:
print("wrong H")
exit()
N = int(input())
if N<1 or N>100000:
print("wrong N")
exit()
total_... | Traceback (most recent call last):
File "/tmp/tmphs8tb4si/tmpkponarvs.py", line 6, in <module>
geo = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s034538312 | p00488 | u633068244 | 1396361829 | Python | Python | py | Runtime Error | 0 | 0 | 70 | print min([input() for i in [1,1,1])+min([input() for i in [1,1]]) -50 | File "/tmp/tmpxtwbhkjj/tmpki0f3ux3.py", line 1
print min([input() for i in [1,1,1])+min([input() for i in [1,1]]) -50
^
SyntaxError: closing parenthesis ')' does not match opening parenthesis '['
| |
s720173128 | p00489 | u228488524 | 1506409497 | Python | Python3 | py | Runtime Error | 0 | 0 | 622 | t = int(input())
point_l = [0 for i in range(t)]
for i in range((t*(t-1))/2):
input_line = input()
tmp = [int(x) for x in input_line.rstrip().split(' ')]
if tmp[2] > tmp[3]:
point_l[tmp[0]-1] += 3
elif tmp[3] > tmp[2]:
point_l[tmp[1]-1] += 3
elif tmp[2] == tmp[3]:
point_l[tmp... | Traceback (most recent call last):
File "/tmp/tmp417axsar/tmpobopkg7v.py", line 1, in <module>
t = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s026676690 | p00490 | u749355444 | 1480492977 | Python | Python | py | Runtime Error | 0 | 0 | 213 | A,B = map(int, raw_input().split())
C = input()
D = [input() for _ in range(N)]
D = sorted(D)[::-1]
price = A
cal = C
ans = cal/price
for d in D:
cal += d
price += B
ans = max(ans, cal/price)
print ans | File "/tmp/tmpz6wujceo/tmpemqmmy1o.py", line 12
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s407584926 | p00490 | u749355444 | 1480493017 | Python | Python | py | Runtime Error | 0 | 0 | 213 | A,B = map(int, raw_input().split())
C = input()
D = [input() for _ in range(N)]
D = sorted(D)[::-1]
price = A
cal = C
ans = cal/price
for d in D:
cal += d
price += B
ans = max(ans, cal/price)
print ans | File "/tmp/tmp9o_zos7z/tmpzdvlhjcr.py", line 12
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s755047972 | p00490 | u749355444 | 1480493024 | Python | Python3 | py | Runtime Error | 0 | 0 | 213 | A,B = map(int, raw_input().split())
C = input()
D = [input() for _ in range(N)]
D = sorted(D)[::-1]
price = A
cal = C
ans = cal/price
for d in D:
cal += d
price += B
ans = max(ans, cal/price)
print ans | File "/tmp/tmp68ap4x7w/tmp242lxdvg.py", line 12
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s559742873 | p00490 | u749355444 | 1480493033 | Python | Python | py | Runtime Error | 0 | 0 | 213 | A,B = map(int, raw_input().split())
C = input()
D = [input() for _ in range(N)]
D = sorted(D)[::-1]
price = A
cal = C
ans = cal/price
for d in D:
cal += d
price += B
ans = max(ans, cal/price)
print ans | File "/tmp/tmptayator_/tmph37iuhlh.py", line 12
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.