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
s330983816
p00741
u766477342
1420337502
Python
Python3
py
Runtime Error
0
0
578
while 1: W, H = list(map(int,input().split())) if W == 0:break C = [list(map(int, input().split())) for i in range(H) ] def work(x,y): ax = [-1, 0, 1, -1, 1, -1, 0, 1] ay = [-1, -1, -1, 0, 0, 1, 1, 1] if C[y][x] != 1:return False C[y][x] = -1 #mark for _ax in ...
Traceback (most recent call last): File "/tmp/tmpjg6ucqxx/tmp4r2he5x7.py", line 2, in <module> W, H = list(map(int,input().split())) ^^^^^^^ EOFError: EOF when reading a line
s078533651
p00741
u316268279
1421209975
Python
Python3
py
Runtime Error
0
0
740
#!/usr/bin/env python # -*- coding: utf-8 -*- def dfs(s,Map,H,W,c): dxdy = [(1,0),(-1,0),(0,1),(0,-1),(1,1),(-1,-1),(-1,1),(1,-1)] for i in range(len(dxdy)): Map[s[0]][s[1]] = c nextPos = (s[0]+dxdy[i][0],s[1]+dxdy[i][1]) if nextPos[0] >= 0 and nextPos[1] >= 0 and nextPos[0] < H and nex...
Traceback (most recent call last): File "/tmp/tmpowcffdj6/tmpphrirblx.py", line 14, in <module> W,H = map(int,input().split(" ")) ^^^^^^^ EOFError: EOF when reading a line
s927168368
p00741
u316268279
1421211575
Python
Python3
py
Runtime Error
0
0
740
#!/usr/bin/env python # -*- coding: utf-8 -*- def dfs(s,Map,H,W,c): dxdy = [(1,0),(-1,0),(0,1),(0,-1),(1,1),(-1,-1),(-1,1),(1,-1)] for i in range(len(dxdy)): Map[s[0]][s[1]] = c nextPos = (s[0]+dxdy[i][0],s[1]+dxdy[i][1]) if nextPos[0] >= 0 and nextPos[1] >= 0 and nextPos[0] < H and nex...
Traceback (most recent call last): File "/tmp/tmp9vwcs5a3/tmprfvy0_8u.py", line 14, in <module> W,H = map(int,input().split(" ")) ^^^^^^^ EOFError: EOF when reading a line
s830911176
p00741
u316268279
1421211790
Python
Python3
py
Runtime Error
0
0
732
#!/usr/bin/env python # -*- coding: utf-8 -*- def dfs(s,Map,H,W,c): dxdy = [(1,0),(-1,0),(0,1),(0,-1),(1,1),(-1,-1),(-1,1),(1,-1)] for i in range(8): Map[s[0]][s[1]] = c nextPos = (s[0]+dxdy[i][0],s[1]+dxdy[i][1]) if nextPos[0] >= 0 and nextPos[1] >= 0 and nextPos[0] < H and nextPos[1] ...
Traceback (most recent call last): File "/tmp/tmplvtkz12o/tmp6oybop9y.py", line 14, in <module> W,H = map(int,input().split(" ")) ^^^^^^^ EOFError: EOF when reading a line
s845816290
p00741
u316268279
1421211956
Python
Python3
py
Runtime Error
0
0
740
#!/usr/bin/env python # -*- coding: utf-8 -*- def dfs(s,Map,H,W,c): dxdy = [(1,0),(-1,0),(0,1),(0,-1),(1,1),(-1,-1),(-1,1),(1,-1)] for i in range(len(dxdy)): Map[s[0]][s[1]] = c nextPos = (s[0]+dxdy[i][0],s[1]+dxdy[i][1]) if nextPos[0] >= 0 and nextPos[1] >= 0 and nextPos[0] < H and nex...
Traceback (most recent call last): File "/tmp/tmpv8pftnht/tmpc5zr7qh_.py", line 14, in <module> W,H = map(int,input().split(" ")) ^^^^^^^ EOFError: EOF when reading a line
s624524082
p00741
u316268279
1421212967
Python
Python3
py
Runtime Error
0
0
732
#!/usr/bin/env python # -*- coding: utf-8 -*- def dfs(s,Map,H,W,c): dxdy = [(1,0),(-1,0),(0,1),(0,-1),(1,1),(-1,-1),(-1,1),(1,-1)] for i in range(4): Map[s[0]][s[1]] = c nextPos = (s[0]+dxdy[i][0],s[1]+dxdy[i][1]) if nextPos[0] >= 0 and nextPos[1] >= 0 and nextPos[0] < H and nextPos[1] ...
Traceback (most recent call last): File "/tmp/tmpfc16suwm/tmp34_0bawq.py", line 14, in <module> W,H = map(int,input().split(" ")) ^^^^^^^ EOFError: EOF when reading a line
s816205053
p00741
u316268279
1421213085
Python
Python3
py
Runtime Error
0
0
732
#!/usr/bin/env python # -*- coding: utf-8 -*- def dfs(s,Map,H,W,c): dxdy = [(1,0),(-1,0),(0,1),(0,-1),(1,1),(-1,-1),(-1,1),(1,-1)] for i in range(3): Map[s[0]][s[1]] = c nextPos = (s[0]+dxdy[i][0],s[1]+dxdy[i][1]) if nextPos[0] >= 0 and nextPos[1] >= 0 and nextPos[0] < H and nextPos[1] ...
Traceback (most recent call last): File "/tmp/tmpo8h_xgn4/tmpz0ntqt8p.py", line 14, in <module> W,H = map(int,input().split(" ")) ^^^^^^^ EOFError: EOF when reading a line
s308452010
p00741
u633068244
1421783727
Python
Python
py
Runtime Error
0
0
480
def dfs(x, y): C[y][x] = 0 for dx,dy in zip([1,1,0,-1,-1,-1,0,1],[0,1,1,1,0,-1,-1,-1]): if 0 <= x+dx < w and 0 <= y+dy < h and C[y+dy][x+dx] == 1: dfs(x+dx, y+dy) while 1: w,h = map(int,raw_input().split()) if w == h == 0: break C = [map(int,raw_input().split()) for _ in xrange(...
File "/tmp/tmpu8rsto7n/tmpq6wvhlv6.py", line 18 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s902360511
p00741
u731235119
1421922066
Python
Python
py
Runtime Error
0
0
1067
def travel(here, lb, ub, field, label): if field[here[1]][here[0]] == 1: field[here[1]][here[0]] = label if lb[0] < here[0] : travel((here[0]-1, here[1]), lb, ub, field, label) if lb[1] < here[1]: travel((here[0]-1, here[1]-1), lb, ub, field, label) if lb[1] < here[1] : travel((here[0], here[1]-1),...
File "/tmp/tmpx37e91ai/tmpx512za02.py", line 37 print label - 1 ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s798469392
p00741
u120360464
1422864424
Python
Python
py
Runtime Error
0
0
883
#! /usr/bin/env python # -*- coding: utf-8 -*- def rec(y, x, used, TILE): if (not(0<=x<W)) or (not(0<=y<H)) or (TILE[y][x]==0) or (used[y][x]==1): return 0 else: used[y][x] = 1 rec(y-1, x-1, used, TILE) rec(y-1, x, used, TILE) rec(y-1, x+1, used, TILE) rec(y, x-1...
File "/tmp/tmpr66ck_2z/tmpd8ezqm73.py", line 32 print Sum ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s858086583
p00741
u120360464
1422866808
Python
Python
py
Runtime Error
0
0
929
#! /usr/bin/env python # -*- coding: utf-8 -*- def rec(y, x, used, TILE): if (not(0<=x<W)) or (not(0<=y<H)) or (TILE[y][x]==0) or (used[y][x]==1): return 0 else: used[y][x] = 1 rec(y-1, x-1, used, TILE) rec(y-1, x, used, TILE) rec(y-1, x+1, used, TILE) rec(y, x-1...
File "/tmp/tmpsyk2dzuw/tmp150wk7ja.py", line 32 print Sum ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s322222028
p00741
u124909914
1426138421
Python
Python3
py
Runtime Error
0
0
574
m = [] def walk(i,j): if i < 0 or j < 0 \ or i >= len(m) or j >= len(m[i]): return if m[i][j] == 0: return m[i][j] = 0 for k in range(-1,2): for l in range(-1,2): walk(i+k,j+l) while True: w, h = map(int, input().split()) if w == 0: break...
Traceback (most recent call last): File "/tmp/tmp_amh8ywz/tmptc2at_de.py", line 15, in <module> w, h = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s903009363
p00741
u885631908
1435043031
Python
Python3
py
Runtime Error
0
0
453
w, h = map(int,input().split()) c = [list(map(int,input().split())) for j in range(h)] count = 0 def dfs(x,y): c[x][y] = 0 for dx in [-1,0,1]: for dy in [-1,0,1]: nx = x + dx ny = y + dy if(0 <= nx < w and 0 <= ny <= h and c[nx][ny] == 1 ): dfs(nx, ny...
Traceback (most recent call last): File "/tmp/tmpr8z50tpr/tmp8um93ksf.py", line 1, in <module> w, h = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s711216833
p00741
u885631908
1435043159
Python
Python3
py
Runtime Error
0
0
478
# -*- coding: utf-8 -*- w, h = map(int,input().split()) c = [list(map(int,input().split())) for j in range(h)] count = 0 def dfs(x,y): c[x][y] = 0 for dx in [-1,0,1]: for dy in [-1,0,1]: nx = x + dx ny = y + dy if(0 <= nx < w and 0 <= ny <= h and c[nx][ny] == 1 ): ...
Traceback (most recent call last): File "/tmp/tmpd8hnhwi1/tmp_1t4yp5e.py", line 3, in <module> w, h = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s590866479
p00741
u885631908
1435044981
Python
Python3
py
Runtime Error
0
0
568
# -*- coding: utf-8 -*- def dfs(x,y): c[x][y] = 0 for dx in [-1,0,1]: for dy in [-1,0,1]: nx = x + dx ny = y + dy if 0 <= nx < h and 0 <= ny < w and c[nx][ny] == 1: dfs(nx, ny) while True: w, h = map(int,input().split()) if w == 0 and h == 0 :...
Traceback (most recent call last): File "/tmp/tmpmr8e7w8r/tmpmbfdfg83.py", line 12, in <module> w, h = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s118253971
p00741
u885631908
1435045158
Python
Python3
py
Runtime Error
0
0
566
# -*- coding: utf-8 -*- def dfs(x,y): c[x][y] = 0 for dx in [-1,0,1]: for dy in [-1,0,1]: nx = x + dx ny = y + dy if 0 <= nx < h and 0 <= ny < w and c[nx][ny] == 1: dfs(nx, ny) while True: w, h = map(int,input().split()) if w == 0 and h == 0 :...
Traceback (most recent call last): File "/tmp/tmp81peplm8/tmps0sbi5rv.py", line 12, in <module> w, h = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s415440444
p00741
u885631908
1435045239
Python
Python3
py
Runtime Error
0
0
562
# -*- coding: utf-8 -*- def dfs(x,y): c[x][y] = 0 for dx in [-1,0,1]: for dy in [-1,0,1]: nx = x + dx ny = y + dy if 0 <= nx < h and 0 <= ny < w and c[nx][ny] == 1: dfs(nx, ny) while True: w, h = map(int,input().split()) if w == 0 and h == 0 ...
Traceback (most recent call last): File "/tmp/tmp3i5pvsv9/tmpc91ro9dp.py", line 12, in <module> w, h = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s620648098
p00741
u885631908
1435045374
Python
Python3
py
Runtime Error
0
0
566
# -*- coding: utf-8 -*- def dfs(x,y): c[x][y] = 0 for dx in [-1,0,1]: for dy in [-1,0,1]: nx = x + dx ny = y + dy if 0 <= nx < h and 0 <= ny < w and c[nx][ny] == 1: dfs(nx, ny) while True: w, h = map(int,input().split()) if w == 0 and h == 0 :...
Traceback (most recent call last): File "/tmp/tmp6kzwpry9/tmp9wrzwj10.py", line 12, in <module> w, h = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s985738346
p00741
u885631908
1435045441
Python
Python3
py
Runtime Error
0
0
542
def dfs(x,y): c[x][y] = 0 for dx in [-1,0,1]: for dy in [-1,0,1]: nx = x + dx ny = y + dy if 0 <= nx < h and 0 <= ny < w and c[nx][ny] == 1: dfs(nx, ny) while True: w, h = map(int,input().split()) if w == 0 and h == 0 : break ...
Traceback (most recent call last): File "/tmp/tmplmp82zig/tmphh02o94g.py", line 11, in <module> w, h = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s951702792
p00741
u885631908
1435143491
Python
Python3
py
Runtime Error
0
0
566
# -*- coding: utf-8 -*- def dfs(x,y): c[x][y] = 0 for dx in [-1,0,1]: for dy in [-1,0,1]: nx = x + dx ny = y + dy if 0 <= nx < h and 0 <= ny < w and c[nx][ny] == 1: dfs(nx, ny) while True: w, h = map(int,input().split()) if w == 0 and h == 0 :...
Traceback (most recent call last): File "/tmp/tmpz_s37eeu/tmpamvq2i0t.py", line 12, in <module> w, h = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s008848033
p00741
u966364923
1436628577
Python
Python3
py
Runtime Error
0
0
675
def dfs(tiles, W, H, x, y): tiles[y][x] = '0' for dx,dy in ((-1,-1), (-1,0), (-1,1), (0,-1), (0,1), (1,-1), (1,0), (1,1)): if 0<=x+dx<W and 0<=y+dy<H and tiles[y+dy][x+dx]=='1': dfs(tiles, W, H, x+dx, y+dy) return def main(): while True: W,H = [int(x) for x in input().split(...
Traceback (most recent call last): File "/tmp/tmp9edzvr_k/tmplkwbddbw.py", line 23, in <module> main() File "/tmp/tmp9edzvr_k/tmplkwbddbw.py", line 10, in main W,H = [int(x) for x in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s153854768
p00741
u966364923
1436628857
Python
Python3
py
Runtime Error
0
0
719
import sys def dfs(tiles, W, H, x, y): tiles[y][x] = '0' for dx,dy in ((-1,-1), (-1,0), (-1,1), (0,-1), (0,1), (1,-1), (1,0), (1,1)): if 0<=x+dx<W and 0<=y+dy<H and tiles[y+dy][x+dx]=='1': dfs(tiles, W, H, x+dx, y+dy) return def main(): while True: W,H = [int(x) for x in inp...
Traceback (most recent call last): File "/tmp/tmp8pk3h8vn/tmpp2hk_ipc.py", line 24, in <module> sys.getrecursionlimit(10000) TypeError: sys.getrecursionlimit() takes no arguments (1 given)
s192600304
p00741
u489809100
1449145802
Python
Python
py
Runtime Error
0
0
818
def check(x, y): array[x][y] = "0" if array[x + 1][y] == "1" : check(x + 1, y) if array[x - 1][y] == "1" : check(x - 1, y) if array[x][y + 1] == "1" : check(x, y + 1) if array[x][y - 1] == "1" : check(x, y - 1) if array[x + 1][y + 1] == "1" : check(x + 1, y + 1) if array[x + 1][y - 1] == "1" : check(x + 1, y - 1...
File "/tmp/tmp1zf3x52i/tmprrr4s1jc.py", line 28 print count ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s204116606
p00741
u489809100
1449145867
Python
Python
py
Runtime Error
0
0
860
import sys sys.setrecursionlimit(100000) def check(x, y): array[x][y] = "0" if array[x + 1][y] == "1" : check(x + 1, y) if array[x - 1][y] == "1" : check(x - 1, y) if array[x][y + 1] == "1" : check(x, y + 1) if array[x][y - 1] == "1" : check(x, y - 1) if array[x + 1][y + 1] == "1" : check(x + 1, y + 1) if array...
File "/tmp/tmpm2e3ijop/tmpqf7tytme.py", line 31 print count ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s853417183
p00741
u489809100
1449145880
Python
Python
py
Runtime Error
0
0
861
import sys sys.setrecursionlimit(1000000) def check(x, y): array[x][y] = "0" if array[x + 1][y] == "1" : check(x + 1, y) if array[x - 1][y] == "1" : check(x - 1, y) if array[x][y + 1] == "1" : check(x, y + 1) if array[x][y - 1] == "1" : check(x, y - 1) if array[x + 1][y + 1] == "1" : check(x + 1, y + 1) if arra...
File "/tmp/tmpksa9zbke/tmp670064dx.py", line 31 print count ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s542809058
p00741
u489809100
1449145928
Python
Python
py
Runtime Error
0
0
862
import sys sys.setrecursionlimit(10000000) def check(x, y): array[x][y] = "0" if array[x + 1][y] == "1" : check(x + 1, y) if array[x - 1][y] == "1" : check(x - 1, y) if array[x][y + 1] == "1" : check(x, y + 1) if array[x][y - 1] == "1" : check(x, y - 1) if array[x + 1][y + 1] == "1" : check(x + 1, y + 1) if arr...
File "/tmp/tmpkkt7hbjk/tmpy_6o4efj.py", line 31 print count ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s077531170
p00741
u489809100
1449145940
Python
Python
py
Runtime Error
0
0
863
import sys sys.setrecursionlimit(100000000) def check(x, y): array[x][y] = "0" if array[x + 1][y] == "1" : check(x + 1, y) if array[x - 1][y] == "1" : check(x - 1, y) if array[x][y + 1] == "1" : check(x, y + 1) if array[x][y - 1] == "1" : check(x, y - 1) if array[x + 1][y + 1] == "1" : check(x + 1, y + 1) if ar...
File "/tmp/tmpigpd3s0e/tmpd2gg3o1m.py", line 31 print count ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s596000402
p00741
u489809100
1449145955
Python
Python
py
Runtime Error
0
0
864
import sys sys.setrecursionlimit(1000000000) def check(x, y): array[x][y] = "0" if array[x + 1][y] == "1" : check(x + 1, y) if array[x - 1][y] == "1" : check(x - 1, y) if array[x][y + 1] == "1" : check(x, y + 1) if array[x][y - 1] == "1" : check(x, y - 1) if array[x + 1][y + 1] == "1" : check(x + 1, y + 1) if a...
File "/tmp/tmpxr65ch_a/tmp4cskghh7.py", line 31 print count ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s814757686
p00741
u489809100
1449145968
Python
Python
py
Runtime Error
0
0
867
import sys sys.setrecursionlimit(1000000000000) def check(x, y): array[x][y] = "0" if array[x + 1][y] == "1" : check(x + 1, y) if array[x - 1][y] == "1" : check(x - 1, y) if array[x][y + 1] == "1" : check(x, y + 1) if array[x][y - 1] == "1" : check(x, y - 1) if array[x + 1][y + 1] == "1" : check(x + 1, y + 1) i...
File "/tmp/tmplj6pq70c/tmph173ltsv.py", line 31 print count ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s804376353
p00741
u489809100
1449146293
Python
Python
py
Runtime Error
0
0
818
def check(x, y): array[x][y] = "0" if array[x + 1][y] == "1" : check(x + 1, y) if array[x - 1][y] == "1" : check(x - 1, y) if array[x][y + 1] == "1" : check(x, y + 1) if array[x][y - 1] == "1" : check(x, y - 1) if array[x + 1][y + 1] == "1" : check(x + 1, y + 1) if array[x + 1][y - 1] == "1" : check(x + 1, y - 1...
File "/tmp/tmpzdvmv4ms/tmp51i77s78.py", line 28 print count ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s093489680
p00741
u489809100
1449146323
Python
Python
py
Runtime Error
0
0
862
import sys sys.setrecursionlimit(10000000) def check(x, y): array[x][y] = "0" if array[x + 1][y] == "1" : check(x + 1, y) if array[x - 1][y] == "1" : check(x - 1, y) if array[x][y + 1] == "1" : check(x, y + 1) if array[x][y - 1] == "1" : check(x, y - 1) if array[x + 1][y + 1] == "1" : check(x + 1, y + 1) if arr...
File "/tmp/tmpzlczej24/tmp3y5jv50x.py", line 31 print count ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s619518286
p00741
u488601719
1453800417
Python
Python
py
Runtime Error
0
0
653
vx = [1, -1, 0, 0, 1, 1, -1, -1] vy = [0, 0, 1, -1, 1, -1, 1, -1] def dfs(col, row): c[col][row] = 0 for x, y in zip(vx, vy): ny = col + y nx = row + x if nx < 0 or ny < 0 or nx >= w or ny >= h: continue if c[ny][nx] == 0: continue dfs(ny, nx) w...
File "/tmp/tmp3lq9pu23/tmp4u9wllcj.py", line 32 print cnt ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s538106669
p00741
u488601719
1453800439
Python
Python
py
Runtime Error
0
0
653
vx = [1, -1, 0, 0, 1, 1, -1, -1] vy = [0, 0, 1, -1, 1, -1, 1, -1] def dfs(col, row): c[col][row] = 0 for x, y in zip(vx, vy): ny = col + y nx = row + x if nx < 0 or ny < 0 or nx >= w or ny >= h: continue if c[ny][nx] == 0: continue dfs(ny, nx) w...
File "/tmp/tmp18y_ugyc/tmpjv9j_gbv.py", line 32 print cnt ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s585109656
p00741
u248416507
1464074912
Python
Python
py
Runtime Error
0
0
793
def visit(x, y, area): move = [(-1, 0), (0, 1), (1, 0), (0, -1), (1, -1), (1, 1), (-1, 1), (-1, -1)] for i in move: if 0 <= (x + i[0]) < w and 0 <= (y + i[1]) < h and area[y + i[1]][x + i[0]] == 1: area[y + i[1]][x + i[0]] = 0 visit(x + i[0], y + i[1], area) def solve(): a...
File "/tmp/tmpgp0vewny/tmplnn8848g.py", line 23 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s168470209
p00741
u336892997
1465810090
Python
Python3
py
Runtime Error
0
0
785
def solve(): w, h = [int(x) for x in input().split()] if w == h == 0: return False field = [[int(x) for x in input().split()] for _ in range(h)] ans = 0 for x in range(w): for y in range(h): if field[y][x] > 0: mark(field, w, h, x, y) ans ...
Traceback (most recent call last): File "/tmp/tmpms3dq2ms/tmp8jahbvrr.py", line 35, in <module> while solve(): ^^^^^^^ File "/tmp/tmpms3dq2ms/tmp8jahbvrr.py", line 2, in solve w, h = [int(x) for x in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s713101965
p00741
u660912567
1481281969
Python
Python3
py
Runtime Error
0
0
475
k = [-1,0,1] def search(x,y,m): if x<0 or x>=len(m[0]) or y<0 or y>=len(m): return if m[y][x]==0: return m[y][x] = 0 for i in k: for j in k: search(x+i,y+j,m) while True: c = 0 w,h = map(int,input().split()) if w==0: break m = [list(map(int,input().split())) for i in...
Traceback (most recent call last): File "/tmp/tmpcvz7tls_/tmpnsn8e9hw.py", line 12, in <module> w,h = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s380211737
p00741
u660912567
1481908561
Python
Python3
py
Runtime Error
0
0
454
d = [-1,0,1] def search(x,y,m): if not(0<=x<len(m[0]) and 0<=y<len(m)) or m[y][x]=='0': return m[y][x] = '0' for dy in d: for dx in d: search(x+dx,y+dy,m) while True: w,h = map(int,input().split()) if w==h==0: break m = [input().split() for _ in range(h)] c = 0 for y ...
Traceback (most recent call last): File "/tmp/tmpmdzv__bn/tmpag_785gi.py", line 9, in <module> w,h = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s200327464
p00741
u661290476
1487494259
Python
Python3
py
Runtime Error
0
0
536
def erase(x, y): c[y][x] = '0' for dx, dy in ((1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)): nx, ny = x + dx, y + dy if 0 <= nx <= w -1 and 0 <= ny <= h - 1: if c[ny][nx] == '1': erase(nx, ny) while True: w, h = map(int, input().split()) ...
Traceback (most recent call last): File "/tmp/tmp0sbka3jp/tmpq5bk0di3.py", line 10, in <module> w, h = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s695047334
p00741
u661290476
1487494551
Python
Python3
py
Runtime Error
0
0
570
def erase(x, y): c[y][x] = '0' for dx, dy in ((1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)): nx, ny = x + dx, y + dy if 0 <= nx <= w -1 and 0 <= ny <= h - 1: if c[ny][nx] == '1': erase(nx, ny) while True: w, h = map(int, input().split()) ...
Traceback (most recent call last): File "/tmp/tmpvh7_55sq/tmph9sp6f2y.py", line 10, in <module> w, h = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s704981177
p00741
u661290476
1487495272
Python
Python3
py
Runtime Error
0
0
588
def erase(w, h, x, y): c[y][x] = '0' for dx, dy in ((1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)): nx, ny = x + dx, y + dy if 0 <= nx <= w -1 and 0 <= ny <= h - 1: if c[ny][nx] == '1': erase(w, h, nx, ny) while True: w, h = map(int, input(...
Traceback (most recent call last): File "/tmp/tmpag3kx2ww/tmp2ti0w8x3.py", line 10, in <module> w, h = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s428399193
p00741
u078042885
1487498861
Python
Python3
py
Runtime Error
0
0
407
def f(x,y): a[y][x]='0' for dx,dy in[[-1,0],[1,0],[0,-1],[0,1],[-1,-1],[1,-1],[-1,1],[1,1]]: dx+=x;dy+=y if 0<=dx<w and 0<=dy<h and a[dy][dx]=='1':f(dx,dy) while 1: w,h=map(int,input().split()) if w==0:break a=[list(input().split()) for _ in[0]*h];b=0 for i in range(w): f...
Traceback (most recent call last): File "/tmp/tmp89l_kj79/tmpnvf_9kyh.py", line 7, in <module> w,h=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s677201114
p00741
u078042885
1487498991
Python
Python3
py
Runtime Error
0
0
447
import sys sys.setrecursionlimit(1<<32) def f(x,y): a[y][x]='0' for dx,dy in[[-1,0],[1,0],[0,-1],[0,1],[-1,-1],[1,-1],[-1,1],[1,1]]: dx+=x;dy+=y if 0<=dx<w and 0<=dy<h and a[dy][dx]=='1':f(dx,dy) while 1: w,h=map(int,input().split()) if w==0:break a=[list(input().split()) for _ in[0]...
Traceback (most recent call last): File "/tmp/tmpjxn3qj6v/tmpc1vnc4xp.py", line 2, in <module> sys.setrecursionlimit(1<<32) OverflowError: Python int too large to convert to C int
s650858426
p00741
u923668099
1495616620
Python
Python3
py
Runtime Error
0
0
839
import sys def solve(): while 1: w, h = map(int, sys.stdin.readline().split()) if w == h == 0: return room = [[int(j) for j in sys.stdin.readline().split()] for i in range(h)] cnt = 0 for i in range(h): for j in range(w): if room[i...
Traceback (most recent call last): File "/tmp/tmplhnn83dn/tmp3ic5jfwl.py", line 38, in <module> solve() File "/tmp/tmplhnn83dn/tmp3ic5jfwl.py", line 5, in solve w, h = map(int, sys.stdin.readline().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s024614965
p00741
u502536402
1524374814
Python
Python3
py
Runtime Error
0
0
814
#!python # -*- coding: utf-8 -*- import sys import numpy as np sys.setswitchinterval(10**8) next_s = ((-1, 1), (0, 1), (1, 1), (-1, 0), (1, 0), (-1, -1), (0, -1), (1, -1)) def DFS(x, y): if not (0 <= x < W and 0 <= y < H): return if not map_[y, x]: return map_[y, ...
Traceback (most recent call last): File "/tmp/tmp65vcx8fw/tmp_tjzfmlq.py", line 29, in <module> W, H = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s121003760
p00741
u502536402
1524374852
Python
Python3
py
Runtime Error
0
0
808
#!python # -*- coding: utf-8 -*- import sys import numpy as np sys.setswitchinterval(10**8) next_s = ((-1, 1), (0, 1), (1, 1), (-1, 0), (1, 0), (-1, -1), (0, -1), (1, -1)) def DFS(x, y): if not (0 <= x < W and 0 <= y < H): return if not map_[y, x]: return map_[y, ...
Traceback (most recent call last): File "/tmp/tmp5qnh3t_8/tmpi5c9nxk0.py", line 29, in <module> W, H = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s845864334
p00741
u502536402
1524385852
Python
Python3
py
Runtime Error
0
0
808
#!python # -*- coding: utf-8 -*- import sys import numpy as np sys.setswitchinterval(10**8) next_s = ((-1, 1), (0, 1), (1, 1), (-1, 0), (1, 0), (-1, -1), (0, -1), (1, -1)) def DFS(x, y): if not (0 <= x < W and 0 <= y < H): return if not map_[y, x]: return map_[y, ...
Traceback (most recent call last): File "/tmp/tmpq4tviit3/tmp7ul8cc1b.py", line 29, in <module> W, H = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s931229307
p00741
u502536402
1524386760
Python
Python3
py
Runtime Error
0
0
845
#!python # -*- coding: utf-8 -*- import sys import numpy as np sys.setswitchinterval(10**8) next_s = ((-1, 1), (0, 1), (1, 1), (-1, 0), (1, 0), (-1, -1), (0, -1), (1, -1)) def DFS(x, y): if not (0 <= x < W and 0 <= y < H): return if not map_[y * W + x]: return map...
Traceback (most recent call last): File "/tmp/tmpvg_bj4ss/tmp8xhazxhe.py", line 29, in <module> W, H = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s223014431
p00741
u502536402
1524386779
Python
Python3
py
Runtime Error
0
0
825
#!python # -*- coding: utf-8 -*- import sys sys.setswitchinterval(10**8) next_s = ((-1, 1), (0, 1), (1, 1), (-1, 0), (1, 0), (-1, -1), (0, -1), (1, -1)) def DFS(x, y): if not (0 <= x < W and 0 <= y < H): return if not map_[y * W + x]: return map_[y * W + x] = 0 ...
Traceback (most recent call last): File "/tmp/tmpfouzurjj/tmpm4iq7ek4.py", line 27, in <module> W, H = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s645649142
p00741
u502536402
1524387022
Python
Python3
py
Runtime Error
0
0
705
import sys sys.setswitchinterval(10**8) next_s = ((-1, 1), (0, 1), (1, 1), (-1, 0), (1, 0), (-1, -1), (0, -1), (1, -1)) def DFS(x, y): if not (0 <= x < W and 0 <= y < H): return if not map_[y * W + x]: return map_[y * W + x] = 0 for dx, dy in next_s: DF...
Traceback (most recent call last): File "/tmp/tmptgo52fl0/tmpmgcupsub.py", line 24, in <module> W, H = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s767661715
p00741
u502536402
1524583714
Python
Python3
py
Runtime Error
0
0
699
#!python # -*- coding: utf-8 -*- import sys sys.setswitchinterval(10**9) next_s = ((-1, 1), (0, 1), (1, 1), (-1, 0), (1, 0), (-1, -1), (0, -1), (1, -1)) def DFS(x, y): if not (0 <= x < W and 0 <= y < H): return if map_[y][x] == 0: return map_[y][x] = 0 for dx,...
Traceback (most recent call last): File "/tmp/tmpju18p14p/tmplszpwx5k.py", line 27, in <module> W, H = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s566066104
p00741
u502536402
1524583800
Python
Python3
py
Runtime Error
0
0
699
#!python # -*- coding: utf-8 -*- import sys sys.setswitchinterval(10**9) next_s = ((-1, 1), (0, 1), (1, 1), (-1, 0), (1, 0), (-1, -1), (0, -1), (1, -1)) def DFS(x, y): if not (0 <= x < W and 0 <= y < H): return if map_[y][x] == 0: return map_[y][x] = 0 for dx,...
Traceback (most recent call last): File "/tmp/tmp1n19od0z/tmpty_9f376.py", line 27, in <module> W, H = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s022326171
p00741
u023471147
1527037233
Python
Python3
py
Runtime Error
0
0
668
w, h = 0, 0 def dfs(x, y, data): data[x][y] = 0 for dx in range(-1, 2): for dy in range(-1, 2): sx, sy = x + dx, y + dy if sx < 0 or sx >= h or sy < 0 or sy >= w: continue if data[sx][sy] > 0: data = dfs(sx, sy, data) return data ...
Traceback (most recent call last): File "/tmp/tmpnns0pg_p/tmpr9b29nxz.py", line 15, in <module> w, h = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s683381761
p00741
u572046143
1527955473
Python
Python3
py
Runtime Error
0
0
884
def dfs(field, i, j, w, h): field[i][j] = "0" OFFSETS = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] for di, dj in OFFSETS: if i+di < 0 or i+di >= h: continue if j+dj < 0 or j+dj >= w: continue if field[i+di][j+dj] == "1": dfs(field...
Traceback (most recent call last): File "/tmp/tmpvs1dn1rk/tmps1sl2wcm.py", line 38, in <module> main() File "/tmp/tmpvs1dn1rk/tmps1sl2wcm.py", line 16, in main w, h = [int(s) for s in input().strip().split()] ^^^^^^^ EOFError: EOF when reading a line
s262939366
p00741
u651355315
1529316158
Python
Python3
py
Runtime Error
0
0
673
# -*- coding: utf-8 -*- def search(n, m, tile, N, M): for dy, dx in zip([-1, -1, -1, 0, 0, 1, 1, 1], [-1, 0, 1, -1, 1, -1, 0, 1]): if 0 <= dy + n < N and 0 <= dx + m < M: if tile[dy + n][dx + m] == '1': tile[dy + n][dx + m] = '2' search(dy + n, dx + m, tile, N, ...
Traceback (most recent call last): File "/tmp/tmpukzy96kg/tmpknigrk8l.py", line 13, in <module> M, N = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s376692078
p00741
u651355315
1529316173
Python
Python3
py
Runtime Error
0
0
673
# -*- coding: utf-8 -*- def search(n, m, tile, N, M): for dy, dx in zip([-1, -1, -1, 0, 0, 1, 1, 1], [-1, 0, 1, -1, 1, -1, 0, 1]): if 0 <= dy + n < N and 0 <= dx + m < M: if tile[dy + n][dx + m] == '1': tile[dy + n][dx + m] = '2' search(dy + n, dx + m, tile, N, ...
Traceback (most recent call last): File "/tmp/tmpqdncaquh/tmpnacrta2t.py", line 13, in <module> M, N = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s271385216
p00741
u136916346
1530153932
Python
Python3
py
Runtime Error
0
0
731
def fill(y,x): global w,h,l if 0<=y<h and 0<=x+1<w and l[y][x+1]==1: l[y][x+1]=0 fill(y,x+1) if 0<=y<h and 0<=x-1<w and l[y][x-1]==1: l[y][x-1]=0 fill(y,x-1) if 0<=y+1<h and 0<=x<w and l[y+1][x]==1: l[y+1][x]=0 fill(y+1,x) if 0<=y-1<h and 0<=x<w and l[...
Traceback (most recent call last): File "/tmp/tmpuh2bec46/tmpmdtlapuy.py", line 17, in <module> w,h=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s287524542
p00741
u136916346
1530154342
Python
Python3
py
Runtime Error
0
0
1102
def fill(y,x): global w,h,l if 0<=y<h and 0<=x+1<w and l[y][x+1]==1: l[y][x+1]=0 fill(y,x+1) if 0<=y<h and 0<=x-1<w and l[y][x-1]==1: l[y][x-1]=0 fill(y,x-1) if 0<=y+1<h and 0<=x<w and l[y+1][x]==1: l[y+1][x]=0 fill(y+1,x) if 0<=y-1<h and 0<=x<w and l[...
Traceback (most recent call last): File "/tmp/tmphit67ayx/tmpvas2kqli.py", line 29, in <module> w,h=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s494968269
p00741
u136916346
1530154451
Python
Python3
py
Runtime Error
0
0
1107
def fill(y,x): global w,h,l if 0<=y<h and 0<=x+1<w and l[y][x+1]==1: l[y][x+1]=0 fill(y,x+1) if 0<=y<h and 0<=x-1<w and l[y][x-1]==1: l[y][x-1]=0 fill(y,x-1) if 0<=y+1<h and 0<=x<w and l[y+1][x]==1: l[y+1][x]=0 fill(y+1,x) if 0<=y-1<h and 0<=x<w and l[...
Traceback (most recent call last): File "/tmp/tmp_q7sl0r9/tmpnir6iwm0.py", line 30, in <module> w,h=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s120665732
p00741
u136916346
1530154765
Python
Python3
py
Runtime Error
0
0
1147
import sys sys.setrecursionlimit(10000) def fill(y,x): global w,h,l if 0<=y<h and 0<=x+1<w and l[y][x+1]==1: l[y][x+1]=0 fill(y,x+1) if 0<=y<h and 0<=x-1<w and l[y][x-1]==1: l[y][x-1]=0 fill(y,x-1) if 0<=y+1<h and 0<=x<w and l[y+1][x]==1: l[y+1][x]=0 fill(...
Traceback (most recent call last): File "/tmp/tmp38kg38pg/tmp7b2waxmt.py", line 32, in <module> w,h=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s838105007
p00741
u500292616
1530688201
Python
Python
py
Runtime Error
0
0
1381
# -*- coding: utf-8 -*- #150 島は幾つある? h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]...
Traceback (most recent call last): File "/tmp/tmpmhy05nmh/tmp_xo8abuz.py", line 45, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s492978889
p00741
u500292616
1530688260
Python
Python
py
Runtime Error
0
0
1369
# -*- coding: utf-8 -*- #150 島は幾つある? h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]...
Traceback (most recent call last): File "/tmp/tmpxbrvfi6_/tmp0t5ryzms.py", line 45, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s645256540
p00741
u500292616
1530688273
Python
Python
py
Runtime Error
0
0
1346
#150 島は幾つある? h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]=0 #print("aa"...
Traceback (most recent call last): File "/tmp/tmp4_czmx7m/tmpanpaz6ve.py", line 45, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s555100266
p00741
u500292616
1530688280
Python
Python3
py
Runtime Error
0
0
1346
#150 島は幾つある? h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]=0 #print("aa"...
Traceback (most recent call last): File "/tmp/tmpa8ym1ib0/tmpys7ct_7s.py", line 45, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s139661211
p00741
u500292616
1530688310
Python
Python3
py
Runtime Error
0
0
1369
# -*- coding: utf-8 -*- #150 島は幾つある? h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]...
Traceback (most recent call last): File "/tmp/tmptuxf79m5/tmp8a944ca2.py", line 45, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s170287601
p00741
u500292616
1530688328
Python
Python
py
Runtime Error
0
0
1369
# -*- coding: utf-8 -*- #150 島は幾つある? h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]...
Traceback (most recent call last): File "/tmp/tmpfqbdb6ub/tmppzh3katv.py", line 45, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s561051344
p00741
u500292616
1530688392
Python
Python
py
Runtime Error
0
0
1318
h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]=0 #print("aa") searc...
Traceback (most recent call last): File "/tmp/tmpy9ofrd84/tmpjl0p0fh_.py", line 43, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s209767444
p00741
u500292616
1530688491
Python
Python
py
Runtime Error
0
0
1318
h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]=0 #print("aa") searc...
Traceback (most recent call last): File "/tmp/tmpj71gi3gi/tmpwyy9lwaf.py", line 43, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s804578463
p00741
u500292616
1530688612
Python
Python
py
Runtime Error
0
0
1367
# -*- coding: utf-8 -*- #150 島は幾つある? h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]...
Traceback (most recent call last): File "/tmp/tmp6mbms1rl/tmpd_btjcra.py", line 45, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s314047401
p00741
u500292616
1530688660
Python
Python3
py
Runtime Error
0
0
1367
# -*- coding: utf-8 -*- #150 島は幾つある? h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]...
Traceback (most recent call last): File "/tmp/tmpasogtr2s/tmp2_x1_nlh.py", line 45, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s221341630
p00741
u500292616
1530689064
Python
Python
py
Runtime Error
0
0
1367
# -*- coding: utf-8 -*- #150 島は幾つある? h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]...
Traceback (most recent call last): File "/tmp/tmp8ajwvlp1/tmpdigudkk8.py", line 44, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s268187374
p00741
u500292616
1530689425
Python
Python
py
Runtime Error
0
0
1368
# -*- coding: utf-8 -*- #150 島は幾つある? h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]...
Traceback (most recent call last): File "/tmp/tmpuwzypt0l/tmpvbzvolct.py", line 44, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s555522397
p00741
u500292616
1530693392
Python
Python
py
Runtime Error
0
0
1368
# -*- coding: utf-8 -*- #150 島は幾つある? h,w=1,1 count=0 anser=0 def search(x,y): #マップの外側か壁の場合は何もしない #print(x,y) global count count+=1 if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]==0: return #以前に到達していたら何もしない if reached[y][x] ==0: return reached[y][x]...
Traceback (most recent call last): File "/tmp/tmpdjufe1s3/tmppdrazoto.py", line 44, in <module> w,h=map(int ,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s160805073
p00741
u779627195
1352885304
Python
Python
py
Runtime Error
0
18000
769
def destroy(m, x, y): #print x,y if w-1 >= x >= 0 and h-1 >= y >= 0: if m[y][x] == 1: m[y][x] = 2 for i in xrange(-1, 2): for j in xrange(-1, 2): destroy(m, x+i, y+j) ...
File "/tmp/tmpdy84h58d/tmpm885do3b.py", line 23 print c ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s740984368
p00741
u779627195
1352885954
Python
Python
py
Runtime Error
0
18000
841
def destroy(m, x, y): #print x,y if m[y][x] == 1: m[y][x] = 2 for i in xrange(-1, 2): for j in xrange(-1, 2): if not (i == 0 and j == 0): if w-1 >= x+i >= 0 and h-1 >= y+j >= 0...
File "/tmp/tmpjjtjzf0s/tmp09e6g26g.py", line 24 print c ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s769948074
p00741
u779627195
1352886597
Python
Python
py
Runtime Error
0
18000
920
def destroy(m, x, y): #print x,y v[y][x] = True if m[y][x] == 1: m[y][x] = 2 for i in xrange(-1, 2): for j in xrange(-1, 2): if w-1 >= x+i >= 0 and h-1 >= y+j >= 0: if ...
File "/tmp/tmpr3q9sqta/tmp4yufyy0o.py", line 25 print c ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s050646372
p00741
u915761101
1352887057
Python
Python
py
Runtime Error
0
18000
872
def destroy(m, x, y): # print "(",x,y,")" if m[y][x] == 1: m[y][x] = 2 for i in xrange(-1, 2): for j in xrange(-1, 2): if not (i == 0 and j == 0): if w-1 >= x+i >= 0 and h-1 >= ...
File "/tmp/tmppwg5yrcq/tmpha00wro5.py", line 24 print c ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s031354073
p00741
u915761101
1352887148
Python
Python
py
Runtime Error
0
18000
869
m=[] def destroy(x, y): # print "(",x,y,")" if m[y][x] == 1: m[y][x] = 2 for i in xrange(-1, 2): for j in xrange(-1, 2): if not (i == 0 and j == 0): if w-1 >= x+i >= 0 and h-1 ...
File "/tmp/tmpq5haq1_t/tmp0jazlqvo.py", line 26 print c ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s391643442
p00741
u915761101
1352887212
Python
Python
py
Runtime Error
0
18000
892
import sys m=[] def destroy(x, y): print>>sys.stderr, "(",x,y,")" if m[y][x] == 1: m[y][x] = 2 for i in xrange(-1, 2): for j in xrange(-1, 2): if not (i == 0 and j == 0): if w...
File "/tmp/tmpj9b971m6/tmpyqmc_vq7.py", line 27 print c ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s337814303
p00741
u915761101
1352887347
Python
Python
py
Runtime Error
0
18000
18
def f(): f() f()
Traceback (most recent call last): File "/tmp/tmpi4vopleu/tmpfc4vjd5e.py", line 3, in <module> f() File "/tmp/tmpi4vopleu/tmpfc4vjd5e.py", line 2, in f f() File "/tmp/tmpi4vopleu/tmpfc4vjd5e.py", line 2, in f f() File "/tmp/tmpi4vopleu/tmpfc4vjd5e.py", line 2, in f f() [Previous line repeated ...
s155645409
p00741
u915761101
1352887402
Python
Python
py
Runtime Error
0
18000
57
import sys def f(n): print>>sys.stderr, n f(n+1) f(1)
Traceback (most recent call last): File "/tmp/tmpp4jdpty2/tmpj_n6bdxb.py", line 5, in <module> f(1) File "/tmp/tmpp4jdpty2/tmpj_n6bdxb.py", line 3, in f print>>sys.stderr, n ~~~~~^^~~~~~~~~~~ TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'. Did you mea...
s863487122
p00741
u915761101
1352887462
Python
Python
py
Runtime Error
0
18000
74
import sys def f(n): if n%100==0: print>>sys.stderr, n f(n+1) f(1)
Traceback (most recent call last): File "/tmp/tmps6ex5ohk/tmpexd8nhei.py", line 6, in <module> f(1) File "/tmp/tmps6ex5ohk/tmpexd8nhei.py", line 5, in f f(n+1) File "/tmp/tmps6ex5ohk/tmpexd8nhei.py", line 5, in f f(n+1) File "/tmp/tmps6ex5ohk/tmpexd8nhei.py", line 5, in f f(n+1) [Previous line...
s458716348
p00741
u915761101
1352887614
Python
Python
py
Runtime Error
0
18000
931
import sys m=[] def destroy(x, y,n): if n%100==0: print>>sys.stderr, "(",x,y,")",n if m[y][x] == 1: m[y][x] = 2 for i in xrange(-1, 2): for j in xrange(-1, 2): if not (i == 0 and j == 0): ...
File "/tmp/tmpp9c3_re5/tmper4vm7_l.py", line 28 print c ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s284527528
p00741
u104911888
1368855811
Python
Python
py
Runtime Error
0
0
480
def dfs(x,y): C[y][x]=0 for dx in range(-1,2): for dy in range(-1,2): mx=x+dx my=y+dy if 0<=mx<w and 0<=my<h and C[my][mx]==1: dfs(mx,my) while True: w,h=map(int,raw_input().split()) if w==h==0:break C=[map(int,raw_input().split()) for i i...
File "/tmp/tmpp6tgjvrz/tmpf2almx0k.py", line 20 print cnt ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s158288073
p00741
u104911888
1368855887
Python
Python
py
Runtime Error
0
0
491
def dfs(x,y): C[y][x]=0 for dx in range(-1,2): for dy in range(-1,2): mx=x+dx my=y+dy if 0<=mx<w and 0<=my<h and C[my][mx]==1: dfs(mx,my) return while True: w,h=map(int,raw_input().split()) if w==h==0:break C=[map(int,raw_input().split...
File "/tmp/tmpeqewoxdv/tmpvj5j2q2o.py", line 21 print cnt ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s382748150
p00741
u104911888
1369571163
Python
Python
py
Runtime Error
0
0
477
def dfs(i,j): C[i][j]=-1 for x in range(-1,2): for y in range(-1,2): mx=x+j my=y+i if 0<=mx<w and 0<=my<h and C[my][mx]==1: dfs(my,mx) while True: w,h=map(int,raw_input().split()) if w==h==0:break C=[map(int,raw_input().split()) for i in r...
File "/tmp/tmpjhn77vsc/tmpinw6b1v2.py", line 20 print cnt ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s826728061
p00741
u104911888
1369571378
Python
Python
py
Runtime Error
0
0
525
def dfs(i,j): C[i][j]=-1 for x in range(-1,2): for y in range(-1,2): mx=x+j my=y+i if mx<0 or my<0 or mx>=w or my>=h: continue if C[my][mx]==1: dfs(my,mx) while True: w,h=map(int,raw_input().split()) if w==h==0:brea...
File "/tmp/tmp7li6_zr5/tmp6y075f4e.py", line 22 print cnt ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s252813235
p00741
u633068244
1399521327
Python
Python
py
Runtime Error
0
0
422
dxy = [[1,0],[0,1],[-1,0],[0,-1],[1,1],[-1,1],[-1,-1],[1,-1]] def solve(w,h): if 0 <= w < W and 0 <= h < H and field[h][w] == 1: field[h][w] = 0 for dx,dy in dxy: solve(w+dx,h+dy) while 1: W,H = map(int,raw_input().split()) if W == 0: break field = [map(int,raw_input().split()) for i in range(H)] ans = 0 ...
File "/tmp/tmpatxyocip/tmpzi2q7v_9.py", line 18 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s419181813
p00741
u633068244
1399527599
Python
Python
py
Runtime Error
0
0
435
global field dxy = [[1,0],[0,1],[-1,0],[0,-1],[1,1],[-1,1],[-1,-1],[1,-1]] def solve(w,h): if 0 <= w < W and 0 <= h < H and field[h][w] == 1: field[h][w] = 0 for dx,dy in dxy: solve(w+dx,h+dy) while 1: W,H = map(int,raw_input().split()) if W == 0: break field = [map(int,raw_input().split()) for i in range(H...
File "/tmp/tmp38tfhv3f/tmptupy7aci.py", line 19 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s567116641
p00741
u633068244
1399528040
Python
Python
py
Runtime Error
0
0
440
dxy = [[1,0],[0,1],[-1,0],[0,-1],[1,1],[-1,1],[-1,-1],[1,-1]] def solve(field,w,h): if 0 <= w < W and 0 <= h < H and field[h][w] == 1: field[h][w] = 0 for dx,dy in dxy: solve(field,w+dx,h+dy) while 1: W,H = map(int,raw_input().split()) if W == 0: break field = [map(int,raw_input().split()) for i in range(H)...
File "/tmp/tmpwgei4_j0/tmp9kjdkul4.py", line 18 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s946789338
p00741
u633068244
1399528083
Python
Python
py
Runtime Error
0
0
469
dxy = [[1,0],[0,1],[-1,0],[0,-1],[1,1],[-1,1],[-1,-1],[1,-1]] def solve(field,w,h): if 0 <= w < W and 0 <= h < H and field[h][w] == 1: field[h][w] = 0 for dx,dy in dxy: solve(field,w+dx,h+dy) return 1 else: return 0 while 1: W,H = map(int,raw_input().split()) if W == 0: break field = [map(int,raw_input...
File "/tmp/tmprmz4x3bi/tmpfrjjdyt_.py", line 21 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s073863723
p00741
u633068244
1399528821
Python
Python
py
Runtime Error
0
0
440
dwh = [[1,0],[0,1],[-1,0],[0,-1],[1,1],[-1,1],[-1,-1],[1,-1]] def solve(field,w,h): if 0 <= w < W and 0 <= h < H and field[h][w] == 1: field[h][w] = 0 for dw,dh in dwh: solve(field,w+dw,h+dh) while 1: W,H = map(int,raw_input().split()) if W == 0: break field = [map(int,raw_input().split()) for i in range(H)...
File "/tmp/tmpup85np04/tmpotfe5uwm.py", line 18 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s779310074
p00741
u633068244
1399528922
Python
Python
py
Runtime Error
0
0
448
dwh = [[1,0],[0,1],[-1,0],[0,-1],[1,1],[-1,1],[-1,-1],[1,-1]] def solve(field,w,h): if 0 <= w < W and 0 <= h < H and field[h][w] == 1: field[h][w] = 0 for dw,dh in dwh: solve(field,w+dw,h+dh) return while 1: W,H = map(int,raw_input().split()) if W == 0: break field = [map(int,raw_input().split()) for i in ...
File "/tmp/tmpbbbu7ioi/tmpu1yqmgx_.py", line 19 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s316429501
p00742
u509278866
1535079648
Python
Python3
py
Runtime Error
0
0
2146
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 = 10**9+7 dd = [(-1,0),(0,1),(1,0),(0,-1)] ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] def LI(): return [int(x) for x in sys.stdin....
Traceback (most recent call last): File "/tmp/tmpubmc4brf/tmp78lr8iue.py", line 81, in <module> print(main()) ^^^^^^ File "/tmp/tmpubmc4brf/tmp78lr8iue.py", line 72, in main n = I() ^^^ File "/tmp/tmpubmc4brf/tmp78lr8iue.py", line 14, in I def I(): return int(sys.stdin.readline()) ...
s678376944
p00742
u082657995
1556804634
Python
Python3
py
Runtime Error
0
0
844
from collections import defaultdict from itertools import permutations while True: N = int(input()) if N==0: break non_zero = set() dd = defaultdict(int) for _ in range(N-1): s = input() for i, c in enumerate(s[::-1]): dd[c] += 10**i if len(s) != 1: ...
Traceback (most recent call last): File "/tmp/tmp_2xeztu4/tmpmxdgpjhb.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s659688797
p00742
u082657995
1556805259
Python
Python3
py
Runtime Error
0
0
829
from collections import defaultdict from itertools import permutations while True: N = int(input()) if N==0: break non_zero = set() dd = defaultdict(int) for _ in range(N-1): s = input() for i, c in enumerate(s[::-1]): dd[c] += 10**i if len(s) != 1: ...
Traceback (most recent call last): File "/tmp/tmp4qcd4izi/tmpfhws4qqr.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s841751376
p00742
u082657995
1556810757
Python
Python3
py
Runtime Error
0
0
1118
from collections import defaultdict from itertools import permutations import gc while True: N = int(input()) if N==0: break non_zero = set() dd = defaultdict(int) for _ in range(N-1): s = input() for i, c in enumerate(s[::-1]): dd[c] += 10**i if len(s) ...
Traceback (most recent call last): File "/tmp/tmp9tsah4cb/tmpnmzb5325.py", line 6, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s427690322
p00742
u082657995
1556810988
Python
Python3
py
Runtime Error
0
0
1119
from collections import defaultdict from itertools import permutations while True: N = int(input()) if N==0: break non_zero = set() dd = defaultdict(int) for _ in range(N-1): s = input() for i, c in enumerate(s[::-1]): dd[c] += 10**i if len(s) != 1: ...
Traceback (most recent call last): File "/tmp/tmpnzabhpry/tmp7h0x6ga1.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s997893253
p00742
u082657995
1556811047
Python
Python3
py
Runtime Error
0
0
1124
from collections import defaultdict from itertools import permutations while True: N = int(input()) if N==0: break non_zero = set() dd = defaultdict(int) for _ in range(N-1): s = input() for i, c in enumerate(s[::-1]): dd[c] += 10**i if len(s) != 1: ...
Traceback (most recent call last): File "/tmp/tmpaar18xme/tmp_m4gotev.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s440846598
p00742
u260980560
1501168743
Python
Python3
py
Runtime Error
40000
8024
893
from collections import deque def solve(n, S): C = {}; E = {} for i, s in enumerate(S): v = 1 for c in reversed(s): if c not in C: C[c] = 1 if i < n-1: E[c] = E.get(c, 0) + v else: E[c] = E.get(c, 0) - v ...
Traceback (most recent call last): File "/tmp/tmpi71yc5sg/tmpbe9feo3a.py", line 32, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s670816197
p00744
u871901071
1405335538
Python
Python3
py
Runtime Error
39860
98528
2125
from collections import deque inf = 1000000000 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] = p, e ...
Traceback (most recent call last): File "/tmp/tmpj_mx2xk8/tmpsvrklqbv.py", line 84, in <module> main() File "/tmp/tmpj_mx2xk8/tmpsvrklqbv.py", line 62, in main m, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line