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
s906112099
p03573
u867069435
1508029424
Python
Python (3.4.3)
py
Runtime Error
17
2940
123
a = input().split() if a[0] == a[1]: print(a[3]) elif a[0] == a[2]: print(a[1]) elif a[1] == a[2]: print(a[0])
s635653814
p03573
u780709476
1508029399
Python
Python (3.4.3)
py
Runtime Error
17
2940
71
if(A == B): print(C) elif(B == C): print(A) else: print(B)
s061740020
p03573
u867069435
1508029373
Python
Python (3.4.3)
py
Runtime Error
17
3060
138
a = input().split() if a[0] == a[1]: print(int(a[3])) elif a[0] == a[2]: print(int(a[1])) elif a[1] == a[2]: print(int(a[0]))
s157294920
p03573
u497285470
1508029369
Python
Python (3.4.3)
py
Runtime Error
17
2940
147
puts=input().split() A = int(inputs[0]) B = int(inputs[1]) C = int(inputs[2]) if A == B: print(C) elif B == C: print(A) else: print(B)
s807202596
p03573
u417658545
1508029349
Python
Python (3.4.3)
py
Runtime Error
16
2940
254
Python Editor 5.2.0. New Open Save Run Export untitle.py [no ads ?] Snippets print(A) 1 import numpy as np 2 ​ 3 A, B, C = (list(map(int, input().split()))) 4 if(A == B): 5 print(C) 6 elif(A == C): 7 print(B) 8 else: 9 print(A)
s837744918
p03573
u497285470
1508029300
Python
Python (3.4.3)
py
Runtime Error
19
3316
141
inputs=input() A = int(inputs[0]) B = int(inputs[1]) C = int(inputs[2]) if A == B: print(C) elif B == C: print(A) else: print(B)
s593567028
p03573
u942033906
1508029292
Python
Python (3.4.3)
py
Runtime Error
18
2940
90
A,B,C = map(int,input.split()) if A == B: print(C) elif B == C: print(A) else: print(B)
s250025207
p03573
u867069435
1508029290
Python
Python (3.4.3)
py
Runtime Error
17
2940
134
a = input().split() if a[0] == a[1]: print(int(a[3])) if a[0] == a[2]: print(int(a[1])) if a[1] == a[2]: print(int(a[0]))
s264720584
p03573
u226155577
1508029263
Python
Python (3.4.3)
py
Runtime Error
17
2940
74
S=map(int, input().split()) S.sort() print(S[0] if S[1] == S[2] else S[2])
s858568889
p03574
u555587832
1601410526
Python
Python (3.8.2)
py
Runtime Error
121
27236
572
import numpy as np h,w = map(int,(input().split())) s = [list(map(str,input())) for i in range(h)] l = [[0]*(w+2) for i in range(h+2)] def addFlag(i,j): for x in range(3): for y in range(3): if l[i+x][j+y] != '#': l[i+x][j+y] += 1 for i in range(h): for j...
s160972320
p03574
u555587832
1601410269
Python
Python (3.8.2)
py
Runtime Error
117
27208
574
import numpy as np h,w = map(int,(input().split())) s = [list(map(str,input())) for i in range(h)] l = [[0]*(w+2) for i in range(h+2)] def addFlag(i,j): for x in range(3): for y in range(3): if l[i+x][j+y] != '#': l[i+x][j+y] += 1 for i in range(h): for j ...
s700311867
p03574
u555587832
1601410201
Python
Python (3.8.2)
py
Runtime Error
119
27364
567
import numpy as np h,w = map(int,(input().split())) s = [list(map(str,input())) for i in range(h)] l = [[0]*(w+2) for i in range(h+2)] def addFlag(i,j): for x in range(3): for y in range(3): if l[i+x][j+y] != '#': l[i+x][j+y] += 1 for i in range(h): for j...
s543784707
p03574
u555587832
1601409853
Python
Python (3.8.2)
py
Runtime Error
120
27288
518
import numpy as np h,w = map(int,(input().split())) s = [list(map(str,input())) for i in range(h)] l = [[0]*(w+2) for i in range(h+2)] def addFlag(i,j): for x in range(3): for y in range(3): if l[i+x][j+y] != '#': l[i+x][j+y] += 1 for i in range(h): for j ...
s215031436
p03574
u068142202
1601312811
Python
Python (3.8.2)
py
Runtime Error
28
9100
611
h, w = map(int, input().split()) field = [list(input().split()) for _ in range(h)] dx = [1, 0, -1, 0, 1, -1, -1, 1] dy = [0, 1, 0, -1, 1, 1, -1, -1] for i in range(h): for j in range(w): if field[i][j] != "#": num = 0 for k in range(8): ni = i + dy[k] ...
s333665452
p03574
u014139588
1600894880
Python
Python (3.8.2)
py
Runtime Error
32
9300
1145
h,w = map(int,input().split()) s = [list(map(str,input())) for _ in range(h)] for i in range(h): for j in range(w): if s[i][j] == ".": if i == 0 and j == 0: s[i][j] = str([s[0][1],s[1][0],s[1][1]].count("#")) elif i == 0 and j == w-1: s[i][j] = str([s[i][j-1],s[i+1][j-1],s[i+1][j]].cou...
s043898018
p03574
u703823201
1600458704
Python
Python (3.8.2)
py
Runtime Error
32
9364
1967
H, W = map(int, input().split()) S = [] cnt = [[0 for _ in range(W)] for _ in range(H)] for h in range(H): s = list(input()) for w in range(W): if w == 0: cnt[h][w] += s[w+1] == "#" elif w == W-1: cnt[h][w] += s[w-1] == "#" else: cnt[h][w] += s[w+1] ==...
s065226912
p03574
u540762794
1600401966
Python
Python (3.8.2)
py
Runtime Error
29
9156
708
# -*- coding: utf-8 -*- def get_count(S, H, W, i, j): num = 0 start_i = start_j = -1 end_i = end_j = 2 if i == 0: start_i = 0 elif i == W-1: end_i = 1 if j == 0: start_j = 0 elif j == H-1: end_j = 1 for y in range(start_j, end_j, 1): for x in ran...
s371900440
p03574
u942675949
1600025353
Python
Python (3.8.2)
py
Runtime Error
40
9856
1989
import re import copy def accept_input(): H, W = map(int, input().split()) S = [] for _ in range(H): S.append(input()) return H,W,S def process(s): if s == "#": return 1 else: return 0 H,W,S = accept_input() new_S = copy.deepcopy(S) for i in range(H): for j in range...
s568443169
p03574
u942675949
1600025101
Python
Python (3.8.2)
py
Runtime Error
37
9848
1589
import re import copy def accept_input(): H, W = map(int, input().split()) S = [] for _ in range(H): S.append(input()) return H,W,S def process(s): if s == "#": return 1 else: return 0 new_S = copy.deepcopy(S) for i in range(H): for j in range(W): if S[i][j...
s381105186
p03574
u942675949
1600025050
Python
Python (3.8.2)
py
Runtime Error
32
9892
1563
import re import copy def accept_input(): H, W = map(int, input().split()) S = [] for _ in range(H): S.append(input()) return H,W,S def process(s): if s == "#": return 1 else: return 0 new_S = copy.deepcopy(S) for i in range(H): for j in range(W): if S[i][j...
s684594618
p03574
u306412379
1599359098
Python
Python (3.8.2)
py
Runtime Error
30
9324
1228
H, W = map(int, input().split()) S = [list(input()) for i in range(H)] for i in range(1,H-1): for j in range(1,W-1): if S[i][j] == '.': x = [S[i-1][j-1], S[i-1][j], S[i-1][j+1], S[i][j-1], S[i][j+1],S[i+1][j-1], S[i+1][j],S[i+1][j+1]] S[i][j] = x.count('#') for j in range(1,W-1): if S[0][j] == '.'...
s312833380
p03574
u999503965
1599337186
Python
Python (3.8.2)
py
Runtime Error
30
8924
371
h,w=map(int,input().split()) l=[list(input()) for i in range(h)] ans=[[0]*w for i in range(h)] for i in range(h): for j in range(w): if l[i][j]=="#": ans[i][j]=="#" else: for a in range(-1,2): for b in range(-1,2): if i+a<h and j+b<w ansl[i+a][j+b]=="#": ans[i][j]+=...
s238343584
p03574
u705418271
1599275586
Python
Python (3.8.2)
py
Runtime Error
24
9296
888
h,w = map(int,input().split()) l = [["."]*(w+2)] for i in range(h): l.append(["."] + [i for i in input()] + ["."]) l.append(["."]*(w+2)) def count(i,j): if l[i][j] == "#": return "#" c = 0 for n in range(i-1,i+2): for m in range(j-1,j+2): if l[n][m] == "#": ...
s465208563
p03574
u705418271
1599275382
Python
Python (3.8.2)
py
Runtime Error
26
9220
391
h,w=map(int,input().split()) l=[["."*(w+2)]] for i in range(h): l.append(["."]+[i for i in input()]+["."]) l.append(["."]*(w+2)) def count(i,j): if l[i][j]=="#": return "#" c=0 for n in range(i-1,i+2): for m in range(j-1,j+2): if l[n][m]=="#": c+=1 return str(c) ans=["".join([count(i,j...
s906950985
p03574
u440478998
1599211283
Python
Python (3.8.2)
py
Runtime Error
28
9376
1283
h,w = map(int, input().split()) s = [] for _ in range(h): s.append(list(input())) for i in range(len(s)): if i == 0: for j in range(w): if j == 0: s[i][j] = s[i][j].replace(".",str([s[i][j+1],s[i+1][j],s[i+1][j+1]].count("#"))) elif j == w-1: s[i][j] = s[i][j].replace(".",str([s[i][j-1],s[...
s030857017
p03574
u909224749
1599188169
Python
Python (3.8.2)
py
Runtime Error
27
9324
1063
H, W = map(int, input().split()) S = list(map(str, [input() for _ in range(H)])) for h in range(H): output = "" for w in range(W): if S[h][w] == "#": output += "#" else: count = 0 if w == 0: count += 1 if S[h][1]=="#" else 0 if h != 0: count += 1 if S[h-1]...
s988314360
p03574
u909224749
1599187475
Python
Python (3.8.2)
py
Runtime Error
31
9268
749
H, W = map(int, input().split()) S = list(map(str, [input() for _ in range(H)])) for h in range(H): output = "" for w in range(W): if S[h][w] == "#": output += "#" else: count = 0 if w == 0: count += 1 if S[h][1]=="#" else 0 if h != 0: count += 1 if S[h-1]...
s381111975
p03574
u909224749
1599187228
Python
Python (3.8.2)
py
Runtime Error
32
9240
662
H, W = map(int, input().split()) S = list(map(str, [input() for _ in range(H)])) for h in range(H): output = "" for w in range(W): if S[h][w] == "#": output += "#" else: count = 0 if w == 0: count += 1 if S[h][1]=="#" else 0 if h != 0: count += 1 if S[h-1][...
s889710268
p03574
u127157764
1598305685
Python
Python (3.8.2)
py
Runtime Error
24
9256
733
h,w = map(int,input().split()) masu = [[0 for i in range(w)] for j in range(h)] ans = [[0 for i in range(w)] for j in range(h)] for i in range(h): line = input() for j in range(w): masu[i][j] = line[j] for i in range(h): for j in range(w): if masu[i][j] == "#": ans[i-1][j-1] += ...
s044841616
p03574
u403385724
1597549523
Python
Python (3.8.2)
py
Runtime Error
28
9028
534
H, W = map(int,input().split(' ')) S = [] for i in range(H): S[i] = input() for j in range(H): cnt = 0 for k in range(W): if S[j][k] == '.' if S[j-1][k-1] == '#': cnt += 1 if S[j-1][k] == '#': cnt += 1 if S[j-1][k+1] == '#': cnt += 1 if S[j][k-1] == '#': ...
s660230667
p03574
u125348436
1597154503
Python
Python (3.8.2)
py
Runtime Error
30
9420
3581
h,w=map(int,input().split()) sl=[] for i in range(h): s=input() sl.append(s) ans=[[0]*w for i in range(h)] for i in range(h): for j in range(w): if sl[i][j]==".": if i==0: if j==0: if sl[0][1]=="#": ans[i][j]+=1 ...
s812567036
p03574
u694665829
1596765540
Python
Python (3.8.2)
py
Runtime Error
31
9168
524
h,w = map(int,input().split()) s = [] for i in range(h): s.append(list(input())) dx = [-1,0,1,-1,1,-1,0,1] dy = [1,1,1,0,0,-1,-1,-1] for i in range(h): for j in range(w): if s[i][j] == '#': continue cnt = 0 for t in range(8): ni=i+dx[t] nj=j+dy[t] ...
s059787465
p03574
u767797498
1596123571
Python
Python (3.8.2)
py
Runtime Error
24
8940
454
Y_DIR[-1,0,1] X_DIR[-1,0,1] def count_bomb(y,x): cnt=0 for yd in Y_DIR: yy=y+yd if not (0<=yy<h): continue for xd in X_DIR: xx=x+xd if not (0<=xx<w): continue if s[yy][xx]=="#": cnt+=1 return cnt h,w=map(int,input().split()) s=[] for i in range(h): s.append(i...
s712170650
p03574
u679089074
1596003621
Python
Python (3.8.2)
py
Runtime Error
29
9256
2452
#6 h,w = map(int,input().split()) s = [] ans = [[] for i in range(h)] for i in range(h): s.append(input()) cnt = 0 for i in range(h): for j in range(w): if s[i][j] !="#": if i == 0 : #上底のコーナーケース if j == 0 : for m in range(2): ...
s263846289
p03574
u679089074
1596003511
Python
Python (3.8.2)
py
Runtime Error
35
9284
2452
#6 h,w = map(int,input().split()) s = [] ans = [[] for i in range(h)] for i in range(h): s.append(input()) cnt = 0 for i in range(h): for j in range(w): if s[i][j] !="#": if i == 0 : #上底のコーナーケース if j == 0 : for m in range(2): ...
s602823703
p03574
u107639613
1595639499
Python
PyPy3 (7.3.0)
py
Runtime Error
81
74572
945
import sys def input(): return sys.stdin.readline().strip() def main(): H, W = map(int, input().split()) S = ['.' * W] + [input() for _ in range(H)] + ['.' * W] for i in range(1, H + 1): code = "" for j in range(W): if S[i][j] == '#': code += '#' ...
s595340441
p03574
u692690314
1595629307
Python
Python (3.8.2)
py
Runtime Error
30
9300
1969
H, W = map(int, input().split()) S = [input() for _ in range(H)] for i in range(H): S[i] = list(S[i]) for row in range(H): for col in range(W): if S[row][col] == '#': continue else: if row == 0: if col == 0: S[row][col] = str([S[row][c...
s349135954
p03574
u692690314
1595628783
Python
Python (3.8.2)
py
Runtime Error
29
9200
1919
H, W = map(int, input().split()) S = [input() for _ in range(H)] for i in range(H): S[i] = list(S[i]) for row in range(H): for col in range(W): if S[row][col] == '#': continue else: if row == 0: if col == 0: S[row][col] = [S[row][col+1...
s610643492
p03574
u113255362
1595476709
Python
Python (3.8.2)
py
Runtime Error
39
9244
700
import copy H,W=map(int,input().split()) List = [] for i in range (H): List.append(input()) resList = copy.deepcopy(List) def bombCheck(x,y,ListX): a = 0 b = 0 res = 0 if ListX[x][y] == "#": return "#" for i in range(-1,2,1): a = x+i if a<0 or a >= W: pass else: for j in range...
s118408201
p03574
u152614052
1595383572
Python
Python (3.8.2)
py
Runtime Error
35
9292
1284
h, w = map(int, input().split()) s = [list(input()) for _ in range(h)] ans = [[""]*w for _ in range(h)] for i in range(h): for j in range(w): if i == 0: if s[i][j] == ".": ans[i][j] = s[i][max(0, j - 1):min(w + 1, j + 2)].count("#") + s[i + 1][ ...
s879332354
p03574
u152614052
1595383080
Python
Python (3.8.2)
py
Runtime Error
24
9208
1278
h, w = map(int, input().split()) s = [list(input()) for _ in range(3)] ans = [[""]*w for _ in range(h)] for i in range(h): for j in range(w): if i == 0: if s[i][j] == ".": ans[i][j] = s[i][max(0, j - 1):min(w + 1, j + 2)].count("#") + s[i + 1][ ...
s204938861
p03574
u452337391
1594787769
Python
Python (3.8.2)
py
Runtime Error
34
9264
1530
H, W = map(int, input().split()) S = [input() for _ in range(H)] ans = [[0]*W for _ in range(H)] for i in range(H): for j in range(W): if S[i][j] == "#": ans[i][j] += 11 #横方向の確認 for i in range(H): for j in range(W - 1): if ans[i][j+1] > 10: ans[i][j] += 1 for j in ...
s772279123
p03574
u586639900
1594576220
Python
Python (3.8.2)
py
Runtime Error
24
9020
440
H, W = map(int, input().split()) S = [list(input()) for _ in range(H)] dydx = [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1), (1, -1), (1, 0), (1, 1)] def check(h, w): count = 0 for dy, dx in dydx: if 0 <= h + dy < H and 0 <= w + dx < W and S[h+dy][w+dx] == '#': count += 1 return count for h ...
s554037530
p03574
u357751375
1594145927
Python
Python (3.8.2)
py
Runtime Error
30
9308
3554
h,w = map(int,input().split()) s = [list(input()) for i in range(h)] for i in range(h): for j in range(w): if s[i][j] == '.': if i == 0 and j == 0: t = 0 if s[i][j+1] == '#': t += 1 if s[i+1][j] == '#': t +=...
s472090588
p03574
u728200259
1593972540
Python
Python (3.8.2)
py
Runtime Error
22
9252
1357
H, W = map(int, input().split()) M = [] for h in range(H): col = [] s = input() for w in range(W): if s[w] == '.': col.append(0) else: col.append(np.inf) M.append(col) for h in range(H): for w in range(W): flag_h0= True flag_hM = True ...
s731557076
p03574
u247066121
1593756031
Python
Python (3.8.2)
py
Runtime Error
28
9300
1443
H, W = map(int, input().split()) grid = [['']*W for i in range(H)] grid=['#####.','#.#.##','####.#','.#..#.','#.##..','#.#...'] s = list([['.']*W for i in range(H)]) for i in range(H): grid[i] = input() s[i] = list(grid[i]) for h in range(H): for w in range(W): count = 0 if s[h][w] != '#':...
s386386991
p03574
u188827677
1593619267
Python
Python (3.8.2)
py
Runtime Error
25
8980
447
h,w = map(int, input().split()) s = [list(input()) for _ in range(h)] ans = [[0]*w for _ in range(h)] for i in range(h): for j in range(w): if s[i][j] == "#": ans[i][j] = "#" for i2 in range(i-1, i+2): if i2 < 0 or h-1 < i2: continue for j2 in range(j-1, j+2): if (j2 < 0 or w-1 < ...
s199190162
p03574
u703556602
1592539312
Python
Python (3.8.2)
py
Runtime Error
26
9164
1079
H,W = map(int,input().split()) S = [list(input()) for i in range(H)] Rmin = 0 Rmax = 0 Cmin = 0 Cmax = 0 #行方向への探索 for r in range(H): #列方向への検索 for c in range(W): #爆弾の場合、周りを加算 if S[r][c] == ".": S[r][c] = 0 elif S[r][c] == "#": if r == 0 : Rmin = r...
s625483283
p03574
u703556602
1592538950
Python
Python (3.8.2)
py
Runtime Error
35
9272
1099
H,W = map(int,input().split()) S = [list(input()) for i in range(H)] Rmin = 0 Rmax = 0 Cmin = 0 Cmax = 0 #行方向への探索 for r in range(H): #列方向への検索 for c in range(W): #爆弾の場合、周りを加算 if S[r][c] == ".": S[r][c] = 0 elif S[r][c] == "#": if r == 0 : Rmin = r...
s888949057
p03574
u703556602
1592538879
Python
Python (3.8.2)
py
Runtime Error
41
9216
1097
H,W = map(int,input().split()) S = [list(input()) for i in range(H)] Rmin = 0 Rmax = 0 Cmin = 0 Cmax = 0 #行方向への探索 for r in range(H): #列方向への検索 for c in range(W): #爆弾の場合、周りを加算 if S[r][c] == ".": S[r][c] = 0 elif S[r][c] == "#": if r == 0 : Rmin = r...
s438381462
p03574
u810787773
1592147850
Python
Python (3.4.3)
py
Runtime Error
29
3188
356
h,w=map(int,input().split()) s=[list(input()) for i in range(h)] for y in range(h): for x in range(w): if s[y][x]=='.': cnt=0 for dy,dx in [[0,1],[0,-1],[1,0],[-1,0],[1,1],[-1,1],[1,-1],[-1,-1]]: ny=y+dy nx=x+dx if 0<=ny<h and 0<=nx<w and s[ny][nx]=='#': cnt+=1 ...
s069868402
p03574
u957957759
1591931644
Python
Python (3.4.3)
py
Runtime Error
18
3064
972
# 入力 H,W=map(int,input().split()) l=[] for i in range(H): l.append(list(input())) for i in range(H): for j in range(W): # 地雷数のカウンタ c=0 # '#'の場合はなにもしない if l[i][j]=='#': pass # '#'以外の場合 else: # 左上 if 0<i and 0<j and l[i-1][j-1]=='#': c+=1 # 上...
s778436668
p03574
u957957759
1591910682
Python
Python (3.4.3)
py
Runtime Error
17
2940
920
# 入力 H,W=map(int,input().split()) l=[] for i in range(H): l.append(list(input())) for i in range(H): for j in range(W): # 地雷数のカウンタ c=0 # '#'の場合はなにもしない if l[i][j]=='#': pass # '#'以外の場合 else: # 左上 if 0<i and 0<j and l[i-1][j-1]=='#': c+=1 # 上 if ...
s278973889
p03574
u199356004
1591577998
Python
Python (3.4.3)
py
Runtime Error
29
3652
2782
H,W=[int(i) for i in input().split(" ")] S=[input() for i in range(H)] for k,v in enumerate(S): for kk,vv in enumerate(list(v)): checkTarget = [] if vv == "#": print("#", end="" ) else: if k == 0 and kk == 0: checkTarget = [ ...
s951197948
p03574
u199356004
1591577820
Python
Python (3.4.3)
py
Runtime Error
29
3680
2465
H,W=[int(i) for i in input().split(" ")] S=[input() for i in range(H)] for k,v in enumerate(S): for kk,vv in enumerate(list(v)): checkTarget = [] if vv == "#": print("#", end="" ) else: if k == 0 and kk == 0: checkTarget = [ ...
s515543893
p03574
u199356004
1591577148
Python
Python (3.4.3)
py
Runtime Error
28
3700
2159
H,W=[int(i) for i in input().split(" ")] S=[input() for i in range(H)] for k,v in enumerate(S): for kk,vv in enumerate(list(v)): checkTarget = [] if vv == "#": print("#", end="" ) else: if k == 0 and kk == 0: checkTarget = [ ...
s836130727
p03574
u286754585
1591477605
Python
Python (3.4.3)
py
Runtime Error
19
3064
673
h,w=map(int,input().split()) ans=[[0]*w for i in range(h)] s=[[""]*w for i in range(h)] for i in range(h): s[i]=input() for j in range(w): if (s[i][j]=="#"): ans[i][j]="#" if (i-1>=0 and j-1>=0): ans[i-1][j-1]+=1 if (i-1>=0): ans[i-1][j]+=1 if (i-1>=0 and j+1<w): ...
s016684237
p03574
u945046250
1591332007
Python
Python (3.4.3)
py
Runtime Error
36
3064
644
h, w = map(int, input().split()) s = [input() for i in range(h)] def checkMine(c): if c == "#": return 1 return 0 def dfs(x, y): nummines = 0 for i in range(-1, 2): for j in range(-1, 2): nx, ny = x + j, y + i if not (nx == x and nx == y): if (...
s120293746
p03574
u945046250
1591331123
Python
Python (3.4.3)
py
Runtime Error
33
3444
700
h, w = map(int, input().split()) s = [] for i in range(h): s += input() def checkMine(c): if c == "#": return 1 return 0 def dfs(x, y): nummines = 0 for i in range(-1, 2): for j in range(-1, 2): nx, ny = x + j, y + i if not (nx == x and nx == y): ...
s219399042
p03574
u730769327
1591260007
Python
PyPy3 (2.4.0)
py
Runtime Error
165
38256
409
h,w=map(int,input().split()) f=[] f.append("."*(w+2)) for i in range(h): f.append("."+input()+".") a=[]*h[]*w for i in range(1,h+1): for j in range(1,w+1): if f[i][j]=".": dumy=f[i-1][j-1]+f[i-1][j]+f[i-1][j+1]+f[i][j-1]+f[i][j]+f[i][j+1]+f[i+1][j-1]+f[i+1][j]+f[i+1][j+1] a[i-1][j-1]=count(dumy.inde...
s375534874
p03574
u767664985
1591098519
Python
Python (3.4.3)
py
Runtime Error
25
3188
708
H, W = map(int, input().split()) S = [input() for _ in range(H)] ans = [[0 for _ in range(W)] for _ in range(H)] for i in range(H): for j in range(W): if S[i][j] == "#": ans[i][j] = "#" else: if 0 < i and i < H-1: li = [i-1, i, i+1] elif i == 0: ...
s498691477
p03574
u958506960
1590806708
Python
Python (3.4.3)
py
Runtime Error
160
14436
469
# numpyを使用した場合 import numpy as np h, w = map(int, input().split()) s = [list(input()) for _ in range(h)] f = np.zeros((h+2, w+1), dtype='int64') d = np.ones((3, 3), dtype='int64') for i in range(h): for j in range(w): if s[i][j] == '#': f[i:i+3, j:j+3] += d for i in range(h): ans = '' ...
s732130678
p03574
u496687522
1590799846
Python
Python (3.4.3)
py
Runtime Error
22
3192
1575
H, W = map(int, input().split()) S = [list(input()) for _ in range(H)] for i in range(H): for j in range(W): count = 0 if i == 0 and H != 1: if j == 0: count = [S[i][j+1], S[i+1][j], S[i+1][j+1]].count('#') elif j == W - 1: count = [S...
s515130122
p03574
u496687522
1590799390
Python
Python (3.4.3)
py
Runtime Error
22
3192
1310
H, W = map(int, input().split()) S = [list(input()) for _ in range(H)] for i in range(H): for j in range(W): count = 0 if i == 0: if j == 0: count = [S[i][j+1], S[i+1][j], S[i+1][j+1]].count('#') elif j == W - 1: count = [S[i][j-1], S...
s505931506
p03574
u457952071
1590357895
Python
Python (3.4.3)
py
Runtime Error
24
3680
2247
def incre(a, i, j): if a[i][j] != '#': a[i][j] += 1 h, w = map(int, input().split()) s = [list(input()) for i in range(h)] a = [[0]*w for _ in range(h)] for i in range(h): for j in range(w): if s[i][j] == '#': a[i][j] = '#' for i in range(h): for j in range(w): if (s...
s935742512
p03574
u154059173
1590355349
Python
Python (3.4.3)
py
Runtime Error
28
3512
2928
import sys import collections size = sys.stdin.readline().split(' ') S = int(size[0]) H = int(size[1]) data = sys.stdin.readlines() for i in range(len(data)): data[i] = [j.replace('\n','') for j in data[i]] if S == 1 and H == 1: if data[0][0] == ".": data[0][0] = "0" elif S == 1 and H > 1: for j in range(H): ...
s674376872
p03574
u658113376
1590277401
Python
Python (3.4.3)
py
Runtime Error
17
3064
1851
import sys def check(newLine, index, row, col): count = 0 # 左と右 if index % col != 0:# 0列でない if newLine[index - 1] == "#": count += 1 if index % col != col - 1:# 末列でない if newLine[index + 1] == "#": count += 1 # 上と下 if index > col: #首行でない if newLi...
s626578896
p03574
u658113376
1590276333
Python
Python (3.4.3)
py
Runtime Error
18
3064
1858
import sys def check(newLine, index, row, col): count = 0 # 左と右 if index % col != 0:# 0列でない if newLine[index - 1] == "#": count += 1 if index % col != col - 1:# 末列でない if newLine[index + 1] == "#": count += 1 # 上と下 if index >= col: #首行でない if newL...
s899745320
p03574
u658113376
1590273907
Python
Python (3.4.3)
py
Runtime Error
17
3192
1708
import sys def check(newLine, index, row, col): count = 0 # 左と右 if index % col != 0: if newLine[index - 1] == "#": count += 1 if index % col != col - 1: if newLine[index + 1] == "#": count += 1 # 上と下 if index > col: if newLine[index - col] == "#"...
s333998429
p03574
u658113376
1590273553
Python
Python (3.4.3)
py
Runtime Error
18
3064
1829
import sys def check(newLine, index, row, col): count = 0 # 左と右 if index % col != 0: if newLine[index - 1] == "#": count += 1 if index % col != col - 1: if newLine[index + 1] == "#": count += 1 # 上と下 if index > col: if newLine[index - col] == "#"...
s923650886
p03574
u658113376
1590273490
Python
Python (3.4.3)
py
Runtime Error
18
3064
1828
import sys def check(newLine, index, row, col): count = 0 # 左と右 if index % col != 0: if newLine[index - 1] == "#": count += 1 if index % col != col - 1: if newLine[index + 1] == "#": count += 1 # 上と下 if index > col: if newLine[index - col] == "#"...
s430400693
p03574
u658113376
1590273386
Python
Python (3.4.3)
py
Runtime Error
18
3064
1764
import sys def check(newLine, index, row, col): count = 0 # 左と右 if index % col != 0: if newLine[index - 1] == "#": count += 1 if index % col != col - 1: if newLine[index + 1] == "#": count += 1 # 上と下 if index > col: if newLine[index - col] == "#"...
s827180795
p03574
u658113376
1590272873
Python
Python (3.4.3)
py
Runtime Error
18
3064
1662
import sys def check(newLine, index, row, col): count = 0 if index % col != 0: if newLine[index - 1] == "#": count += 1 if index % col != col - 1: if newLine[index + 1] == "#": count += 1 if index > col: if newLine[index - col] == "#": coun...
s445087154
p03574
u658113376
1590272796
Python
Python (3.4.3)
py
Runtime Error
18
3064
1749
import sys def check(newLine, index, row, col): count = 0 if index % col != 0: if newLine[index - 1] == "#": count += 1 if index % col != col - 1: if newLine[index + 1] == "#": count += 1 if index > col: if newLine[index - col] == "#": coun...
s976002231
p03574
u658113376
1590271346
Python
Python (3.4.3)
py
Runtime Error
18
3064
1730
import sys def check(newLine, index, value, col): count = 0 if 0 <= index - 1 < len(newLine) and index % col > 0: if newLine[index - 1] == "#": count += 1 if 0 <= index + 1 < len(newLine) and index % col < col - 1: if newLine[index + 1] == "#": count += 1 if 0 ...
s927927734
p03574
u658113376
1590270526
Python
Python (3.4.3)
py
Runtime Error
19
3064
1718
import sys def check(newLine, index, value, col): count = 0 if 0 <= index - 1 < len(newLine) and index % col >= 0: if newLine[index - 1] == "#": count += 1 if 0 <= index + 1 < len(newLine) and index % col <= 5: if newLine[index + 1] == "#": count += 1 if 0 <= i...
s498616947
p03574
u658113376
1590270161
Python
Python (3.4.3)
py
Runtime Error
18
3064
1673
import sys def check(newLine, index, value, row, col): count = 0 if 0 <= index - 1 < len(newLine) and index % row > 0: if newLine[index - 1] == "#": count += 1 if 0 <= index + 1 < len(newLine) and index % row < 5: if newLine[index + 1] == "#": count += 1 if 0 <...
s112676875
p03574
u658113376
1590269912
Python
Python (3.4.3)
py
Runtime Error
18
3064
1545
import sys def check(newLine, index, value, row, col): count = 0 if 0 <= index - 1 < len(newLine) and index % row > 0: if newLine[index - 1] == "#": count += 1 if 0 <= index + 1 < len(newLine) and index % row < 5: if newLine[index + 1] == "#": count += 1 if 0 <...
s742964937
p03574
u658113376
1590269794
Python
Python (3.4.3)
py
Runtime Error
25
3188
1545
import sys def check(newLine, index, value, row, col): count = 0 if 0 <= index - 1 < len(newLine) and index % row > 0: if newLine[index - 1] == "#": count += 1 if 0 <= index + 1 < len(newLine) and index % row < 5: if newLine[index + 1] == "#": count += 1 if 0 <...
s901605427
p03574
u511457539
1590248053
Python
Python (3.4.3)
py
Runtime Error
21
3448
3030
H, W = map(int, input().split()) S = list(str(input()) for i in range(H)) Answer = [["#"]*W for i in range(H)] if S[0][0] == ".": count = 0 if S[0][1] == "#": count += 1 if S[1][0] == "#": count += 1 if S[1][1] == "#": count += 1 Answer[0][0] = count if S[0][W-1] == ".": ...
s433445349
p03574
u520276780
1589851003
Python
PyPy3 (2.4.0)
py
Runtime Error
180
38640
490
import numpy as np h,w=map(int, input().split( )) s=[input() for _ in range(h)] a = [-1,0,1] b=[-1,0,1] n=[(i,j) for i in a for j in b] #print(n) ans=[["#"]*w for _ in range(h)] for i in range(h): for j in range(w): tmp=0 if s[i][j]=="#": continue for x,y in n: if 0<...
s290515827
p03574
u236536206
1589836143
Python
Python (3.4.3)
py
Runtime Error
26
3672
5021
h,w=map(int,input().split()) s = [list(input()) for _ in range(h)] #print(s) l=[] if h==1: for i in range(w): if s[h-1][i]!="#": if i==0: l.append(s[h-1][i+1]) s[h-1][i]=l.count("#") l=[] elif i==w-1: l.append(s[h-1][i-1...
s519920705
p03574
u236536206
1589834911
Python
Python (3.4.3)
py
Runtime Error
27
3624
2653
h,w=map(int,input().split()) s = [list(input()) for _ in range(h)] #print(s) l=[] for i in range(h): for j in range(w): if s[i][j]!="#": if 1<=j<=w-2: if i==0: l.append(s[i][j-1]) l.append(s[i][j+1]) l.append(s[i+1][j-...
s448242927
p03574
u236536206
1589831806
Python
Python (3.4.3)
py
Runtime Error
26
3624
2653
h,w=map(int,input().split()) s = [list(input()) for _ in range(h)] #print(s) l=[] for i in range(h): for j in range(w): if s[i][j]!="#": if 1<=j<=w-2: if i==1: l.append(s[i][j-1]) l.append(s[i][j+1]) l.append(s[i+1][j-...
s809916166
p03574
u236536206
1589831713
Python
Python (3.4.3)
py
Runtime Error
24
3320
2578
h,w=map(int,input().split()) s = [list(input()) for _ in range(h)] #print(s) l=[] for i in range(h): for j in range(w): if s[i][j]!="#": if 1<=j<=w-2: if i==1: l.append(s[i][j-1]) l.append(s[i][j+1]) l.append(s[i+1][j-...
s524795886
p03574
u623677535
1589806521
Python
Python (3.4.3)
py
Runtime Error
17
3064
634
h, w = [int(word) for word in input().split()] s = [["."]*(w+2)] for i in range(1, h+1): row = [v for v in input().split()] row.insert(0, ".") row.append(".") s.append(row) s.append(["."]*(w+2)) result = s for r in range(1, h+1): for c in range(1, w+1): if s[r][c] == "#": re...
s406089464
p03574
u623677535
1589806371
Python
Python (3.4.3)
py
Runtime Error
18
3064
643
h, w = [int(word) for word in input().split()] s = [["."]*(w+2)] for i in range(1, h+1): row = [v for v in input().split()] row.insert(0, ".") row.append(".") s.append(row) s.append(["."]*(w+2)) result = s print(s) for r in range(1, h+1): for c in range(1, w+1): if s[r][c] == "#": ...
s219517570
p03574
u623677535
1589802261
Python
Python (3.4.3)
py
Runtime Error
18
3064
621
h, w = [int(word) for word in input().split()] s = [["."]*(w+2)] for i in range(1, h+1): row = [v for v in input().split()] row.insert(0, ".") row.append(".") s.append(row) s.append(["."]*(w+2)) result = s for r in range(1, h+1): for c in range(1, w+1): if s[r][c] == "#": re...
s211215550
p03574
u623677535
1589757888
Python
Python (3.4.3)
py
Runtime Error
18
3064
620
h, w = [int(word) for word in input().split()] s = [["."]*(w+2)] for i in range(1, h+1): row = [v for v in input().split()] row.insert(0, ".") row.append(".") s.append(row) s.append(["."]*(w+2)) result = s for r in range(1, h+1): for c in range(1, w+1): if s[r][c] == "#": re...
s633973931
p03574
u860002137
1589651120
Python
Python (3.4.3)
py
Runtime Error
18
3064
805
# 読み込み H, W = map(int, input().split()) S = [] for i in range(H): S.append(list(map(str, input().rstrip()))) # 外枠を「.」で囲う準備 li = [] for i in range(H+2): li.append(["."]*(W+2)) # 外枠付きSの生成 for i in range(1, H+1): li[i][1:-1] = S[i-1] # カウント用配列の準備 ans = [] for i in range(H+2): ans.append([0]*(W+2)) ans =...
s853696246
p03574
u860002137
1589649466
Python
Python (3.4.3)
py
Runtime Error
149
12416
554
H, W = map(int, input().split()) li = [] for i in range(H+2): li.append(["."]*(W+2)) for h in range(H): for w in range(W): li[h+1][w+1] = input() S = [i[1:-1] for i in li][1:-1] import numpy as np ans = np.zeros([H+2, W+2], dtype=int) for h in range(1, H): for w in range(1, W): if li[h]...
s379292115
p03574
u860002137
1589649439
Python
Python (3.4.3)
py
Runtime Error
152
12432
558
H, W = map(int, input().split()) li = [] for i in range(H+2): li.append(["."]*(W+2)) for h in range(H): for w in range(W): li[h+1][w+1] = input() S = [i[1:-1] for i in li][1:-1] import numpy as np ans = np.zeros([H+2, W+2], dtype=int) for h in range(1, H+1): for w in range(1, W+1): if l...
s981452491
p03574
u860002137
1589649181
Python
Python (3.4.3)
py
Runtime Error
280
18008
558
H, W = map(int, input().split()) li = [] for i in range(H+2): li.append(["."]*(W+2)) for h in range(H): for w in range(W): li[h+1][w+1] = input() S = [i[1:-1] for i in li][1:-1] import numpy as np ans = np.zeros([H+2, W+2], dtype=int) for h in range(1, H+1): for w in range(1, W+1): if l...
s061139112
p03574
u738622346
1589642541
Python
Python (3.4.3)
py
Runtime Error
19
3064
656
def replace(s, r, c): for row in range(r - 1, r + 2): for column in range(c - 1, c + 2): value = s[row][column] if value != "#": value = value + 1 if value != "." else 1 s[row][column] = value h, w = map(int, input().split(" ")) s = [] for _ in range(...
s155735452
p03574
u738622346
1589642503
Python
Python (3.4.3)
py
Runtime Error
18
3064
394
h, w = map(int, input().split(" ")) s = [] for _ in range(h): row = input() tmp = [] for i in range(w): tmp.append(row[i]) s.append(tmp) for row in range(h): for column in range(w): if s[row][column] == "#": replace(s, row, column) for row in range(h): res = "" ...
s873308150
p03574
u134019875
1589548171
Python
Python (3.4.3)
py
Runtime Error
23
3444
544
h, w = map(int, input().split()) s = [list(input()) for _ in range(h)] for i in range(h): for j in range(w): if s[i][j] == '.': l = max(0, j - 1) r = min(j + 2, w) if i == 0: s[i][j] = s[i][l:r].count('#') + s[i + 1][l:r].count('#') elif i == h...
s157513034
p03574
u134019875
1589547130
Python
Python (3.4.3)
py
Runtime Error
23
3444
596
h, w = map(int, input().split()) s = [list(input()) for _ in range(h)] for i in range(h): for j in range(w): if s[i][j] == '.': if i == 0: s[i][j] = s[i][max(0, j - 1):j + 2].count('#') + s[i + 1][max(0, j - 1):j + 2].count('#') elif i == h - 1: s[i][j...
s752591184
p03574
u188226132
1589352874
Python
Python (3.4.3)
py
Runtime Error
23
3320
3265
h,w=map(int,input().split()) s=[] for _ in range(h): s.append(list(input())) for i in range(h): for j in range(w): count=0 if s[i][j]==".": if ((i==0)&(j==0))|((i==0)&(j==w-1))|((i==h-1)&(j==0))|((i==h-1)&(j==w-1)): if (i==0)&(j==0): if s[1][0]=="...
s422908031
p03574
u998741086
1589093420
Python
Python (3.4.3)
py
Runtime Error
24
3608
2706
#!/usr/bin/env python3 # input h, w = map(int, input().split()) s = [input() for _ in range(h)] def sweep(i, j, s): global h; global w ans = 0 # inner if 0 < i < h-1: if 0 < j < w-1: sweeps = [s[i][j+1], s[i+1][j+1], s[i+1][j], s[i+1][j-1], s[i][j-1], s[i-1][j-1], s[i-1][j], s[i-1]...
s161780430
p03574
u998741086
1589085921
Python
Python (3.4.3)
py
Runtime Error
23
3276
2162
#!/usr/bin/env python3 # input h, w = map(int, input().split()) s = [input() for _ in range(h)] def sweep(i, j, s): global h; global w ans = 0 # inner if 0 < i < h-1: if 0 < j < w-1: sweeps = [s[i][j+1], s[i+1][j+1], s[i+1][j], s[i+1][j-1], s[i][j-1], s[i-1][j-1], s[i-1][j], s[i-1][...