s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
s934998267
p00118
u945345165
1493345405
Python
Python3
py
Runtime Error
0
0
1218
def setLine(tempH, line): for i in range(0, len(line)): geo[tempH][i] = line[i:i+1] def solve(): person = 0 for i in range(0,H): for j in range(0,W): if geo[i][j] is not "_": search(i,j) person += 1 print(person) def search(i,j): temp = g...
s360904846
p00118
u945345165
1493345491
Python
Python3
py
Runtime Error
0
0
1263
def setLine(tempH, line): for i in range(0, len(line)): geo[tempH][i] = line[i:i+1] def solve(): person = 0 for i in range(0,H): for j in range(0,W): if geo[i][j] is not "_": search(i,j) person += 1 print(person) def search(i,j): temp = g...
s014445014
p00118
u284851373
1493353440
Python
Python3
py
Runtime Error
0
0
1037
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def preDatasets(): #f = open('a.txt') datas = sys.stdin.readlines() #f.close() for i in range(len(datas)): datas[i] = datas[i].strip('\n') return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY...
s530122803
p00118
u284851373
1493353462
Python
Python3
py
Runtime Error
0
0
1005
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def preDatasets(): datas = sys.stdin.readlines() for i in range(len(datas)): datas[i] = datas[i].strip('\n') return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if(nx>=0 and nx<N and ny>=...
s321331159
p00118
u284851373
1493353477
Python
Python3
py
Runtime Error
0
0
1006
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(10000000) def preDatasets(): datas = sys.stdin.readlines() for i in range(len(datas)): datas[i] = datas[i].strip('\n') return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if(nx>=0 and nx<N and ny>...
s301512354
p00118
u284851373
1493353538
Python
Python3
py
Runtime Error
0
0
993
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(10000000) def preDatasets(): datas = sys.stdin.readlines() for i in range(len(datas)): datas[i] = datas[i].strip('\n') return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if(nx>=0 and nx<N and ny>...
s627237537
p00118
u284851373
1493353593
Python
Python3
py
Runtime Error
0
0
993
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(10000000) def preDatasets(): datas = sys.stdin.readlines() for i in range(len(datas)): datas[i] = datas[i].strip('\n') return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if(nx>=0 and nx<N and ny>...
s075700566
p00118
u284851373
1493353803
Python
Python3
py
Runtime Error
0
0
993
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(10000000) def preDatasets(): datas = sys.stdin.readlines() for i in range(len(datas)): datas[i] = datas[i].strip('\n') return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if(nx>=0 and nx<N and ny>...
s273528107
p00118
u284851373
1493354047
Python
Python3
py
Runtime Error
0
0
979
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(10000000) def preDatasets(): datas = input() for i in range(len(datas)): datas[i] = datas[i].strip('\n') return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if(nx>=0 and nx<N and ny>=0 and ny<M an...
s830627017
p00118
u284851373
1493354059
Python
Python3
py
Runtime Error
0
0
978
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def preDatasets(): datas = input() for i in range(len(datas)): datas[i] = datas[i].strip('\n') return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if(nx>=0 and nx<N and ny>=0 and ny<M and...
s489680143
p00118
u284851373
1493354098
Python
Python3
py
Runtime Error
0
0
976
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def preDatasets(): datas = input() for i in range(len(datas)): datas[i] = datas[i].strip('\n') return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and...
s833425412
p00118
u284851373
1493354114
Python
Python3
py
Runtime Error
0
0
953
import sys sys.setrecursionlimit(1000000) def preDatasets(): datas = input() for i in range(len(datas)): datas[i] = datas[i].strip('\n') return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: ...
s074034955
p00118
u284851373
1493355247
Python
Python3
py
Runtime Error
0
0
1043
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def preDatasets(q): line = input() print(line) datas[q] = line return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny...
s557981532
p00118
u284851373
1493355865
Python
Python3
py
Runtime Error
0
0
866
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not ...
s282190541
p00118
u284851373
1493355908
Python
Python3
py
Runtime Error
0
0
865
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(100000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not t...
s652211314
p00118
u284851373
1493356532
Python
Python3
py
Runtime Error
0
0
874
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not ...
s529157817
p00118
u284851373
1493356540
Python
Python3
py
Runtime Error
0
0
851
import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not tile[i][j] == '.': ...
s717952627
p00118
u284851373
1493356679
Python
Python3
py
Runtime Error
0
0
852
import sys sys.setrecursionlimit(10000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not tile[i][j] == '.': ...
s238784118
p00118
u284851373
1493356686
Python
Python3
py
Runtime Error
0
0
853
import sys sys.setrecursionlimit(100000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not tile[i][j] == '.': ...
s763960044
p00118
u284851373
1493356691
Python
Python3
py
Runtime Error
0
0
854
import sys sys.setrecursionlimit(1000000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not tile[i][j] == '.': ...
s329311281
p00118
u284851373
1493356994
Python
Python3
py
Runtime Error
0
0
869
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not ...
s667472085
p00118
u284851373
1493357012
Python
Python3
py
Runtime Error
0
0
846
import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not tile[i][j] == '.': ...
s836370163
p00118
u284851373
1493357277
Python
Python3
py
Runtime Error
0
0
846
import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not tile[i][j] == '.': ...
s126024851
p00118
u284851373
1493357322
Python
Python3
py
Runtime Error
0
0
869
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not ...
s224220259
p00118
u284851373
1493364020
Python
Python3
py
Runtime Error
0
0
885
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not ...
s719223417
p00118
u284851373
1493364733
Python
Python3
py
Runtime Error
0
0
890
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not ...
s440380822
p00118
u284851373
1493364865
Python
Python3
py
Runtime Error
0
0
921
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in ran...
s906244117
p00118
u284851373
1493365725
Python
Python3
py
Runtime Error
0
0
908
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not ...
s451740147
p00118
u284851373
1493365943
Python
Python3
py
Runtime Error
0
0
901
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not ...
s989840761
p00118
u284851373
1493377023
Python
Python3
py
Runtime Error
0
0
1041
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(10000) def preDatasets(q): line = input() print(line) datas[q] = line return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, ...
s275917829
p00118
u284851373
1493377030
Python
Python3
py
Runtime Error
0
0
1042
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(100000) def preDatasets(q): line = input() print(line) datas[q] = line return datas def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny,...
s120248550
p00118
u284851373
1493377051
Python
Python3
py
Runtime Error
0
0
891
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not ...
s920379870
p00118
u284851373
1493377060
Python
Python3
py
Runtime Error
0
0
890
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(100000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not t...
s223419124
p00118
u284851373
1493377068
Python
Python3
py
Runtime Error
0
0
892
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(10000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if not...
s791601386
p00118
u284851373
1493377075
Python
Python3
py
Runtime Error
0
0
893
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(100000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if no...
s052220987
p00118
u284851373
1493377081
Python
Python3
py
Runtime Error
0
0
894
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if n...
s474773864
p00118
u284851373
1493379971
Python
Python3
py
Runtime Error
0
0
864
import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = '.' for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if tile[i][j] != '.': if t...
s599358554
p00118
u284851373
1493380569
Python
Python3
py
Runtime Error
0
0
887
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if tile...
s632590658
p00118
u284851373
1493380638
Python
Python3
py
Runtime Error
0
0
861
# -*- coding:utf-8 -*- import sys sys.setrecursionlimit(1000000) def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if tile...
s230938620
p00118
u284851373
1493380677
Python
Python3
py
Runtime Error
0
0
861
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if tile[i][j] != ".": if tile[i][j...
s500538582
p00118
u284851373
1493380864
Python
Python3
py
Runtime Error
0
0
860
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if tile[i][j] != ".": if tile[i][j...
s882919592
p00118
u284851373
1493380929
Python
Python3
py
Runtime Error
0
0
908
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): if tile[i][j] != ".": if tile[i][j...
s609385909
p00118
u284851373
1493381149
Python
Python3
py
Runtime Error
0
0
808
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny]==sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != "...
s354316486
p00118
u284851373
1493381185
Python
Python3
py
Runtime Error
0
0
810
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] !=...
s940632651
p00118
u284851373
1493381249
Python
Python3
py
Runtime Error
0
0
806
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(0,4): nx = x + DX[i] ny = y + DY[i] if nx>=0 and nx<N and ny>=0 and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != "."...
s451541061
p00118
u284851373
1493381358
Python
Python3
py
Runtime Error
0
0
810
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] !=...
s538858804
p00118
u284851373
1493381397
Python
Python3
py
Runtime Error
0
0
786
import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != ".": if tile[i][j] ...
s954808043
p00118
u284851373
1493381449
Python
Python3
py
Runtime Error
0
0
811
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] !=...
s467394555
p00118
u284851373
1493382062
Python
Python3
py
Runtime Error
0
0
823
# -*- coding:utf-8 -*- import sys print("hi") def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if t...
s432496123
p00118
u284851373
1493382079
Python
Python3
py
Runtime Error
0
0
789
#import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != ".": if tile[i][j...
s472950882
p00118
u284851373
1493382118
Python
Python3
py
Runtime Error
0
0
797
import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != ".": if tile[i][j]...
s778233940
p00118
u284851373
1493382166
Python
Python3
py
Runtime Error
0
0
740
import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != ".": if tile[i][j]...
s089512826
p00118
u284851373
1493382346
Python
Python3
py
Runtime Error
0
0
762
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] !=...
s340568184
p00118
u284851373
1493382622
Python
Python3
py
Runtime Error
0
0
762
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] !=...
s618552202
p00118
u284851373
1493382654
Python
Python3
py
Runtime Error
0
0
762
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] !=...
s610514734
p00118
u284851373
1493382762
Python
Python3
py
Runtime Error
0
0
781
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] !=...
s372281997
p00118
u284851373
1493382851
Python
Python3
py
Runtime Error
0
0
782
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] !=...
s222454450
p00118
u284851373
1493382861
Python
Python3
py
Runtime Error
0
0
759
import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym: dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != ".": if tile[i][j]...
s727140390
p00118
u284851373
1493382930
Python
Python3
py
Runtime Error
0
0
781
# -*- coding:utf-8 -*- import sys def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != ".": if tile[i][j] is sym: dfs(i, j, sym) res += 1 print(res) def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if 0<...
s756986612
p00118
u284851373
1493382997
Python
Python3
py
Runtime Error
0
0
783
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym): dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] !...
s182468996
p00118
u284851373
1493383004
Python
Python3
py
Runtime Error
0
0
760
import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym): dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != ".": if tile[i][j...
s493115951
p00118
u284851373
1493383359
Python
Python3
py
Runtime Error
0
0
760
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym): dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] !...
s789914911
p00118
u284851373
1493383372
Python
Python3
py
Runtime Error
0
0
737
import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym): dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != ".": if tile[i][j...
s523045953
p00118
u284851373
1493383541
Python
Python3
py
Runtime Error
0
0
754
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym): dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] !...
s989781371
p00118
u284851373
1493383569
Python
Python3
py
Runtime Error
0
0
731
import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym): dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != ".": if tile[i][j...
s674688619
p00118
u284851373
1493383837
Python
Python3
py
Runtime Error
0
0
756
# -*- coding:utf-8 -*- import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym): dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] !...
s149981385
p00118
u284851373
1493383846
Python
Python3
py
Runtime Error
0
0
733
import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym): dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != ".": if tile[i][j...
s467105478
p00118
u284851373
1493383953
Python
Python
py
Runtime Error
0
0
733
import sys def dfs(x, y, sym): tile[x][y] = "." for i in range(len(DX)): nx = x + DX[i] ny = y + DY[i] if (0<=nx and nx<N and 0<=ny and ny<M and tile[nx][ny] is sym): dfs(nx, ny, sym) def solve(): res = 0 for i in range(N): for j in range(M): sym = tile[i][j] if tile[i][j] != ".": if tile[i][j...
s567779812
p00118
u577311000
1493714463
Python
Python3
py
Runtime Error
0
0
988
# -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10*6) def search(values,hp,vp,item): if not (0<=hp<len(values)): return if not (0<=vp<len(values[hp])): return if item!=values[hp][vp]: return values[hp][vp]=True # for dh,dv in [[0,1],[0,-1],[1,0],[-1,0]]: # search(values,hp+dh,vp+dv,item) search(values,...
s382432649
p00118
u577311000
1493715008
Python
Python3
py
Runtime Error
0
0
989
# -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10*6) def search(values,hp,vp,item): if not (0<=hp<len(values)): return if not (0<=vp<len(values[hp])): return if item!=values[hp][vp]: return values[hp][vp]=True # for dh,dv in [[0,1],[0,-1],[1,0],[-1,0]]: # search(values,hp+dh,vp+dv,item) search(values,...
s405519832
p00118
u577311000
1493715399
Python
Python3
py
Runtime Error
0
0
1061
# -*- coding: utf-8 -*- import sys #sys.setrecursionlimit(10**6) sys.setrecursionlimit(10*6) def search(values,hp,vp,item): if not (0<=hp<len(values)): return if not (0<=vp<len(values[hp])): return if item!=values[hp][vp]: return values[hp][vp]=True # for dh,dv in [[0,1],[0,-1],[1,0],[-1,0]]: # search(values,hp+...
s845952058
p00118
u577311000
1493715453
Python
Python3
py
Runtime Error
0
0
861
# -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10**6) def search(values,hp,vp,item): if not (0<=hp<len(values)): return if not (0<=vp<len(values[hp])): return if item!=values[hp][vp]: return values[hp][vp]=True # for dh,dv in [[0,1],[0,-1],[1,0],[-1,0]]: # search(values,hp+dh,vp+dv,item) search(values...
s186540615
p00118
u577311000
1493715499
Python
Python3
py
Runtime Error
0
0
857
# -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10**6) def search(values,hp,vp,item): if not (0<=hp<len(values)): return if not (0<=vp<len(values[hp])): return if item!=values[hp][vp]: return values[hp][vp]=True # for dh,dv in [[0,1],[0,-1],[1,0],[-1,0]]: # search(values,hp+dh,vp+dv,item) search(values...
s520439186
p00118
u577311000
1493715586
Python
Python3
py
Runtime Error
0
0
906
# -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10**6) def search(values,hp,vp,item): if not (0<=hp<len(values)): return if not (0<=vp<len(values[hp])): return if item!=values[hp][vp]: return values[hp][vp]=True for dh,dv in list([0,1],[0,-1],[1,0],[-1,0]): search(values,hp+dh,vp+dv,item) # search(val...
s660982645
p00118
u462831976
1494782723
Python
Python3
py
Runtime Error
0
0
979
# -*- coding: utf-8 -*- import sys import os import math directions = [(1, 0), (-1, 0), (0, 1), (0, -1)] for s in sys.stdin: H, W = map(int, s.split()) if H == W == 0: break # map M = [] for i in range(H): s = input().strip() M.append(s) # W x H white map A = [[N...
s670660826
p00118
u462831976
1494782807
Python
Python3
py
Runtime Error
0
0
979
# -*- coding: utf-8 -*- import sys import os import math directions = [(1, 0), (-1, 0), (0, 1), (0, -1)] for s in sys.stdin: H, W = map(int, s.split()) if H == W == 0: break # map M = [] for i in range(H): s = input().strip() M.append(s) # W x H white map A = [[N...
s612681325
p00118
u462831976
1494783001
Python
Python3
py
Runtime Error
0
0
979
# -*- coding: utf-8 -*- import sys import os import math directions = [(1, 0), (-1, 0), (0, 1), (0, -1)] for s in sys.stdin: H, W = map(int, s.split()) if H == W == 0: break # map M = [] for i in range(H): s = input().strip() M.append(s) # W x H white map A = [[N...
s649631175
p00118
u724963150
1496416526
Python
Python3
py
Runtime Error
0
0
659
while True: a=[int(num)for num in input().split(' ')] if a[0]==0:break s=[] cnt=0 def rep(r,c,nest): global cnt f=s[r][c] if f=='.':return s[r][c]='.' if r>0: if s[r-1][c]==f:rep(r-1,c,False) if r<a[0]-1: if s[r+1][c]==f:rep(r+1...
s791906152
p00118
u724963150
1496419194
Python
Python3
py
Runtime Error
0
0
693
import sys sys.setrecursionlimit(9000) while True: a=[int(num)for num in input().split(' ')] if a[0]==0:break s=[] cnt=0 def rep(r,c,nest): global cnt f=s[r][c] if f=='.':return s[r][c]='.' if r>0: if s[r-1][c]==f:rep(r-1,c,False) if r<a[0]...
s852116828
p00118
u811733736
1504099727
Python
Python3
py
Runtime Error
0
0
2491
# -*- coding: utf-8 -*- """ http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0118 """ import sys def solve(data): size = len(data[0]) data.insert(0, ['0' for _ in range(size)]) data.insert(len(data), ['0' for _ in range(size)]) processing_area = [] area_id = 0 for y in range(1, len(d...
s880281418
p00118
u811733736
1504100899
Python
Python3
py
Runtime Error
0
0
2541
# -*- coding: utf-8 -*- """ http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0118 """ import sys def solve(data): size = len(data[0]) data.insert(0, ['0' for _ in range(size)]) data.insert(len(data), ['0' for _ in range(size)]) processing_area = [] area_id = 0 for y in range(1, len(d...
s994481713
p00118
u811733736
1504100952
Python
Python3
py
Runtime Error
0
0
2543
# -*- coding: utf-8 -*- """ http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0118 """ import sys def solve(data): size = len(data[0]) data.insert(0, ['0' for _ in range(size)]) data.insert(len(data), ['0' for _ in range(size)]) processing_area = [] area_id = 0 for y in range(1, len(d...
s938269657
p00118
u811733736
1504101257
Python
Python3
py
Runtime Error
0
0
2574
# -*- coding: utf-8 -*- """ http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0118 """ import sys def solve(data): size = len(data[0]) data.insert(0, ['0' for _ in range(size)]) data.insert(len(data), ['0' for _ in range(size)]) processing_area = [] area_id = 0 for y in range(1, len(d...
s167591882
p00118
u510797278
1504673545
Python
Python3
py
Runtime Error
0
0
1035
field = [] w = 0 h = 0 def main(): global field, w, h while True: h, w = map(int, input().split()) if h == 0 and w == 0: break count = 0 field = [[0] * w for _ in range(h)] for y in range(h): kinds = [_ for _ in input()] arrangement(k...
s931707152
p00118
u510797278
1504674764
Python
Python3
py
Runtime Error
0
0
1001
field = [] w = 0 h = 0 def main(): global field, w, h while True: h, w = map(int, input().split()) if h == 0 and w == 0: break count = 0 [field.append([_ for _ in input()]) for _ in range(h)] print(field) for y in range(h): for x in range...
s402264668
p00118
u510797278
1504688663
Python
Python3
py
Runtime Error
0
0
840
field = [] w = 0 h = 0 def main(): global field, w, h while True: h, w = map(int, input().split()) if h == 0 and w == 0: break count = 0 [field.append([_ for _ in input()]) for _ in range(h)] for y in range(h): for x in range(w): ...
s324230965
p00118
u510797278
1504688841
Python
Python3
py
Runtime Error
0
0
859
field = [] w = 0 h = 0 def main(): global field, w, h while True: h, w = map(int, input().split()) if h == 0 and w == 0: break count = 0 field = [] [field.append([_ for _ in input()]) for _ in range(h)] for y in range(h): for x in range(w...
s412096775
p00118
u695154284
1505222566
Python
Python3
py
Runtime Error
0
0
749
import sys d = [(1, 0), (-1, 0), (0, 1), (0, -1)] def dfs(x, y, c): judged[x][y] = True for dx, dy in d: if 0 <= x + dx < H and 0 <= y + dy < W and (not judged[x + dx][y + dy]) and orchard[x + dx][y + dy] == c: dfs(x + dx, y + dy, c) if __name__ == '__main__': while True: H,...
s980605873
p00118
u695154284
1505222609
Python
Python3
py
Runtime Error
0
0
749
import sys d = [(1, 0), (-1, 0), (0, 1), (0, -1)] def dfs(x, y, c): judged[x][y] = True for dx, dy in d: if 0 <= x + dx < H and 0 <= y + dy < W and (not judged[x + dx][y + dy]) and orchard[x + dx][y + dy] == c: dfs(x + dx, y + dy, c) if __name__ == '__main__': while True: H,...
s573424296
p00118
u695154284
1505222884
Python
Python3
py
Runtime Error
0
0
752
import sys d = [(1, 0), (-1, 0), (0, 1), (0, -1)] def dfs(x, y, c): judged[x][y] = True for dx, dy in d: if 0 <= x + dx < H and 0 <= y + dy < W and (not judged[x + dx][y + dy]) and orchard[x + dx][y + dy] == c: dfs(x + dx, y + dy, c) if __name__ == '__main__': while True: H,...
s648310386
p00118
u695154284
1505223261
Python
Python3
py
Runtime Error
0
0
749
import sys d = [(1, 0), (-1, 0), (0, 1), (0, -1)] def dfs(x, y, c): judged[x][y] = True for dx, dy in d: if 0 <= x + dx < H and 0 <= y + dy < W and (not judged[x + dx][y + dy]) and orchard[x + dx][y + dy] == c: dfs(x + dx, y + dy, c) if __name__ == '__main__': while True: H,...
s778225904
p00118
u695154284
1505223451
Python
Python3
py
Runtime Error
0
0
765
import sys d = [(1, 0), (-1, 0), (0, 1), (0, -1)] def dfs(x, y, c): judged[x][y] = True for dx, dy in d: if 0 <= x + dx < H and 0 <= y + dy < W and (not judged[x + dx][y + dy]) and orchard[x + dx][y + dy] == c: dfs(x + dx, y + dy, c) if __name__ == '__main__': while True: H,...
s261530839
p00118
u618725557
1509889516
Python
Python3
py
Runtime Error
0
0
603
def infection(i, j): if farm[i][j] == moji: farm[i][j] = '+'; if j + 1 < W : infection(i, j + 1) if i + 1 < H : infection(i + 1, j) if j - 1 >= 0 :infection(i, j - 1) if i - 1 >= 0 :infection(i - 1, j) while(1): farm = [] cnt = 0; H, W = list(map(int, input().spl...
s214074519
p00118
u618725557
1509889560
Python
Python3
py
Runtime Error
0
0
603
def infection(i, j): if farm[i][j] == moji: farm[i][j] = '+' if j + 1 < W : infection(i, j + 1) if i + 1 < H : infection(i + 1, j) if j - 1 >= 0 :infection(i, j - 1) if i - 1 >= 0 :infection(i - 1, j) while(1): farm = [] cnt = 0 H, W = list(map(int, input().split...
s632549410
p00118
u618725557
1509889653
Python
Python3
py
Runtime Error
0
0
603
def infection(i, j): if farm[i][j] == moji: farm[i][j] = '+' if j + 1 < W : infection(i, j + 1) if i + 1 < H : infection(i + 1, j) if j - 1 >= 0 :infection(i, j - 1) if i - 1 >= 0 :infection(i - 1, j) while(1): farm = [] cnt = 0 H, W = list(map(int, input().split...
s865775379
p00118
u618725557
1509889899
Python
Python3
py
Runtime Error
0
0
629
def infection(i, j,H, W, moji): if farm[i][j] == moji: farm[i][j] = '+' if j + 1 < W : infection(i, j + 1,H,W,moji) if i + 1 < H : infection(i + 1, j,H,W,moji) if j - 1 >= 0 :infection(i, j - 1,H,W,moji) if i - 1 >= 0 :infection(i - 1, j,H,W,moji) while(1): farm = [] ...
s737578014
p00118
u618725557
1509889912
Python
Python3
py
Runtime Error
0
0
632
def infection(i, j,H, W, moji): if farm[i][j] == moji: farm[i][j] = '+' if j + 1 < W : infection(i, j + 1,H,W,moji) if i + 1 < H : infection(i + 1, j,H,W,moji) if j - 1 >= 0 :infection(i, j - 1,H,W,moji) if i - 1 >= 0 :infection(i - 1, j,H,W,moji) while(True): farm = [] ...
s659556503
p00118
u618725557
1509890106
Python
Python3
py
Runtime Error
0
0
605
def infection(i, j): if farm[i][j] == moji: farm[i][j] = '+' if j + 1 < W : infection(i, j + 1) if i + 1 < H : infection(i + 1, j) if j - 1 >= 0 :infection(i, j - 1) if i - 1 >= 0 :infection(i - 1, j) while True: farm = [] cnt = 0 H, W = list(map(int, input().spl...
s901289578
p00118
u043254318
1526744858
Python
Python3
py
Runtime Error
0
0
1020
def search(table, visited, i, j, c): visited[i][j] = True if table[i-1][j] == c and visited[i-1][j] == False: search(table, visited, i-1, j, c) if table[i+1][j] == c and visited[i+1][j] == False: search(table, visited, i+1, j, c) if table[i][j-1] == c and visited[i][j-1] == False: ...
s267399255
p00118
u352394527
1527713967
Python
Python3
py
Runtime Error
0
0
581
while True: h, w = map(int, input().split()) if not h: break mp = [list("X" + input() + "X") for _ in range(h)] mp.insert(0, ["X"] * (w + 2)) mp.append(["X"] * (w + 2)) direct = ((0, 1), (0, -1), (1, 0), (-1, 0)) def search(x, y, target): mp[y][x] = "X" for dx, dy in direct: nx, ny ...