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
s219938794
p03999
u136869985
1519787146
Python
Python (3.4.3)
py
Runtime Error
19
3064
318
def main(): s = input() ans = 0 for i in range((len(s) - 1) ** 2): tmp = "" for j in range(len(s)): tmp += s[j] if (i >> j) & 1: tmp += "+" else: ans += eval(tmp) else: print(ans) if __name__ == "__main__": main()
Traceback (most recent call last): File "/tmp/tmpqids0cxh/tmp3ekpvieb.py", line 16, in <module> main() File "/tmp/tmpqids0cxh/tmp3ekpvieb.py", line 2, in main s = input() ^^^^^^^ EOFError: EOF when reading a line
s032579108
p03999
u143492911
1519710774
Python
Python (3.4.3)
py
Runtime Error
18
3060
332
def main(): s=input() n=len(s) sum=0 for i in range(1<<(n-1)): ans=0 t="" for j in range(n-1): if 1&j<<i: t+=s[ans:j+1] ans+=j+1 t+="+" t+=s[ans:] sum+=eval(t) print(sum) if __name__ =="__main__": ...
Traceback (most recent call last): File "/tmp/tmpx2gszo8q/tmpgbksdow_.py", line 17, in <module> main() File "/tmp/tmpx2gszo8q/tmpgbksdow_.py", line 2, in main s=input() ^^^^^^^ EOFError: EOF when reading a line
s416696513
p03999
u143492911
1519603144
Python
Python (3.4.3)
py
Runtime Error
18
3060
258
from itertools import combinations s=input() ans=0 for i in range(len(s)): for j in combinations(range(1,len(s)),i): c=0 s_i=s for k in j: s_i=s_i[:k+c]+"+"+s_i[j+c:] c+=1 ans+=eval(s_i) print(ans)
Traceback (most recent call last): File "/tmp/tmpqpcq6br2/tmp82yeqm5l.py", line 2, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s726300865
p03999
u143492911
1518067187
Python
Python (3.4.3)
py
Runtime Error
18
3064
195
from itertools import product s=input() ans=0 t=["","+"] for i in product(range(2),repeat=len(s)-1): v=s[0] for j in range(1,len(s)): v+=t[i[j-1]+s[j]] ans+=eval(v) print(ans)
Traceback (most recent call last): File "/tmp/tmppnk_uzad/tmpsvmuwj9g.py", line 2, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s970636747
p03999
u816631826
1516738285
Python
Python (2.7.6)
py
Runtime Error
11
2568
90
s,g=raw_input(),0 for i in range(len(s)) p=int(s[:i]) q=int(s[i+1:) r=p+q g+=r print g
File "/tmp/tmpyqk1lhwa/tmp01cubb5s.py", line 4 q=int(s[i+1:) ^ SyntaxError: closing parenthesis ')' does not match opening parenthesis '['
s384866323
p03999
u402953845
1480092882
Python
Python (2.7.6)
py
Runtime Error
19
2696
758
s = map(int, list(raw_input())) sum = 0 for i in xrange(0, int(1 << len(s)-1)): temp_num = 0 for j in xrange(0, len(s)): cur_num = s[j] if i % 2 == 1: temp_num += cur_num if j != len(s) - 1: sum += temp_num temp_num = 0 else: ...
File "/tmp/tmp0k3l0ue3/tmp7li1fyz_.py", line 19 print sum ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s829330952
p03999
u596276291
1476133592
Python
Python (3.4.3)
py
Runtime Error
33
3188
697
# all_split("abc") -> [['abc'], ['ab', 'c'], ['a', 'bc'], ['a', 'b', 'c']] def all_split(s): ans = [] for i in range(2 ** (len(s) - 1)): b = list(map(int, format(i, "0" + str(len(s) - 1) + "b"))) ans.append(split(s, b)) return ans def split(s, split_positions): assert len(s) - 1 == l...
Traceback (most recent call last): File "/tmp/tmp133yt5zn/tmp80qcrdlt.py", line 35, in <module> main() File "/tmp/tmp133yt5zn/tmp80qcrdlt.py", line 27, in main s = input() ^^^^^^^ EOFError: EOF when reading a line
s880579555
p03999
u845995447
1475765524
Python
Python (3.4.3)
py
Runtime Error
26
3064
655
def SumIndicatedPoint(pcandid): point = list(str(pcandid)) conNum = nums[0] count = 1 sum = 0 for p in point: if p == '0': conNum = conNum + nums[count] elif p == '1': sum = sum + int(conNum) conNum = nums[count] count = count + 1 sum = sum + int(conNum) #print(str(sum)) return sum if __name__...
Traceback (most recent call last): File "/tmp/tmpw1tz4j6u/tmpsci3s7m8.py", line 18, in <module> nums = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s094430283
p03999
u392294962
1473739187
Python
Python (3.4.3)
py
Runtime Error
71
3444
480
import ast def pattern(li, el, space, acc, xs): if len(li) != 1: acc.append(el) acc.append(space) al = li.pop(0) pattern(list(li), al, '+', list(acc), xs) pattern(list(li), al, '', list(acc), xs) else: acc.append(el) acc.append(space) al = li.pop(0) acc.append(al) xs.append(...
Traceback (most recent call last): File "/tmp/tmp_kus5ii3/tmpo2npl4u6.py", line 17, in <module> li = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s998297170
p03999
u191667127
1473648006
Python
Python (3.4.3)
py
Runtime Error
39
3064
670
from math import factorial total = 0 def cs(k): t = 0 for i in range(1,k+1): t += factorial(k)/(factorial(i)*factorial(k-i)) return t def combine(l): t = 0 if l == []: return 0 for i in range(0,len(l)): sub1 = [] sub2 = [] for j in range(0,i): ...
Traceback (most recent call last): File "/tmp/tmpa7luzyw7/tmp_1fsouu4.py", line 29, in <module> inpt = input() ^^^^^^^ EOFError: EOF when reading a line
s574183445
p03999
u235516118
1473647961
Python
Python (3.4.3)
py
Runtime Error
39
3064
230
S = input() ans = 0 for i in range(2 ** len(S-1)): tmp = [] count = 1 while(count != len(S)-1): if(i % 2 == 1): tmp.append(S[:count]) count += 1 ans += sum(tmp) print(ans)
Traceback (most recent call last): File "/tmp/tmprzviees6/tmpwkw_c3pp.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s639190716
p03999
u566924053
1473645221
Python
Python (3.4.3)
py
Runtime Error
44
3064
400
# coding: utf-8 S = input() cnt = 0 ls = [] for i in range(2**(len(S)-1)): #print(str(bin(i))[2:].zfill(len(S)-1)) bi = list(str(bin(i))[2:].zfill(len(S)-1)) ls.append(bi) for item in ls: s = S[0] for inx, bi in enumerate(item): if bi == "0": pass else: s = ...
Traceback (most recent call last): File "/tmp/tmpww63sci5/tmpy6746k3f.py", line 3, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s338503459
p03999
u866746776
1473642867
Python
Python (3.4.3)
py
Runtime Error
40
3064
203
def sovle(s): if len(s) == 0: return 0 l = len(s) ans = 0 for i in range(1, l+1): left = s[:i] right = s[i:] ans += int(left) + solve(right) return ans s = input().strip() print(solve(s))
Traceback (most recent call last): File "/tmp/tmp7mlrbxke/tmpsy5m5inx.py", line 12, in <module> s = input().strip() ^^^^^^^ EOFError: EOF when reading a line
s822146559
p04000
u825685913
1600807948
Python
Python (3.8.2)
py
Runtime Error
3388
3507008
421
h, w, n = map(int,input().split()) cell = [[0]*w for _ in range(h)] for _ in range(n): a, b = map(int,input().split()) for i in range(3): for j in range(3): if a-i>=0 and b-j>=0: cell[a-i-1][b-j-1] += 1 else: continue ans = [0]*10 for i in range(...
Traceback (most recent call last): File "/tmp/tmpasjuug9n/tmp2zhvfxge.py", line 1, in <module> h, w, n = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s962805240
p04000
u825685913
1600806208
Python
Python (3.8.2)
py
Runtime Error
3385
3506508
400
h, w, n = map(int,input().split()) cell = [[0]*w for _ in range(h)] for _ in range(n): a, b = map(int,input().split()) cell[a-1][b-1] = 1 ans = [0]*10 for i in range(h-2): for j in range(w-2): s = [cell[i][j],cell[i+1][j],cell[i+2][j],cell[i][j+1],cell[i+1][j+1],cell[i+2][j+1],cell[i][j+2],cell[i+...
Traceback (most recent call last): File "/tmp/tmpiw5aevxe/tmpbry4p3e3.py", line 1, in <module> h, w, n = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s963188086
p04000
u231685196
1599502958
Python
PyPy3 (7.3.0)
py
Runtime Error
99
74704
1976
import numpy as np from collections import Counter h,w,n = map(int,input().split()) d = {} for i in range(n): a,b = map(int,input().split()) a,b = a-1,b-1 am1_f = a-1 > 0 ap1_f = a+1 < h-1 bm1_f = b-1 > 0 bp1_f = b+1 < w-1 a_f = a > 0 and a < h-1 b_f = b > 0 and b < w-1 am1 = a-1 ...
Traceback (most recent call last): File "/tmp/tmpkpihc6e4/tmpwtuu01xu.py", line 4, in <module> h,w,n = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s860876073
p04000
u074220993
1599112736
Python
Python (3.8.2)
py
Runtime Error
3385
3513980
626
H, W, N = map(int, input().split()) Grid = [[0]*(W-2) for _ in range(H-2)] #3*3正方形を左上のマスで区別。値は正方形内の黒塗りの個数 Ans = [(H-2)*(W-2) if i == 0 else 0 for i in range(10)] f = lambda x:int(x)-1 Draw = lambda x,y:[(x-i,y-j) for i in range(3) for j in range(3) if 0<=x-i<H-2 and 0<=y-j<W-2] #塗りつぶしたマスを含む正方形の座標のリストを返す関数 for _ in ran...
Traceback (most recent call last): File "/tmp/tmpap498m0z/tmpbf9tta0z.py", line 1, in <module> H, W, N = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s923800784
p04000
u406138190
1597170565
Python
Python (3.8.2)
py
Runtime Error
3309
35868
443
import numpy as np h,w,n=map(int,input().split()) board=np.zeros((h,w)) for i in range(n): a,b=map(int,input().split()) board[a-1][b-1]=1 result=[0]*10 for i in range(1,h-1): for j in range(1,w-1): tmp=0 tmp=board[i][j]+board[i-1][j]+board[i+1][j]+board[i][j-1]+board[i+1][j-1]+board[i-1][j-1...
Traceback (most recent call last): File "/tmp/tmps1zq3llh/tmp8zxgryel.py", line 2, in <module> h,w,n=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s376147743
p04000
u798316285
1594696618
Python
Python (3.8.2)
py
Runtime Error
1334
128716
499
h,w,n=map(int,input().split()) D=dict() for i in range(n): a,b=map(int,input().split()) for p in range(-1,2): for q in range(-1,2): aa=a+p bb=b+q if 2<=aa<=h-1 and 2<=bb<=w-1: aabb=str(aa)+str(bb) if aabb in D: D[aab...
Traceback (most recent call last): File "/tmp/tmp4xn8qtau/tmpa1whmnyf.py", line 1, in <module> h,w,n=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s741750649
p04000
u883866798
1591049791
Python
Python (3.4.3)
py
Runtime Error
3203
789144
375
x, y, n = map(int, input().split()) box = [[0 for _ in range(y)] for _ in range(x)] for _ in range(n): a, b = map(int, input().split()) box[a - 1][b - 1] = 1 table = [0] * 9 for i in range(x - 2): for j in range(y - 2): total = sum(box[i][j:j + 3]) + sum(box[i + 1][j:j + 3]) + sum(box[i + 2][j:j + 3...
Traceback (most recent call last): File "/tmp/tmpasxlz4_q/tmpnehm_rio.py", line 1, in <module> x, y, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s682845690
p04000
u888100977
1590860254
Python
Python (3.4.3)
py
Runtime Error
2374
166924
628
h, w, n = map(int, input().split()) from collections import defaultdict d = defaultdict(int) surround = [(0, 0), (1,1), (1, 0), (1, -1), (0, -1), (-1, -1), (-1, 0), (-1, 1), (0, 1)] for _ in range(n): x, y = map(int, input().split()) x -= 1 y -= 1 for i in surround: if x + i[0] >= w or x + i[0]...
Traceback (most recent call last): File "/tmp/tmp1g_wmevo/tmp963bap9d.py", line 1, in <module> h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s516718863
p04000
u888100977
1590860238
Python
PyPy3 (2.4.0)
py
Runtime Error
1384
153076
628
h, w, n = map(int, input().split()) from collections import defaultdict d = defaultdict(int) surround = [(0, 0), (1,1), (1, 0), (1, -1), (0, -1), (-1, -1), (-1, 0), (-1, 1), (0, 1)] for _ in range(n): x, y = map(int, input().split()) x -= 1 y -= 1 for i in surround: if x + i[0] >= w or x + i[0]...
Traceback (most recent call last): File "/tmp/tmpfcqlnxa9/tmp0uislibh.py", line 1, in <module> h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s578938842
p04000
u443736699
1590522718
Python
Python (3.4.3)
py
Runtime Error
3160
24112
339
h,w,n = input().split() h,w,n = int(h), int(w), int(n) import numpy as np masu = np.zeros((h,w)) for i in range(n): x,y = input().split() x,y = int(x)-1, int(y)-1 masu[x][y] = 1 count = [0] * 10 for i in range(h-2): for j in range(w-2): shiro = np.sum(masu[i:i+3,j:j+3]) count[int(shiro)] += 1 prin...
Traceback (most recent call last): File "/tmp/tmpped966ah/tmpfwrww5iq.py", line 1, in <module> h,w,n = input().split() ^^^^^^^ EOFError: EOF when reading a line
s953946409
p04000
u497952650
1590477764
Python
Python (3.4.3)
py
Runtime Error
3169
349512
1270
import sys from collections import defaultdict def input(): return sys.stdin.readline().strip() def recordnum(a,b): if not (0 < a < H-1 and 0 < b < W-1): return else: res = M[(a,b)] for i,j in vector: res += M[(a+i,b+j)] num[res] += 1 return def dfs(a...
Traceback (most recent call last): File "/tmp/tmpql7j6rvi/tmplyfjf6c0.py", line 46, in <module> H,W,N = map(int,input().split()) ^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s701185186
p04000
u714642969
1589728243
Python
PyPy3 (2.4.0)
py
Runtime Error
3612
1602184
1430
# -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10**9) INF=10**18 MOD=10**9+7 input=lambda: sys.stdin.readline().rstrip() YesNo=lambda b: bool([print('Yes')] if b else print('No')) YESNO=lambda b: bool([print('YES')] if b else print('NO')) int1=lambda x:int(x)-1 def main(): H,W,N=map(int,input().split()) ...
Traceback (most recent call last): File "/tmp/tmpv5j0jl9q/tmpl1om2t_u.py", line 51, in <module> main() File "/tmp/tmpv5j0jl9q/tmpl1om2t_u.py", line 12, in main H,W,N=map(int,input().split()) ^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s251354969
p04000
u480300350
1589689393
Python
PyPy3 (2.4.0)
py
Runtime Error
181
38256
9778
#!/usr/bin/env python3 import sys # import math # from string import ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits # import re # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s) from operator import itemgetter ...
Traceback (most recent call last): File "/tmp/tmp10x_ts_k/tmp4m6mvsqs.py", line 203, in <module> main() File "/tmp/tmp10x_ts_k/tmp4m6mvsqs.py", line 176, in main h, w, n = mi() ^^^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s540115296
p04000
u480300350
1589678705
Python
Python (3.4.3)
py
Runtime Error
17
3064
7563
#!/usr/bin/env python3 import sys # import math # from string import ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits # import re # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s) # from operator import itemgetter...
Traceback (most recent call last): File "/tmp/tmpevgxa69t/tmpqjicmecv.py", line 177, in <module> main() File "/tmp/tmpevgxa69t/tmpqjicmecv.py", line 141, in main h, w, n = mi() ^^^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s184114744
p04000
u480300350
1589678645
Python
PyPy3 (2.4.0)
py
Runtime Error
178
38256
7563
#!/usr/bin/env python3 import sys # import math # from string import ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits # import re # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s) # from operator import itemgetter...
Traceback (most recent call last): File "/tmp/tmpu5zhrj7c/tmp2bnoluw8.py", line 177, in <module> main() File "/tmp/tmpu5zhrj7c/tmp2bnoluw8.py", line 141, in main h, w, n = mi() ^^^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s769551067
p04000
u020604402
1589616114
Python
Python (3.4.3)
py
Runtime Error
17
3064
783
H, W , N = map(int,input().split()) from bisect import bisect_left from bisect import bisect_right matrix = [] for _ in range(N): x,y = map(int,input().split()) matrix.append([x-1,y-1]) ans = [0 for _ in range(10)] cand = {} for l in matrix: for x_r in [-2, -1 , 0]: for y_r in [-2, -1 , 0]: ...
File "/tmp/tmp4gexgqia/tmpyjz9jtv7.py", line 22 [ans[x]+=1 for x in cand.values()] ^^ SyntaxError: invalid syntax
s440256731
p04000
u020604402
1589615645
Python
Python (3.4.3)
py
Runtime Error
463
21984
830
H, W , N = map(int,input().split()) from bisect import bisect_left from bisect import bisect_right matrix = [] for _ in range(N): x,y = map(int,input().split()) x -= 1 y -= 1 matrix.append([x,y]) matrix.sort() ans = [0 for _ in range(10)] cand = {} for l in matrix: for x_r in [-2, -1 , 0]: f...
Traceback (most recent call last): File "/tmp/tmpld0rztye/tmp97c0v0i4.py", line 1, in <module> H, W , N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s879761600
p04000
u020604402
1589604968
Python
Python (3.4.3)
py
Runtime Error
2346
143372
809
H, W , N = map(int,input().split()) from bisect import bisect_left from bisect import bisect_right matrix = [] for _ in range(N): x,y = map(int,input().split()) x -= 1 y -= 1 matrix.append([x,y]) matrix.sort() ans = [0 for _ in range(10)] cand = {} for l in matrix: for x_r in [-2, -1 , 0]: f...
Traceback (most recent call last): File "/tmp/tmpaamrspfx/tmp6h27qd8e.py", line 1, in <module> H, W , N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s359297279
p04000
u020604402
1589604173
Python
Python (3.4.3)
py
Runtime Error
3155
143376
876
H, W , N = map(int,input().split()) from bisect import bisect_left from bisect import bisect_right matrix = [] for _ in range(N): x,y = map(int,input().split()) x -= 1 y -= 1 matrix.append([x,y]) matrix.sort() ans = [0 for _ in range(10)] cand = {} for l in matrix: for x_r in [-2, -1 , 0]: f...
Traceback (most recent call last): File "/tmp/tmpsld0obt6/tmp1p3k0llc.py", line 1, in <module> H, W , N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s278998716
p04000
u020604402
1589604047
Python
Python (3.4.3)
py
Runtime Error
3162
169536
910
H, W , N = map(int,input().split()) from bisect import bisect_left from bisect import bisect_right matrix = [] for _ in range(N): x,y = map(int,input().split()) x -= 1 y -= 1 matrix.append([x,y]) matrix.sort() ans = [0 for _ in range(10)] cand = {} for l in matrix: for x_r in [-2, -1 , 0]: f...
Traceback (most recent call last): File "/tmp/tmpvgasvjio/tmpx_pqfu83.py", line 1, in <module> H, W , N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s153113993
p04000
u020604402
1589603141
Python
Python (3.4.3)
py
Runtime Error
2331
143376
913
H, W , N = map(int,input().split()) from bisect import bisect_left from bisect import bisect_right matrix = [] for _ in range(N): x,y = map(int,input().split()) x -= 1 y -= 1 matrix.append([x,y]) matrix.sort() ans = [0 for _ in range(10)] from bisect import bisect_left cand = {} try: for l in matrix...
Traceback (most recent call last): File "/tmp/tmplgiu_gww/tmptvuvdegl.py", line 1, in <module> H, W , N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s652255550
p04000
u020604402
1589602786
Python
Python (3.4.3)
py
Runtime Error
2236
143376
860
H, W , N = map(int,input().split()) from bisect import bisect_left from bisect import bisect_right matrix = [] for _ in range(N): x,y = map(int,input().split()) x -= 1 y -= 1 matrix.append([x,y]) matrix.sort() ans = [0 for _ in range(10)] from bisect import bisect_left cand = {} for l in matrix: fo...
Traceback (most recent call last): File "/tmp/tmpbmierhdi/tmp0_hm13vs.py", line 1, in <module> H, W , N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s261845566
p04000
u366541443
1588551399
Python
PyPy3 (2.4.0)
py
Runtime Error
2839
222148
2932
import math import fractions import sys input = sys.stdin.readline def make_divisors(n): divisors = [] for i in range(1, int(n**0.5)+1): if n % i == 0: divisors.append(i) if i != n // i: divisors.append(n//i) # divisors.sort() return divisors def ValueT...
Traceback (most recent call last): File "/tmp/tmpam46cskz/tmp4y2xh0g_.py", line 101, in <module> h,w,n = list(map(int, input().split())) ^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s969725851
p04000
u366541443
1588551357
Python
PyPy3 (2.4.0)
py
Runtime Error
3167
217548
739
h,w,n = list(map(int, input().split())) painted = [] for i in range(n): t = list(map(int, input().split())) for j in range(3): for k in range(3): painted.append([t[0]-2+j, t[1]-2+k]) painted.sort(key = lambda x : x[1]) painted.sort(key = lambda x : x[0]) p2 = [] for i in painted: ...
Traceback (most recent call last): File "/tmp/tmpisozn0fu/tmpyx5ndtjr.py", line 2, in <module> h,w,n = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s692159861
p04000
u366541443
1588551215
Python
PyPy3 (2.4.0)
py
Runtime Error
3166
215604
2927
import math import fractions #import sys #input = sys.stdin.readline def make_divisors(n): divisors = [] for i in range(1, int(n**0.5)+1): if n % i == 0: divisors.append(i) if i != n // i: divisors.append(n//i) # divisors.sort() return divisors def Valu...
Traceback (most recent call last): File "/tmp/tmp2z4qxq1e/tmplspd6jhc.py", line 101, in <module> h,w,n = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s459826378
p04000
u366541443
1588551169
Python
PyPy3 (2.4.0)
py
Runtime Error
3011
217548
713
h,w,n = list(map(int, input().split())) painted = [] for i in range(n): t = list(map(int, input().split())) for j in range(3): for k in range(3): painted.append([t[0]-2+j, t[1]-2+k]) painted.sort(key = lambda x : x[1]) painted.sort(key = lambda x : x[0]) p2 = [] for i in painted: ...
Traceback (most recent call last): File "/tmp/tmpm8uytiot/tmp7yp2u4cb.py", line 1, in <module> h,w,n = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s919832070
p04000
u922851354
1588522645
Python
Python (3.4.3)
py
Runtime Error
3161
32340
474
import numpy as np h, w, n=map(int, input().split()) ini_state=np.zeros((h, w)) for i in range(n): a, b=map(int, input().split()) ini_state[a-1, b-1]=1 counts=[] for i in range(h-2): for j in range(w-2): square=ini_state[i:i+3, j:j+3] counts.append(np.sum(square)) def count_num(x...
Traceback (most recent call last): File "/tmp/tmpver4h9ct/tmpjs7cdm12.py", line 3, in <module> h, w, n=map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s429970862
p04000
u578323547
1588295324
Python
Python (3.4.3)
py
Runtime Error
3327
1693556
936
h,w,n = map(int, input().split()) painted = [] for i in range(h): l = [0] * w painted.append(l) first_painted = [] last_painted = [] for i in range(n): y,x = map(int, input().split()) y,x = y-1,x-1 if (i == 0): first_painted = [y,x] if (i == n-1): last_painted = [y,x] for n...
Traceback (most recent call last): File "/tmp/tmpp8u1y6aw/tmpk1i23e_0.py", line 1, in <module> h,w,n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s330435865
p04000
u189479417
1587743680
Python
PyPy3 (2.4.0)
py
Runtime Error
3894
1279804
628
H, W, N = map(int,input().split()) ans = [0] * 10 points = [] MAP = [[0] * W for _ in range(H)] for _ in range(N): a, b = map(int,input().split()) MAP[a-1][b-1] = 1 points.append([a-1, b-1]) for i in range(N): a, b = points[i] for p in range(-1, 2): for q in range(-1, 2): cnt = 0...
Traceback (most recent call last): File "/tmp/tmpijr9b5ts/tmp30t688hs.py", line 1, in <module> H, W, N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s318885573
p04000
u519923151
1587737225
Python
Python (3.4.3)
py
Runtime Error
3157
27380
356
H,W,N = map(int, input().split()) ab = [list(map(int, input().split())) for _ in range(N)] dp=[0]*10 for h in range(1,H-1): for w in range(1,W-1): s = 0 for i in range(0,N): if ab[i][0] >= h and ab[i][0] <= h+2 and ab[i][1] >= w and ab[i][1] <=w+2: s = s+1 dp[s]...
Traceback (most recent call last): File "/tmp/tmp41a8mlgo/tmpw4v4ctbt.py", line 1, in <module> H,W,N = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s378474643
p04000
u437215432
1587681602
Python
Python (3.4.3)
py
Runtime Error
3163
44484
691
import numpy as np def ABC045D(h, w, n, ab): board = np.zeros((h, w), dtype=int) for a, b in ab: board[a-1, b-1] = 1 ans = np.zeros(10, dtype=int) if h >= 3 and w >= 3: for i in range(1, h-1): for j in range(1, w-1): count = board[i-1, j-1] + board[i, j-1] + ...
Traceback (most recent call last): File "/tmp/tmpo4_8icin/tmpu9njgwp9.py", line 18, in <module> h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s871966472
p04000
u559200744
1587430275
Python
PyPy3 (2.4.0)
py
Runtime Error
574
81368
445
H, W, N = input().split(" ") H, W, N = int(H), int(W), int(N) A = [input().split(" ") for i in range(N)] A = [[int(l[0])-1, int(l[1])-1] for l in A] black_num = [0 for i in range(10)] import numpy as np field = np.array([np.array([1 if [i, j] in A else 0 for j in range(W)]) for i in range(H)]) for h in range(H - 3 ...
Traceback (most recent call last): File "/tmp/tmpsb1tqh37/tmpx3blh9hb.py", line 1, in <module> H, W, N = input().split(" ") ^^^^^^^ EOFError: EOF when reading a line
s212110905
p04000
u068595072
1587031386
Python
PyPy3 (2.4.0)
py
Runtime Error
3227
1329864
1691
h, w, n = map(int, input().split()) mat = [] for i in range(h+1): mat += [[0] * (w + 1)] blacks = [] for i in range(n): a, b = map(int, input().split()) mat[a][b] = 1 blacks.append([a, b]) d = dict() def count_blacks(x, y): b = 0 if mat[x][y] == 1: b += 1 if mat[x + 1][y] == 1: ...
Traceback (most recent call last): File "/tmp/tmp91brkrqw/tmpqaws87j3.py", line 1, in <module> h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s889769793
p04000
u068595072
1587031358
Python
Python (3.4.3)
py
Runtime Error
3323
1693676
1691
h, w, n = map(int, input().split()) mat = [] for i in range(h+1): mat += [[0] * (w + 1)] blacks = [] for i in range(n): a, b = map(int, input().split()) mat[a][b] = 1 blacks.append([a, b]) d = dict() def count_blacks(x, y): b = 0 if mat[x][y] == 1: b += 1 if mat[x + 1][y] == 1: ...
Traceback (most recent call last): File "/tmp/tmp3477q7ht/tmp410w2yr9.py", line 1, in <module> h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s217015551
p04000
u068595072
1587031226
Python
Python (3.4.3)
py
Runtime Error
3327
1693676
1682
h, w, n = map(int, input().split()) mat = [] for i in range(h+1): mat += [[0] * (w + 1)] blacks = [] for i in range(n): a, b = map(int, input().split()) mat[a][b] = 1 blacks.append([a, b]) d = dict() def count_blacks(x, y): b = 0 if mat[x][y] == 1: b += 1 if mat[x + 1][y] == 1: ...
Traceback (most recent call last): File "/tmp/tmphyn81i_9/tmpropr_8yi.py", line 1, in <module> h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s189508334
p04000
u939198091
1586461329
Python
Python (3.4.3)
py
Runtime Error
1239
108384
886
def solve(h,w,n,black_list): if len(black_list) == 0: return [(h-2)*(w-2)]+[0]*9 idx_list = [] for idx, (a,b) in enumerate(black_list): left = max(0, b-3) top = max(0, a-3) bottom = min(top+3, h-a) for row in range(top, a): if row+2 >= h: continue for col in range(left, b):...
Traceback (most recent call last): File "/tmp/tmpm2kd6nop/tmpdj5wytv7.py", line 35, in <module> h,w,n = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s877281856
p04000
u613858382
1586384703
Python
Python (3.4.3)
py
Runtime Error
3329
1693428
704
def sub_matrix(i, j): list_ = [] for n in [i, i+1, i+2]: for m in [j, j+1, j+2]: list_.append((n, m)) return list_ inp = input().split(' ') H = int(inp[0]) W = int(inp[1]) N = int(inp[2]) matrix = [[0]*W for i in range(H)] for _ in range(N): i, j = [int(inp) for inp in i...
Traceback (most recent call last): File "/tmp/tmpt6cqgmb_/tmpmz5ci1de.py", line 9, in <module> inp = input().split(' ') ^^^^^^^ EOFError: EOF when reading a line
s136567826
p04000
u292978925
1586048516
Python
Python (3.4.3)
py
Runtime Error
349
21108
1445
#in1 = '10 10 20' #in2 = ['1 1', '1 4', '1 9', '2 5', '3 10', '4 2', '4 7', '5 9', '6 4', '6 6', '6 7', '7 1', '7 3', '7 7', '8 1', '8 5', '8 10', '9 2', '10 4', '10 9'] #in1 = '1000000000 1000000000 0' h, w, n = map(int, input().split()) #h, w, n = map(int, in1.split()) idx1 = 0 ab = [[0 for i in range(2)] for j in r...
Traceback (most recent call last): File "/tmp/tmpxi2joc8i/tmpia3z1gzg.py", line 4, in <module> h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s943671638
p04000
u292978925
1586048252
Python
Python (3.4.3)
py
Runtime Error
357
21108
1268
#in1 = '10 10 20' #in2 = ['1 1', '1 4', '1 9', '2 5', '3 10', '4 2', '4 7', '5 9', '6 4', '6 6', '6 7', '7 1', '7 3', '7 7', '8 1', '8 5', '8 10', '9 2', '10 4', '10 9'] h, w, n = map(int, input().split()) #h, w, n = map(int, in1.split()) idx1 = 0 ab = [[0 for i in range(2)] for j in range(n)] while idx1 < n: x = ...
Traceback (most recent call last): File "/tmp/tmpg5oi7fhe/tmpjmvfedbq.py", line 3, in <module> h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s810715414
p04000
u292978925
1586048170
Python
Python (3.4.3)
py
Runtime Error
17
3064
1274
#in1 = '10 10 20' #in2 = ['1 1', '1 4', '1 9', '2 5', '3 10', '4 2', '4 7', '5 9', '6 4', '6 6', '6 7', '7 1', '7 3', '7 7', '8 1', '8 5', '8 10', '9 2', '10 4', '10 9'] h, w, n = lambda:map(int, input().split()) h, w, n = map(int, in1.split()) idx1 = 0 ab = [[0 for i in range(2)] for j in range(n)] while idx1 < n: ...
Traceback (most recent call last): File "/tmp/tmpe06yarzt/tmpfsno8m4v.py", line 3, in <module> h, w, n = lambda:map(int, input().split()) ^^^^^^^ TypeError: cannot unpack non-iterable function object
s222790490
p04000
u292978925
1586030425
Python
Python (3.4.3)
py
Runtime Error
3156
5748
305
f = lambda:map(int, input().split()) h, w, n = f() d={} while n: n -= 1 x, y = f() for i in range(9): a = (x + i % 3, y + i // 3) d[a] = d.get(a, 0) + (h >= a[0] > 2 <a[1] <= w) c = [list(d.values()).count(i + 1) for i in range(9)] print((h - 2) * (w - 2) - sum(c), *c)
Traceback (most recent call last): File "/tmp/tmptsb5o031/tmpce1p75w3.py", line 4, in <module> h, w, n = f() ^^^ File "/tmp/tmptsb5o031/tmpce1p75w3.py", line 2, in <lambda> f = lambda:map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s659599861
p04000
u503228842
1585955160
Python
PyPy3 (2.4.0)
py
Runtime Error
3554
1420032
917
H,W,N = map(int,input().split()) g = [[0]*(W+2) for _ in range(H+2)] # 0:white 1:black a = [0]*N b = [0]*N seen = [[False]*(W+2) for _ in range(H+2)] ans = [0]*10 for i in range(N): a[i], b[i] = map(int,input().split()) g[a[i]][b[i]] = 1 # 黒マスの周り9領域を探索する for y,x in zip(a,b): for dy in range(-1,2): f...
Traceback (most recent call last): File "/tmp/tmphldemhq4/tmpn5ibq_18.py", line 1, in <module> H,W,N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s121303985
p04000
u503228842
1585955137
Python
Python (3.4.3)
py
Runtime Error
3324
1694708
917
H,W,N = map(int,input().split()) g = [[0]*(W+2) for _ in range(H+2)] # 0:white 1:black a = [0]*N b = [0]*N seen = [[False]*(W+2) for _ in range(H+2)] ans = [0]*10 for i in range(N): a[i], b[i] = map(int,input().split()) g[a[i]][b[i]] = 1 # 黒マスの周り9領域を探索する for y,x in zip(a,b): for dy in range(-1,2): f...
Traceback (most recent call last): File "/tmp/tmp6kj0fyi6/tmp_9zkri0h.py", line 1, in <module> H,W,N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s488963213
p04000
u284854859
1585077702
Python
PyPy3 (2.4.0)
py
Runtime Error
3165
169460
2009
import sys input = sys.stdin.readline def main(): h,w,n = map(int,input().split()) dg = 10**10 d = dict() def f(z): x,y = divmod(z,dg) if 2 <= x <= h-1 and 2 <= y <= w-1: return True else: False for i in range(n): a,b = map(int,input().split...
Traceback (most recent call last): File "/tmp/tmpa3yxn_k3/tmpqc1yvkrc.py", line 89, in <module> main() File "/tmp/tmpa3yxn_k3/tmpqc1yvkrc.py", line 5, in main h,w,n = map(int,input().split()) ^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s539718907
p04000
u423585790
1585077016
Python
PyPy3 (2.4.0)
py
Runtime Error
165
38256
1150
import sys from collection import defaultdict input = sys.stdin.readline def main(): h,w,n = map(int,input().split()) dg = 10**10 d = defaultdict(int) def f(z): x,y = divmod(z,dg) if 2 <= x <= h-1 and 2 <= y <= w-1: return True else: False for i in ...
File "/tmp/tmp7tmhfz52/tmpmi0v097i.py", line 21 d[(a-1)*dg + b-1] += 1 TabError: inconsistent use of tabs and spaces in indentation
s971919662
p04000
u284854859
1585075430
Python
PyPy3 (2.4.0)
py
Runtime Error
3164
160260
1591
import sys input = sys.stdin.readline h,w,n = map(int,input().split()) dg = 10**10 d = dict() def f(z): x,y = z//dg,z%dg if 2 <= x <= h-1 and 2 <= y <= w-1: return True else: False for i in range(n): a,b = map(int,input().split()) if f(a*dg + b): if a*dg + b in d: ...
Traceback (most recent call last): File "/tmp/tmpnt9g37m3/tmp5exwexua.py", line 4, in <module> h,w,n = map(int,input().split()) ^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s883154281
p04000
u955251526
1584947168
Python
Python (3.4.3)
py
Runtime Error
3161
109200
670
h, w, n = map(int, input().split()) a = {tuple(map(int, input().split())) for _ in range(n)} d = {} c = [0] * 9 def next(x, y): ret = [] for i in range(max(0, x-2), min(h-2, x+1)): for j in range(max(0, y-2), min(w-2, y+1)): ret.append((i, j)) return ret for x, y in a: x -= 1 ...
Traceback (most recent call last): File "/tmp/tmps90zs2dc/tmp8zfokpjg.py", line 1, in <module> h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s178339723
p04000
u764401543
1584060356
Python
Python (3.4.3)
py
Runtime Error
3305
1579848
597
h, w, n = map(int, input().split()) lst = [tuple(input().split()) for i in range(n)] ans = [0] * 10 if n == 0: ans[0] = 999999996000000004 ans = map(str, ans) print('\n'.join(ans)) exit(0) stage = [[0] * w for i in range(h)] for t in lst: stage[int(t[0]) - 1][int(t[1]) - 1] = 1 tmp = [] for col ...
Traceback (most recent call last): File "/tmp/tmp0t2nzdyd/tmpkt541j0e.py", line 1, in <module> h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s772541186
p04000
u893063840
1583935700
Python
Python (3.4.3)
py
Runtime Error
1754
176472
447
from collections import defaultdict h, w, n = map(int, input().split()) ab = [list(map(int, input().split())) for _ in range(n)] d = defaultdict(int) for a, b in ab: for hi in range(a - 2, a + 1): for wi in range(b - 2, b + 1): if 1 <= hi <= h - 2 and 1 <= wi <= w - 2: d[(hi, ...
Traceback (most recent call last): File "/tmp/tmpvjdlm2x4/tmp3ow8r_8y.py", line 3, in <module> h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s762899253
p04000
u350997995
1583534025
Python
PyPy3 (2.4.0)
py
Runtime Error
3217
1241324
424
H,W,N = map(int,input().split()) H,W = H-2,W-2 A = [0]*10 A[0] = W*H S = [[0]*W for i in range(H)] for i in range(N): a,b = map(lambda x:int(x)-1,input().split()) for j in [-1,0,1]: for k in [-1,0,1]: h,w = a+j,b+k if min(h,w)<1 or h>H or w>W:continue S[h-1][w-1]+=1 ...
Traceback (most recent call last): File "/tmp/tmppo9fsvb3/tmpum7hsqo5.py", line 1, in <module> H,W,N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s256347427
p04000
u350997995
1583533682
Python
Python (3.4.3)
py
Runtime Error
1288
12916
386
from collections import Counter H,W,N = map(int,input().split()) H,W = H-2,W-2 A = [0]*(H*W) for i in range(N): a,b = map(lambda x:int(x)-1,input().split()) for j in [-1,0,1]: for k in [-1,0,1]: h,w = a+j,b+k if min(h,w)<1 or h>H or w>W:continue p = (h-1)*W+(w-1) ...
Traceback (most recent call last): File "/tmp/tmpxqd1cv06/tmpyyn58jnf.py", line 2, in <module> H,W,N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s320900506
p04000
u476604182
1582690275
Python
Python (3.4.3)
py
Runtime Error
19
3064
347
H, W, N, *L = map(int, open('0').read().split()) dic = {} for a, b in zip(*[iter(L)]*2): for i in range(a-2,a+1): for j in range(b-2,b+1): if 0<i and i+2<=H and 0<j and j+2<=W: dic[i*W+j] = dic.get(i*W+j,0)+1 ans = [0]*10 ans[0] = (W-2)*(H-2) for k in dic.keys(): ans[dic[k]] += 1 ans[0] -= 1 pri...
Traceback (most recent call last): File "/tmp/tmpquh_6qy5/tmpww0bgs05.py", line 1, in <module> H, W, N, *L = map(int, open('0').read().split()) ^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '0'
s861990154
p04000
u476604182
1582689428
Python
PyPy3 (2.4.0)
py
Runtime Error
163
38512
380
from collections import defaultdict H, W, N, *L = map(int, open('0').read().split()) dic = defaultdict(int) for a, b in zip(*[iter(L)]*2): for i in range(a-2,a+1): for j in range(b-2,b+1): if 0<i and i+2<=H and 0<j and j+2<=W: dic[(i,j)] += 1 ans = [0]*10 ans[0] = (W-2)*(H-2) for k in dic.keys(): ...
Traceback (most recent call last): File "/tmp/tmpbz2gx668/tmpnbhr1uoh.py", line 2, in <module> H, W, N, *L = map(int, open('0').read().split()) ^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '0'
s406976255
p04000
u760794812
1582129695
Python
Python (3.4.3)
py
Runtime Error
1978
170460
322
from collections import * h,w,n = map(int,input().split()) dic = defaultdict(int) for _ in range(n): a,b = map(int,input().split()) for i in range(9): dic[a - i //3,b - i % 3] += 1 ans =[0]*n for i, j in dic: ans[dic[i,j]] += h-1 > i > 0 < j < w -1 ans[0] = (h -2)*(w-2) - sum(ans) for item in ans: print(ite...
Traceback (most recent call last): File "/tmp/tmp9fo0x8dm/tmpsq5zqkpi.py", line 2, in <module> h,w,n = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s692202636
p04000
u557494880
1579955112
Python
Python (3.4.3)
py
Runtime Error
18
3064
521
dx = [-1,-1,-1,0,0,1,1,1] dy = [-1,0,1,-1,1,-1,0,1] H,W,N = map(int,input().split()) s = [] d = {} for i in range(N): x,y = map(int,input().split()) if (x,y) not in s: d[(x,y)] = 0 s.append((x,y)) d[(x,y)] += 1 for j in range(8): X = x + dx[j] Y = y + dx[j] if (X,...
Traceback (most recent call last): File "/tmp/tmpey1wix9e/tmpxmfvlqcq.py", line 3, in <module> H,W,N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s524804512
p04000
u614550445
1577871875
Python
Python (3.4.3)
py
Runtime Error
17
2940
2526
// abc045_d #include <bits/stdc++.h> #ifdef LOCAL #include "../cxx-prettyprint/prettyprint.hpp" #endif using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; #define REP(i, n) for (int (i) = 0 ; (i) < (int)(n) ; ++(i)) #define REPN(i, m, n) for (int (i) = m ; (i) < (int)(n)...
File "/tmp/tmp_fvlr_1c/tmpnpqb_pii.py", line 51 ll h_margin = min(3ll, H-1 - AB[N-1].first); ^ SyntaxError: invalid decimal literal
s836646813
p04000
u532966492
1577557399
Python
Python (3.4.3)
py
Runtime Error
517
48756
2100
def main(): from sys import stdin #input = stdin.readline import numpy as np h, w, n = map(int, input().split()) ab = [list(map(int, input().split())) for _ in [0]*n] ab_d = {(a, b) for a, b in ab} ans = [set() for _ in range(9)] for a, b in ab: temp = np.full((5, 5), None, dtyp...
Traceback (most recent call last): File "/tmp/tmp7ctc54jn/tmpgws89u4j.py", line 57, in <module> main() File "/tmp/tmp7ctc54jn/tmpgws89u4j.py", line 5, in main h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s810473421
p04000
u532966492
1577557327
Python
Python (3.4.3)
py
Runtime Error
604
50796
2100
def main(): from sys import stdin #input = stdin.readline import numpy as np h, w, n = map(int, input().split()) ab = [list(map(int, input().split())) for _ in [0]*n] ab_d = {(a, b) for a, b in ab} ans = [set() for _ in range(9)] for a, b in ab: temp = np.full((5, 5), None, dtyp...
Traceback (most recent call last): File "/tmp/tmp_u1zz5uj/tmp73r8792a.py", line 57, in <module> main() File "/tmp/tmp_u1zz5uj/tmp73r8792a.py", line 5, in main h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s391869522
p04000
u532966492
1577557229
Python
Python (3.4.3)
py
Runtime Error
359
48716
1955
def main(): from sys import stdin input = stdin.readline import numpy as np h, w, n = map(int, input().split()) ab = [list(map(int, input().split())) for _ in [0]*n] ab_d = {(a, b) for a, b in ab} ans = [set() for _ in range(9)] for a, b in ab: temp = np.full((5, 5), None) ...
Traceback (most recent call last): File "/tmp/tmpufk1b177/tmpfq0o9do1.py", line 57, in <module> main() File "/tmp/tmpufk1b177/tmpfq0o9do1.py", line 5, in main h, w, n = map(int, input().split()) ^^^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s055164829
p04000
u532966492
1577557078
Python
Python (3.4.3)
py
Runtime Error
482
51044
1907
def main(): from sys import stdin input = stdin.readline import numpy as np h, w, n = map(int, input().split()) ab = [list(map(int, input().split())) for _ in [0]*n] ab_d = {(a, b) for a, b in ab} ans = [set() for _ in range(9)] for a, b in ab: temp = np.full((5, 5), None) ...
Traceback (most recent call last): File "/tmp/tmpn_t868zl/tmpx_rgwzfg.py", line 55, in <module> main() File "/tmp/tmpn_t868zl/tmpx_rgwzfg.py", line 5, in main h, w, n = map(int, input().split()) ^^^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s071969088
p04000
u470542271
1576910058
Python
PyPy3 (2.4.0)
py
Runtime Error
1106
78936
794
h, w, n = map(int, input().split()) ab = [list(map(int, input().split())) for _ in range(n)] d = dict() for i in range(len(ab)): a = ab[i][0] - 1 b = ab[i][0] - 1 d[a] = set() dp = [0] * 10 dp[0] = (h - 2) * (w - 2) for i in range(n): a = ab[i][0] - 1 b = ab[i][1] - 1 for dx in [-1, 0, 1]: ...
Traceback (most recent call last): File "/tmp/tmpiisl7y9z/tmpi23a4huc.py", line 1, in <module> h, w, n = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s473458876
p04000
u309141201
1576622345
Python
PyPy3 (2.4.0)
py
Runtime Error
168
38384
1285
import numpy as np H, W, N = map(int, input().split()) table = np.zeros((H, W), dtype='int64') print(type(table)) for _ in range(N): # 黒なら1と更新する a, b = map(int, input().split()) table[a-1][b-1] = 1 count_0 = 0 count_1 = 0 count_2 = 0 count_3 = 0 count_4 = 0 count_5 = 0 count_6 = 0 count_7 = 0 count_8 = 0 count...
Traceback (most recent call last): File "/tmp/tmp10uapkii/tmpz4mucuug.py", line 2, in <module> H, W, N = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s029076483
p04000
u309141201
1576612120
Python
Python (3.4.3)
py
Runtime Error
3161
21812
1266
import numpy as np H, W, N = map(int, input().split()) table = np.zeros((H, W), dtype='int64') for _ in range(N): # 黒なら1と更新する a, b = map(int, input().split()) table[a-1][b-1] = 1 count_0 = 0 count_1 = 0 count_2 = 0 count_3 = 0 count_4 = 0 count_5 = 0 count_6 = 0 count_7 = 0 count_8 = 0 count_9 = 0 for y in ra...
Traceback (most recent call last): File "/tmp/tmpb17c8291/tmptq2fcprf.py", line 2, in <module> H, W, N = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s007869090
p04000
u309141201
1576611440
Python
Python (3.4.3)
py
Runtime Error
3160
22088
1855
import numpy as np H, W, N = map(int, input().split()) table = np.zeros((H, W)) for _ in range(N): # 黒なら1と更新する a, b = map(int, input().split()) table[a-1][b-1] = 1 # print(table) count_0 = 0 count_1 = 0 count_2 = 0 count_3 = 0 count_4 = 0 count_5 = 0 count_6 = 0 count_7 = 0 count_8 = 0 count_9 = 0 for y in ra...
Traceback (most recent call last): File "/tmp/tmp6vytn3nh/tmpd3j0sqml.py", line 2, in <module> H, W, N = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s176933130
p04000
u141786930
1576555099
Python
Python (3.4.3)
py
Runtime Error
3161
33116
340
import numpy as np import collections H, W, N = map(int,input().split()) C = np.zeros((H, W),dtype=int) for _ in range(N): a, b = map(int, input().split()) C[a-1,b-1] = 1 ans = [] for i in range(H-2): for j in range(W-2): ans.append(np.sum(C[i:i+3,j:j+3])) for j in range(10): print(collecti...
Traceback (most recent call last): File "/tmp/tmpswq0ci9f/tmppzmt4wz1.py", line 4, in <module> H, W, N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s340325358
p04000
u735069283
1573620981
Python
Python (3.4.3)
py
Runtime Error
3160
22068
270
import numpy as np H,W,N = map(int,input().split()) X=np.array([[0]*W]*H) c=[0]*10 for i in range(N): x,y=map(int,input().split()) X[x-1,y-1]=1 for i in range(H-2): for j in range(W-2): p=sum(sum(X[i:i+3,j:j+3])) c[p] += 1 for i in range(10): print(c[i])
Traceback (most recent call last): File "/tmp/tmp5oqlqa4b/tmpgxt9e86m.py", line 2, in <module> H,W,N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s780693415
p04000
u285443936
1572488285
Python
Python (3.4.3)
py
Runtime Error
3326
1692404
399
H,W,N = map(int,input().split()) count = [[0]*(W-2) for i in range(H-2)] for i in range(N): a,b = map(int, input().split()) a -= 1 b -= 1 for i in range(max(0,a-2),min(a+1,H-2)): for j in range(max(0,b-2),min(b+1,W-2)): count[i][j] += 1 ans = [0]*10 for i in range(H-2): for j in ...
Traceback (most recent call last): File "/tmp/tmprinreq8h/tmprp7k2wvq.py", line 1, in <module> H,W,N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s467944010
p04000
u474423089
1570764813
Python
Python (3.4.3)
py
Runtime Error
2443
135988
748
def main(): h,w,n=map(int,input().split(' ')) draw_list=[] for i in range(n): draw=tuple(map(int,input().split(' '))) for j in range(3): for k in range(3): if 0<draw[0]-j<=h-2 and 0<draw[1]-k<=w-2: draw_list.append((draw[0]-j,draw[1]-k)) an...
Traceback (most recent call last): File "/tmp/tmphp7ozq_u/tmph_bcjjaa.py", line 31, in <module> main() File "/tmp/tmphp7ozq_u/tmph_bcjjaa.py", line 2, in main h,w,n=map(int,input().split(' ')) ^^^^^^^ EOFError: EOF when reading a line
s216800960
p04000
u474423089
1570763537
Python
Python (3.4.3)
py
Runtime Error
2361
135832
735
def main(): h,w,n=map(int,input().split(' ')) draw_list=[] for i in range(n): draw=tuple(map(int,input().split(' '))) for j in range(3): for k in range(3): if 0<draw[0]-j<=h-2 and 0<draw[1]-k<=w-2: draw_list.append((draw[0]-j,draw[1]-k)) an...
Traceback (most recent call last): File "/tmp/tmppn2m2k62/tmppktmvb9y.py", line 29, in <module> main() File "/tmp/tmppn2m2k62/tmppktmvb9y.py", line 2, in main h,w,n=map(int,input().split(' ')) ^^^^^^^ EOFError: EOF when reading a line
s201689252
p04000
u474423089
1570763461
Python
Python (3.4.3)
py
Runtime Error
2320
135220
739
def main(): h,w,n=map(int,input().split(' ')) draw_list=[] for i in range(n): draw=tuple(map(int,input().split(' '))) for j in range(3): for k in range(3): if 0<draw[0]-j<=h-2 and 0<draw[1]-k<=w-2: draw_list.append((draw[0]-j,draw[1]-k)) an...
Traceback (most recent call last): File "/tmp/tmpif6omm1a/tmpyvk2p_fj.py", line 29, in <module> main() File "/tmp/tmpif6omm1a/tmpyvk2p_fj.py", line 2, in main h,w,n=map(int,input().split(' ')) ^^^^^^^ EOFError: EOF when reading a line
s339332132
p04000
u118642796
1570192540
Python
PyPy3 (2.4.0)
py
Runtime Error
2602
284144
355
H,W,N = map(int,input().split()) dic={} for _ in range(N): a,b = [int(x)-1 for x in input().split()] for h in range(a-2,a+3): for w in range(b-2,b+3): if 0<=h<H and 0<=w<W: dic[10**10*h+w] = dic.get(10**10*h+w,0)+1 ans = [0]*10 for x in dic.values(): ans[x] += 1 ans[0] = (H-2)*(W-2)-sum(ans[1:])...
Traceback (most recent call last): File "/tmp/tmpmsolnues/tmpiyx1wlhh.py", line 1, in <module> H,W,N = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s856296432
p04000
u404794295
1570022388
Python
Python (3.4.3)
py
Runtime Error
24
3436
592
inp=input().split(" ") H=int(inp[0]) W=int(inp[1]) N=int(inp[2]) square=[] plot=[] times=[0 for i in range(10)] times[0]=(H-2)*(W-2) from collections import defaultdict count=defaultdict(lambda:0) def check(a,b,count): for i in range(3): for j in range(3): if a-i>=0 and b-j>=0 and a+2-i<=H-1 and...
Traceback (most recent call last): File "/tmp/tmp0iugehng/tmpa__b7911.py", line 1, in <module> inp=input().split(" ") ^^^^^^^ EOFError: EOF when reading a line
s555656459
p04000
u762540523
1569616711
Python
Python (3.4.3)
py
Runtime Error
3198
795124
299
from collections import Counter h,w,n=map(int,input().split()) x=[0 for _ in range((h-2)*(w-2))] for _ in range(n): a,b=map(int,input().split()) for i in range(max(0,a-3),min(h-2,a)): for j in range(max(0,b-3),min(w-2,b)): x[i*(h-2)+j]+=1 c=Counter(x) for i in range(10): print(c[i])
Traceback (most recent call last): File "/tmp/tmpj3p4d7w0/tmptru79bji.py", line 2, in <module> h,w,n=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s705936971
p04000
u924374652
1569464027
Python
Python (3.4.3)
py
Runtime Error
3161
21988
419
import numpy as np h, w, n = map(int, input().split(" ")) board = np.zeros((h, w)) for i in range(n): a, b = map(int, input().split(" ")) board[a - 1][b - 1] = 1 result = [0 for _ in range(10)] for start_h in range(h - 2): for start_w in range(w - 2): sum_black = np.count_nonzero(board[start_h:(start_h+3), st...
Traceback (most recent call last): File "/tmp/tmphcunrms_/tmpm9lq7pfo.py", line 2, in <module> h, w, n = map(int, input().split(" ")) ^^^^^^^ EOFError: EOF when reading a line
s464876358
p04000
u736729525
1568411418
Python
Python (3.4.3)
py
Runtime Error
18
3064
898
def main(): import sys input = sys.readline H, W, N = map(int, input().split()) grid = set() for i in range(N): a, b = map(int, input().split()) a -= 1 b -= 1 grid.add((a,b)) total = ((H-3)+1)*((W-3)+1) count = [0] * 10 offset = [-2, -1, 0] for a, b ...
Traceback (most recent call last): File "/tmp/tmpxqilk9sb/tmpovuj9hf_.py", line 35, in <module> main() File "/tmp/tmpxqilk9sb/tmpovuj9hf_.py", line 4, in main input = sys.readline ^^^^^^^^^^^^ AttributeError: module 'sys' has no attribute 'readline'
s031752184
p04000
u842689614
1567454479
Python
Python (3.4.3)
py
Runtime Error
3164
38708
3399
import sys import numpy as np import time input = sys.stdin.readline H,W,N=map(int,input().split()) ab=[tuple(map(int,input().split())) for i in range(N)] ab.sort() r_b=[0] r_b_app=r_b.append for i in range(1,N): if ab[i][0]!=ab[i-1][0]: r_b_app(i) if N>0: r_b_app(N) rows=tuple(ab[b][0] for b in r_b if b<N)...
Traceback (most recent call last): File "/tmp/tmp39w_6ntb/tmpea7bla4t.py", line 6, in <module> H,W,N=map(int,input().split()) ^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s775423386
p04000
u842689614
1567220985
Python
Python (3.4.3)
py
Runtime Error
3156
64020
3978
import sys input = sys.stdin.readline H,W,N=map(int,input().split()) ab=[tuple(map(int,input().split())) for i in range(N)] ab.sort() r_b=[0] r_b_app=r_b.append for i in range(1,N): if ab[i][0]!=ab[i-1][0]: r_b_app(i) if N>0: r_b_app(N) rows=tuple(ab[b][0] for b in r_b if b<N) cols=tuple(tuple(ab[j][1] for...
Traceback (most recent call last): File "/tmp/tmpa1mi766w/tmp0__0fobc.py", line 4, in <module> H,W,N=map(int,input().split()) ^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s223565923
p04000
u842689614
1567053654
Python
Python (3.4.3)
py
Runtime Error
19
3320
4579
import sys input = sys.stdin.readline H,W,N=map(int,input().split()) ab=[tuple(map(int,input().split())) for i in range(N)] ab.sort() r_b=[0] r_b_app=r_b.append for i in range(1,N): if ab[i][0]!=ab[i-1][0]: r_b_app(i) if N>0: r_b_app(N) rows=tuple(ab[b][0] for b in r_b if b<N) cols=tuple(tuple(ab[j][1] for...
File "/tmp/tmpae25g26b/tmpr98b19yu.py", line 132 for box_row in range(find_row-row,3): ^ IndentationError: unindent does not match any outer indentation level
s379851776
p04000
u842689614
1567052833
Python
Python (3.4.3)
py
Runtime Error
1912
64020
4225
import sys input = sys.stdin.readline H,W,N=map(int,input().split()) ab=[tuple(map(int,input().split())) for i in range(N)] ab.sort() r_b=[0] r_b_app=r_b.append for i in range(1,N): if ab[i][0]!=ab[i-1][0]: r_b_app(i) if N>0: r_b_app(N) rows=tuple(ab[b][0] for b in r_b if b<N) cols=tuple(tuple(ab[j][1] for...
/tmp/tmp0ljtdopx/tmpnq8vfin2.py:129: SyntaxWarning: "is" with a literal. Did you mean "=="? if ch_rn is 0: /tmp/tmp0ljtdopx/tmpnq8vfin2.py:131: SyntaxWarning: "is" with a literal. Did you mean "=="? elif ch_rn is 1: Traceback (most recent call last): File "/tmp/tmp0ljtdopx/tmpnq8vfin2.py", line 4, in <module> ...
s654069813
p04000
u842689614
1566938708
Python
Python (3.4.3)
py
Runtime Error
3158
69320
3735
H,W,N=map(int,input().split()) ab=[list(map(int,input().split())) for i in range(N)] ab.sort() r_b=[0] rows=[] rows_app=rows.append r_b_app=r_b.append for i in range(1,N): if ab[i][0]!=ab[i-1][0]: r_b_app(i) rows_app(ab[i-1][0]) if N>0: rows.append(ab[N-1][0]) r_b.append(N) cols=[[ab[j][1] for j in ran...
Traceback (most recent call last): File "/tmp/tmpdn890u53/tmpwq3llwst.py", line 1, in <module> H,W,N=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s633539082
p04000
u842689614
1566883954
Python
Python (3.4.3)
py
Runtime Error
3158
41492
2670
H,W,N=map(int,input().split()) ab=[list(map(int,input().split())) for i in range(N)] #ab.sort() r_b=[0] rows=[] for i in range(1,N): if ab[i][0]!=ab[i-1][0]: r_b.append(i) rows.append(ab[i-1][0]) if N>0: rows.append(ab[N-1][0]) r_b.append(N) cols=[[ab[j][1] for j in range(r_b[i],r_b[i+1])] for i in ran...
Traceback (most recent call last): File "/tmp/tmpz8heej9z/tmpq2nfthx4.py", line 1, in <module> H,W,N=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s195555829
p04000
u842689614
1566883706
Python
Python (3.4.3)
py
Runtime Error
3158
69324
2654
H,W,N=map(int,input().split()) ab=[list(map(int,input().split())) for i in range(N)] ab.sort() r_b=[0] rows=[] for i in range(1,N): if ab[i][0]!=ab[i-1][0]: r_b.append(i) rows.append(ab[i-1][0]) if N>0: rows.append(ab[N-1][0]) r_b.append(N) cols=[[ab[j][1] for j in range(r_b[i],r_b[i+1])] for i in rang...
Traceback (most recent call last): File "/tmp/tmp5akybmr3/tmpnq10y9vy.py", line 1, in <module> H,W,N=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s781771521
p04000
u842689614
1566883300
Python
Python (3.4.3)
py
Runtime Error
3158
69320
2661
H,W,N=map(int,input().split()) ab=[list(map(int,input().split())) for i in range(N)] ab.sort() r_b=[0] rows=[] for i in range(1,N): if ab[i][0]!=ab[i-1][0]: r_b.append(i) rows.append(ab[i-1][0]) if i==N-1: r_b.append(N) rows.append(ab[N-1][0]) cols=[[ab[j][1] for j in range(r_b[i],r_b[i+1])] for i...
Traceback (most recent call last): File "/tmp/tmp7xh6pmx0/tmp_5wvlm9_.py", line 1, in <module> H,W,N=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s182559499
p04000
u842689614
1566878183
Python
Python (3.4.3)
py
Runtime Error
17
3192
2510
H,W,N=map(int,input().split()) ab=[list(map(int,input().split())) for i in range(N)] ab.sort() r_b=[0] rows=[] for i in range(1,N): if ab[i][0]!=ab[i-1][0]: r_b.append(i) rows.append(ab[i-1][0]) if i==N-1: r_b.append(N) rows.append(ab[N-1][0]) cols=[[ab[j][1] for j in range(r_b[i],r_b[i+1])] for i...
File "/tmp/tmpc18al0ib/tmpjoum9jyv.py", line 64 elif: chr in [row+1,row+2]: ^ SyntaxError: invalid syntax
s996229932
p04000
u842689614
1566868803
Python
Python (3.4.3)
py
Runtime Error
3159
64452
2489
H,W,N=map(int,input().split()) ab=[list(map(int,input().split())) for i in range(N)] ab.sort() r_b=[0] rows=[] for i in range(1,N): if ab[i][0]!=ab[i-1][0]: r_b.append(i) rows.append(ab[i-1][0]) if i==N-1: r_b.append(N) rows.append(ab[N-1][0]) cols=[[ab[j][1] for j in range(r_b[i],r_b[i+1])] for i...
Traceback (most recent call last): File "/tmp/tmpngpta4yw/tmpbmpgd9qi.py", line 1, in <module> H,W,N=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s256178610
p04000
u842689614
1566867719
Python
Python (3.4.3)
py
Runtime Error
3163
64500
1652
H,W,N=map(int,input().split()) ab=[list(map(int,input().split())) for i in range(N)] ab.sort() r_b=[0] rows=[] for i in range(1,N): if ab[i][0]!=ab[i-1][0]: r_b.append(i) rows.append(ab[i-1][0]) if i==N-1: r_b.append(N) rows.append(ab[N-1][0]) cols=[[ab[j][1] for j in range(r_b[i],r_b[i+1])] for i...
Traceback (most recent call last): File "/tmp/tmppdz3kjcl/tmps18z0o1d.py", line 1, in <module> H,W,N=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s315579039
p04000
u842689614
1566866430
Python
Python (3.4.3)
py
Runtime Error
3161
90556
2072
def p_range(start,end,max_n): ss=max(start,0) ee=min(max_n+1,end) return range(ss,ee) H,W,N=map(int,input().split()) ab=[list(map(int,input().split())) for i in range(N)] ab.sort() r_b=[0] rows=[] for i in range(1,N): if ab[i][0]!=ab[i-1][0]: r_b.append(i) rows.append(ab[i-1][0]) rows.append(ab[N-1][0...
Traceback (most recent call last): File "/tmp/tmpjfsn28ud/tmpuzpls1ko.py", line 6, in <module> H,W,N=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line