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
s240636625
p02234
u803327846
1453818791
Python
Python
py
Runtime Error
10
6452
395
n = int(raw_input()) p = [0 for i in range(0, 101)] m = [[0 for i in range(0, 101)] for j in range(0, 101)] for i in range(1,n+1): m[i][i] = 0 p[i-1], p[i] = map(int, raw_input().split()) for m in range(2,n+1): for i in range(1,n-m+1+1): j = i + m - 1 m[i][j] = 100000000000 for k in range(i,j-1+1): m[i][j...
File "/tmp/tmp3px09pmt/tmpzi3oxpec.py", line 16 print m[1][n] ^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s951594570
p02234
u803327846
1453818859
Python
Python
py
Runtime Error
10
6552
395
n = int(raw_input()) p = [0 for i in range(0, 101)] m = [[0 for i in range(0, 101)] for j in range(0, 101)] for i in range(1,n+1): m[i][i] = 0 p[i-1], p[i] = map(int, raw_input().split()) for m in range(2,n+1): for i in range(1,n-m+1+1): j = i + m - 1 m[i][j] = float("inf") for k in range(i,j-1+1): m[i][j...
File "/tmp/tmpvshgfn8s/tmpfsjouwjm.py", line 16 print m[1][n] ^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s707869386
p02234
u803327846
1453819065
Python
Python
py
Runtime Error
0
0
466
n = int(raw_input()) p = [0 for i in range(0, 101)] m = [[0 for i in range(0, 101)] for j in range(0, 101)] for i in range(1, n+1): ????????p[i-1], p[i] = map(int, raw_input().split()) ?????????? for l in range(2, n+1): ????????for i in range(1, n-l+1+1): ????????????????j = i+l-1 ????????????????m[i][j] = float("inf")...
File "/tmp/tmpcsk31z35/tmpc2oebeu5.py", line 5 ????????p[i-1], p[i] = map(int, raw_input().split()) ^ IndentationError: expected an indented block after 'for' statement on line 4
s580632592
p02234
u803327846
1453819103
Python
Python
py
Runtime Error
0
0
466
n = int(raw_input()) p = [0 for i in range(0, 101)] m = [[0 for i in range(0, 101)] for j in range(0, 101)] for i in range(1, n+1): ????????p[i-1], p[i] = map(int, raw_input().split()) ?????????? for l in range(2, n+1): ????????for i in range(1, n-l+1+1): ????????????????j = i+l-1 ????????????????m[i][j] = float("inf")...
File "/tmp/tmpzff5obxp/tmp8rny1ra9.py", line 5 ????????p[i-1], p[i] = map(int, raw_input().split()) ^ IndentationError: expected an indented block after 'for' statement on line 4
s477158966
p02234
u803327846
1453819113
Python
Python
py
Runtime Error
0
0
460
n = int(raw_input()) p = [0 for i in range(0, 101)] m = [[0 for i in range(0, 101)] for j in range(0, 101)] for i in range(1, n+1): ????????p[i-1], p[i] = map(int, raw_input().split()) ?????????? for l in range(2, n+1): ????????for i in range(1, n-l+2): ????????????????j = i+l-1 ????????????????m[i][j] = float("inf") ?...
File "/tmp/tmpbv4h3gzt/tmpl68wpjc3.py", line 5 ????????p[i-1], p[i] = map(int, raw_input().split()) ^ IndentationError: expected an indented block after 'for' statement on line 4
s817617160
p02234
u803327846
1453819128
Python
Python
py
Runtime Error
0
0
460
n = int(raw_input()) p = [0 for i in range(0, 101)] m = [[0 for i in range(0, 101)] for j in range(0, 101)] for i in range(1, n+1): ????????p[i-1], p[i] = map(int, raw_input().split()) ?????????? for l in range(2, n+1): ????????for i in range(1, n-l+2): ????????????????j = i+l-1 ????????????????m[i][j] = float("inf") ?...
File "/tmp/tmpnklqx_mr/tmp4_thrvdd.py", line 5 ????????p[i-1], p[i] = map(int, raw_input().split()) ^ IndentationError: expected an indented block after 'for' statement on line 4
s600627645
p02234
u177295149
1453819730
Python
Python
py
Runtime Error
0
0
402
n = raw_input() p = [0 for i in range(101)] m = [[0 for i in range(101)] for j in range(101)] for i in range (1,n+1): p[i-1],p[i] = map(int,raw_input().split()) m[i][i] = 0 for j in range (2,n+1): for i in range(1,n-j+2): k = i + j - 1 m[i][k] = 10**10 for l in range(i,j): ...
File "/tmp/tmpgv5w6abj/tmpblouc5kj.py", line 13 print min(min(m)) ^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s641984224
p02234
u177295149
1453819829
Python
Python
py
Runtime Error
0
0
410
n = raw_input() p = [0 for i in range(101)] m = [[0 for i in range(101)] for k in range(101)] for i in range (1,n+1): m[i][i] = 0 p[i-1],p[i] = map(int,raw_input().split()) for j in range (2,n+1): for i in range(1,n-j+2): k = i + j - 1 m[i][k] = 10**10 for l in range(i,j): ...
File "/tmp/tmpqvyxm2qr/tmpnk7__3k7.py", line 16 print mini(mini(m)) ^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s110212958
p02234
u460172144
1477221438
Python
Python3
py
Runtime Error
0
0
436
n = int(input()) c = [0]*(n+1) c[0],c[1] = map(int,input().split()) for i in range(2,n+1): c[i] = int(input().split()[1]) dp = [[sys.maxsize]*(n+1) for i in range(n+1)] for i in range(1,n+1): dp[i][i] = 0 for l in range(2,n+1) :#length of chain j-i+1 for i in range(1,n-l+2): j = i +l - 1: ...
File "/tmp/tmpqpgjbpum/tmp7jsha0_f.py", line 17 j = i +l - 1: ^ SyntaxError: invalid syntax
s441383774
p02234
u159356473
1479463331
Python
Python3
py
Runtime Error
0
0
546
#coding:UTF-8 def chain(p,n): m={} for i in range(1,n+1): m[i] = {i:0} for l in range(2,n+1): for i in range(1,n-l+2): j = i + l -1 m[i][j] = float("inf") for k in range(i,j): m[i][j] = min(m[i][j],m[i][k]+m[k+1][j] + p[i-1]*p[k]*...
File "/tmp/tmp4re_gqrc/tmpf63ebcy5.py", line 15 def __name__=="__main__": ^^ SyntaxError: expected '('
s646582164
p02234
u510586139
1480839468
Python
Python3
py
Runtime Error
0
0
507
import math n = int(input()) p1 = [] p = [] for i in range (n): p1.append(list(map(int, input().split()))) p.append(int(p1[i][0])) p.append(int(p1[i][1])) m = [[] for i in range(n)]; for i in range(n): for j in range(n): m[i].append(0) for l in range(2, n + 1): for i in range(n - l + 1): ...
Traceback (most recent call last): File "/tmp/tmp_32_ewrd/tmpggafq5ut.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s197492302
p02234
u510586139
1480839755
Python
Python3
py
Runtime Error
0
0
480
import math n = int(input()) p1 = [] p = [] m = [[] for i in range(n)] for i in range (n): p1.append(list(map(int, input().split()))) p.append(int(p1[i][0])) for j in range(n): m[i].append(0) p.append(int(p1[i][1])) for l in range(2, n + 1): for i in range(n - l + 1): j = i + l - 1 ...
Traceback (most recent call last): File "/tmp/tmp1oew4c6h/tmp6okg95md.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s340041710
p02234
u112247126
1487992141
Python
Python3
py
Runtime Error
0
0
735
def matrixChainMultiplication(p): # p = [p_0, p_1, ..., p_n] n = len(p) - 1 # n+1 x n+1 zero matrix?????????(0,...,n) # cost(i,j): (M_i...M_j)???????°?????????? cost = [[0 for _ in range(n + 1)] for _ in range(n + 1)] for numOfMatrices in range(2, n + 1): for i in range(1, n - numOfMatri...
File "/tmp/tmp_mj3wgwm/tmputmp504g.py", line 20 p.append(int(listed_input.[0])) ^ SyntaxError: invalid syntax
s893791154
p02234
u112247126
1487992322
Python
Python3
py
Runtime Error
0
0
731
def matrixChainMultiplication(p): # p = [p_0, p_1, ..., p_n] n = len(p) - 1 # n+1 x n+1 zero matrix?????????(0,...,n) # cost(i,j): (M_i...M_j)???????°?????????? cost = [[0 for _ in range(n + 1)] for _ in range(n + 1)] for numOfMatrices in range(2, n + 1): for i in range(1, n - numOfMatri...
File "/tmp/tmppl9by4sb/tmpwvjp1sd6.py", line 20 p.append(int(listed_input.[0])) ^ SyntaxError: invalid syntax
s555732169
p02234
u112247126
1487992400
Python
Python3
py
Runtime Error
0
0
734
def matrixChainMultiplication(p): # p = [p_0, p_1, ..., p_n] n = len(p) - 1 # n+1 x n+1 zero matrix?????????(0,...,n) # cost(i,j): (M_i...M_j)???????°?????????? cost = [[0 for _ in range(n + 1)] for _ in range(n + 1)] for numOfMatrices in range(2, n + 1): for i in range(1, n - numOfMatri...
Traceback (most recent call last): File "/tmp/tmpb_zz9x7b/tmpyeo8akzv.py", line 16, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s507797973
p02234
u112247126
1487992422
Python
Python3
py
Runtime Error
0
0
734
def matrixChainMultiplication(p): # p = [p_0, p_1, ..., p_n] n = len(p) - 1 # n+1 x n+1 zero matrix?????????(0,...,n) # cost(i,j): (M_i...M_j)???????°?????????? cost = [[0 for _ in range(n + 1)] for _ in range(n + 1)] for numOfMatrices in range(2, n + 1): for i in range(1, n - numOfMatri...
Traceback (most recent call last): File "/tmp/tmpn9qgxdnb/tmpm3w1cgqv.py", line 16, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s283971925
p02234
u216229195
1497085863
Python
Python3
py
Runtime Error
0
0
955
n = input().split() nele = int(n[0]) list = range(1,nele+1) nrow = {} ncol = {} for i in list: nrow[i] = int(n[i*2-1]) ncol[i] = int(n[i*2]) #print(nrow, ncol) min = -1 cur = -1 route = [] done = [] for i in list: route.append(0) #print(route) depth = -1 min = -1 def tansaku(prev): global depth depth += ...
Traceback (most recent call last): File "/tmp/tmpeo93vcz7/tmp8oukiqbd.py", line 1, in <module> n = input().split() ^^^^^^^ EOFError: EOF when reading a line
s433233629
p02234
u216229195
1497085919
Python
Python3
py
Runtime Error
0
0
956
n = input().split() nele = int(n[0]) list = range(1,nele+1) nrow = {} ncol = {} for i in list: nrow[i] = int(n[i*2-1]) ncol[i] = int(n[i*2]) #print(nrow, ncol) min = -1 cur = -1 route = [] done = [] for i in list: route.append(0) #print(route) depth = -1 min = -1 def tansaku(prev): global depth depth += ...
Traceback (most recent call last): File "/tmp/tmpw7_1oz75/tmpnoka7n6b.py", line 1, in <module> n = input().split() ^^^^^^^ EOFError: EOF when reading a line
s932250009
p02234
u600821328
1499403882
Python
Python3
py
Runtime Error
40
9116
1559
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import re import math import collections import itertools import functools import logging logging.basicConfig(level=logging.DEBUG, format="DBG: %(message)s") def dbg(msg, *args, **kwargs): logging.debug(msg, *args, **kwargs) Mat = collections.namedtuple(...
Traceback (most recent call last): File "/tmp/tmpi75bzfn8/tmpnznqsejj.py", line 64, in <module> if __name__ == "__main__": main() ^^^^^^ File "/tmp/tmpi75bzfn8/tmpnznqsejj.py", line 55, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s255241758
p02234
u600821328
1499403945
Python
Python3
py
Runtime Error
50
9076
1596
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import re import math import collections import itertools import functools import logging logging.basicConfig(level=logging.DEBUG, format="DBG: %(message)s") def dbg(msg, *args, **kwargs): logging.debug(msg, *args, **kwargs) Mat = collections.namedtuple(...
Traceback (most recent call last): File "/tmp/tmp4277kfaf/tmp785un70q.py", line 65, in <module> if __name__ == "__main__": main() ^^^^^^ File "/tmp/tmp4277kfaf/tmp785un70q.py", line 56, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s829086683
p02234
u600821328
1499404334
Python
Python3
py
Runtime Error
40
8488
1540
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import re import math import collections import itertools import functools def dbg(*args): print("DBG: ", file=sys.stderr, end="") print(*args, file=sys.stderr) Mat = collections.namedtuple("Mat", "r c") def mat_mul(ms): return Mat(ms[0].r, ms[-1...
Traceback (most recent call last): File "/tmp/tmpoiz6eeir/tmpo273xu8j.py", line 63, in <module> if __name__ == "__main__": main() ^^^^^^ File "/tmp/tmpoiz6eeir/tmpo273xu8j.py", line 54, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s170686227
p02234
u600821328
1499404352
Python
Python3
py
Runtime Error
40
8452
1540
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import re import math import collections import itertools import functools def dbg(*args): print("DBG: ", file=sys.stderr, end="") print(*args, file=sys.stderr) Mat = collections.namedtuple("Mat", "r c") def mat_mul(ms): return Mat(ms[0].r, ms[-1...
Traceback (most recent call last): File "/tmp/tmp4ui_2dyr/tmp5l7tigkt.py", line 63, in <module> if __name__ == "__main__": main() ^^^^^^ File "/tmp/tmp4ui_2dyr/tmp5l7tigkt.py", line 54, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s949810223
p02234
u600821328
1499404515
Python
Python3
py
Runtime Error
40
8504
1585
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import re import math import collections import itertools import functools DEBUG = True DEBUG = False def dbg(*args): if DEBUG: print("DBG: ", file=sys.stderr, end="") print(*args, file=sys.stderr) Mat = collections.namedtuple("Mat", "r c...
Traceback (most recent call last): File "/tmp/tmpmg3_76kb/tmpoj58g08l.py", line 67, in <module> if __name__ == "__main__": main() ^^^^^^ File "/tmp/tmpmg3_76kb/tmpoj58g08l.py", line 58, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s892419756
p02234
u845643816
1511264836
Python
Python3
py
Runtime Error
0
0
737
n = int(input()) p = list(range(n+1)) for i in range(n): p[i], p[n] = map(int, input().split()) # table[i][j] : M_i??????M_j??????????????????????°?????????° table = [[0] * n for i in range(n)] # ??£????????£???2???????????????????????? for i in range(n-1): table[i][i+1] = p[i]*p[i+1]*p[i+2] for k in range...
Traceback (most recent call last): File "/tmp/tmpt6mp3yup/tmp4fhl9ru8.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s464008871
p02234
u845643816
1511266347
Python
Python3
py
Runtime Error
20
7780
818
n = int(input()) p = list(range(n+2)) for i in range(1,n+1): p[i], p[n+1] = map(int, input().split()) # table[i][j] : M_i??????M_j??????????????????????°?????????° table = [[0] * (n+1) for i in range(n+1)] # ??£????????£???2???????????????????????? for i in range(1,n): # 1<=i,i+1<=n table[i][i+1] = p[i]*p[i...
Traceback (most recent call last): File "/tmp/tmpwccc5jju/tmpnywbqfag.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s395905580
p02234
u845643816
1511266450
Python
Python3
py
Runtime Error
20
7780
820
n = int(input()) p = list(range(n+2)) for i in range(1,n+1): p[i], p[n+1] = map(int, input().split()) # table[i][j] : M_i??????M_j??????????????????????°?????????° table = [[0] * (n+1) for i in range(n+1)] # ??£????????£???2???????????????????????? for i in range(1,n): # 1<=i,i+1<=n table[i][i+1] = p[i]*p[i...
Traceback (most recent call last): File "/tmp/tmpchi22nyc/tmp_8drcqxn.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s885288720
p02234
u626266743
1511272941
Python
Python3
py
Runtime Error
0
0
371
n = int(input()) INF = 10**9 P = [], [] for i in range(n): p = map(int, input().split()) P.append() m = [[0]*n for in range(n)] for l in range(2, n + 1): for i in range(n - l + 1): j = i + l - 1 m[i][j] = INF for k in range(i, j): m[i][j] = min(m[i][j], m[i][k] + m[k + 1...
File "/tmp/tmpv3jhecu0/tmpn22expa0.py", line 7 m = [[0]*n for in range(n)] ^^ SyntaxError: invalid syntax
s462423473
p02234
u626266743
1511272954
Python
Python3
py
Runtime Error
0
0
367
n = int(input()) INF = 10**9 P = [] for i in range(n): p = map(int, input().split()) P.append() m = [[0]*n for in range(n)] for l in range(2, n + 1): for i in range(n - l + 1): j = i + l - 1 m[i][j] = INF for k in range(i, j): m[i][j] = min(m[i][j], m[i][k] + m[k + 1]m[j...
File "/tmp/tmpa_vnhzwy/tmpnuxcsl3v.py", line 7 m = [[0]*n for in range(n)] ^^ SyntaxError: invalid syntax
s673416420
p02234
u626266743
1511272974
Python
Python3
py
Runtime Error
0
0
369
n = int(input()) INF = 10**9 P = [] for i in range(n): p = map(int, input().split()) P.append() m = [[0]*n for i in range(n)] for l in range(2, n + 1): for i in range(n - l + 1): j = i + l - 1 m[i][j] = INF for k in range(i, j): m[i][j] = min(m[i][j], m[i][k] + m[k + 1]m...
File "/tmp/tmpgb83qfw8/tmpd8dtjqvz.py", line 14 m[i][j] = min(m[i][j], m[i][k] + m[k + 1]m[j] + p[i - 1] * p[k] * p[j]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma?
s547752951
p02234
u626266743
1511273018
Python
Python3
py
Runtime Error
0
0
378
n = int(input()) INF = 10**9 P = [] for i in range(n): p = map(int, input().split()) P.append() m = [[0]*n for i in range(n)] for l in range(2, n + 1): for i in range(n - l + 1): j = i + l - 1 m[i][j] = INF for k in range(i, j): m[i][j] = min(m[i][j], m[i][k] + m[k + 1]m...
File "/tmp/tmp9iw5jowi/tmp0udbb5rw.py", line 14 m[i][j] = min(m[i][j], m[i][k] + m[k + 1]m[j] + p[i - 1][0] * p[k][1] * p[j][1]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma?
s718437776
p02234
u626266743
1511273024
Python
Python3
py
Runtime Error
0
0
374
n = int(input()) INF = 10**9 P = [] for i in range(n): p = map(int, input().split()) P.append() m = [[0]*n for i in range(n)] for l in range(2, n + 1): for i in range(n - l + 1): j = i + l - 1 m[i][j] = INF for k in range(i, j): m[i][j] = min(m[i][j], m[i][k] + m[k + 1]m...
File "/tmp/tmprfp2jrla/tmp6alyu6zz.py", line 14 m[i][j] = min(m[i][j], m[i][k] + m[k + 1]m[j] + p[i][0] * p[k][1] * p[j][1]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma?
s144445860
p02234
u626266743
1511273044
Python
Python3
py
Runtime Error
0
0
377
n = int(input()) INF = 10**9 P = [] for i in range(n): p = map(int, input().split()) P.append() m = [[0]*n for i in range(n)] for l in range(2, n + 1): for i in range(n - l + 1): j = i + l - 1 m[i][j] = INF for k in range(i, j): m[i][j] = min(m[i][j], m[i][k] + m[k + 1][...
Traceback (most recent call last): File "/tmp/tmppco4dktr/tmpt7pp7qq0.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s159371769
p02234
u626266743
1511273055
Python
Python3
py
Runtime Error
0
0
373
n = int(input()) INF = 10**9 P = [] for i in range(n): p = map(int, input().split()) P.append() m = [[0]*n for i in range(n)] for l in range(2, n + 1): for i in range(n - l + 1): j = i + l - 1 m[i][j] = INF for k in range(i, j): m[i][j] = min(m[i][j], m[i][k] + m[k + 1][...
Traceback (most recent call last): File "/tmp/tmplfr3_0u2/tmpdxekznzv.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s150002010
p02234
u626266743
1511273192
Python
Python3
py
Runtime Error
0
0
374
n = int(input()) P = [] for i in range(n): p = map(int, input().split()) P.append() m = [[0]*n for i in range(n)] for l in range(2, n + 1): for i in range(n - l + 1): j = i + l - 1 m[i][j] = float("inf") for k in range(i, j): m[i][j] = min(m[i][j], m[i][k] + m[k + 1][j] ...
Traceback (most recent call last): File "/tmp/tmpzsne0hig/tmpz678sn6m.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s855833365
p02234
u626266743
1511273223
Python
Python3
py
Runtime Error
0
0
377
n = int(input()) INF = 10**9 P = [] for i in range(n): p = map(int, input().split()) P.append() m = [[0]*n for i in range(n)] for l in range(2, n + 1): for i in range(n - l + 1): j = i + l - 1 m[i][j] = INF for k in range(i, j): m[i][j] = min(m[i][j], m[i][k] + m[k + 1][...
Traceback (most recent call last): File "/tmp/tmpnt72lxwv/tmpum3n4s3b.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s127731710
p02234
u424457654
1511280338
Python
Python3
py
Runtime Error
20
7660
354
n = int(input()) p = [list(map(int, input().split())) for i in range(n)] m = [[0] * n for i in range(n)] for l in range(2, n + 1): for i in range(n - k + 1): j = i + l - 1 m[i][j] = float('inf') for k in range(i, j): m[i][j] = min(m[i][j], m[i][k] + m[k + 1][j] + p[i][0] * p[k]...
Traceback (most recent call last): File "/tmp/tmpftni8rec/tmpy8xge_lc.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s230472776
p02234
u426534722
1518624669
Python
Python3
py
Runtime Error
0
0
535
INF = float("inf") n = int(input()) f = lambda x: list(map(int, x.split())) A = [0] for i, a in enumerate(map(f, sys.stdin)): if i == 0: A.extend(a) else: A.append(a[1]) C = [[INF] * (n + 1) for _ in range(n + 1)] for i in range(n + 1): C[i][i] = 0 for j in range(1, n): for i in range(1,...
Traceback (most recent call last): File "/tmp/tmp_3qg621c/tmp1qiuy9sr.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s882448988
p02234
u426534722
1518624748
Python
Python3
py
Runtime Error
0
0
514
INF = float("inf") n = int(input()) A = [0] for i, a in enumerate(sys.stdin)): a = list(map, a.split()) if i == 0: A.extend(a) else: A.append(a[1]) C = [[INF] * (n + 1) for _ in range(n + 1)] for i in range(n + 1): C[i][i] = 0 for j in range(1, n): for i in range(1, n - j + 1): ...
File "/tmp/tmpd0d6c50w/tmpx90j3vtl.py", line 4 for i, a in enumerate(sys.stdin)): ^ SyntaxError: unmatched ')'
s626982649
p02234
u426534722
1518624772
Python
Python3
py
Runtime Error
0
0
517
INF = float("inf") n = int(input()) A = [0] for i, a in enumerate(sys.stdin)): a = list(map, a.split()) if i == 0: A.extend(a) else: A.append(a[1]) C = [[INF] * (n + 1) for _ in range(n + 1)] for i in range(n + 1): C[i][i] = 0 for j in range(1, n): for i in range(1, n - j + 1): ...
File "/tmp/tmpzcnvfz0v/tmpb2p20p2s.py", line 4 for i, a in enumerate(sys.stdin)): ^ SyntaxError: unmatched ')'
s890912619
p02234
u426534722
1518624819
Python
Python3
py
Runtime Error
0
0
516
INF = float("inf") n = int(input()) A = [0] for i, a in enumerate(sys.stdin): a = list(map, a.split()) if i == 0: A.extend(a) else: A.append(a[1]) C = [[INF] * (n + 1) for _ in range(n + 1)] for i in range(n + 1): C[i][i] = 0 for j in range(1, n): for i in range(1, n - j + 1): ...
Traceback (most recent call last): File "/tmp/tmp_foeq9r1/tmpm2vk116j.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s373333357
p02234
u426534722
1518624869
Python
Python3
py
Runtime Error
0
0
520
INF = float("inf") n = int(input()) A = [0] for i, a in enumerate(sys.stdin): a = list(map(int, a.split())) if i == 0: A.extend(a) else: A.append(a[1]) C = [[INF] * (n + 1) for _ in range(n + 1)] for i in range(n + 1): C[i][i] = 0 for j in range(1, n): for i in range(1, n - j + 1): ...
Traceback (most recent call last): File "/tmp/tmpna59n6sy/tmp8ortqhyg.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s609295405
p02234
u426534722
1518707586
Python
Python3
py
Runtime Error
0
0
392
INF = float("inf") n = int(input()) m = [[0] * (n + 1) for _ in range(n + 1)] li = [list(map(int, a.split())) for a in sys.stdin] z = (li[0][0], ) + list(zip(*li))[1] for l in range(1, n): for i in range(1, n - l + 1): j = i + l m[i][j] = INF for k in range(i, j): m[i][j] = min(m...
Traceback (most recent call last): File "/tmp/tmpl694aju2/tmped38g9yy.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s747777323
p02234
u150984829
1519863467
Python
Python3
py
Runtime Error
0
0
329
if'__main__'==__name__:s() def s(): n=int(input())+1 e=[input().split()for _ in[0]*~-n] p=[int(e[0][0])]+list(int(x[1])for x in e) m=[[0]*n for _ in[0]*n] for l in range(2,n): for i in range(1,n-l+1): j=i+l-1;m[i][j]=1e6 for k in range(i,j):m[i][j]=min(m[i][j],m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]) print(m[...
Traceback (most recent call last): File "/tmp/tmph58qklr4/tmpxlijr97h.py", line 1, in <module> if'__main__'==__name__:s() ^ NameError: name 's' is not defined
s289951321
p02234
u150984829
1519864656
Python
Python3
py
Runtime Error
0
0
336
def s(): n=int(input())+1 e=[input().split()for _ in[0]*~-n] p=[int(e[0][0])]+list(int(x[1])for x in e) m=[[0]*n for _ in[0]*n] for i in range(1,n): for r in range(n-i-1): c=r+i+1 for j in range(r+1,c): x=m[r][j]+m[j][c]+p[r]*p[j]*p[c] if 1>m[r][c]or m[r][c]>x:m[r][c]=x print(m[r][c]) if'__main__...
Traceback (most recent call last): File "/tmp/tmpebsfhb3o/tmpyw3woqae.py", line 13, in <module> if'__main__'==__name__:s() ^^^ File "/tmp/tmpebsfhb3o/tmpyw3woqae.py", line 2, in s n=int(input())+1 ^^^^^^^ EOFError: EOF when reading a line
s261437932
p02234
u150984829
1519864666
Python
Python3
py
Runtime Error
0
0
336
def s(): n=int(input())+1 e=[input().split()for _ in[0]*~-n] p=[int(e[0][0])]+list(int(x[1])for x in e) m=[[0]*n for _ in[0]*n] for i in range(1,n): for r in range(n-i-1): c=r+i+1 for j in range(r+1,c): x=m[r][j]+m[j][c]+p[r]*p[j]*p[c] if 1>m[r][c]or m[r][c]>x:m[r][c]=x print(m[r][c]) if'__main__...
Traceback (most recent call last): File "/tmp/tmpu_ba8kh5/tmp5ubkwm9c.py", line 13, in <module> if'__main__'==__name__:s() ^^^ File "/tmp/tmpu_ba8kh5/tmp5ubkwm9c.py", line 2, in s n=int(input())+1 ^^^^^^^ EOFError: EOF when reading a line
s476497935
p02234
u150984829
1519864693
Python
Python3
py
Runtime Error
0
0
336
def s(): n=int(input())+1 e=[input().split()for _ in[0]*~-n] p=[int(e[0][0])]+list(int(x[1])for x in e) m=[[0]*n for _ in[0]*n] for i in range(1,n): for r in range(n-i-1): c=r+i+1 for j in range(r+1,c): x=m[r][j]+m[j][c]+p[r]*p[j]*p[c] if 1>m[r][c]or m[r][c]>x:m[r][c]=x print(m[r][c]) if'__main__...
Traceback (most recent call last): File "/tmp/tmpo3b6u6xl/tmpbt189gi9.py", line 13, in <module> if'__main__'==__name__:s() ^^^ File "/tmp/tmpo3b6u6xl/tmpbt189gi9.py", line 2, in s n=int(input())+1 ^^^^^^^ EOFError: EOF when reading a line
s268589830
p02234
u007270338
1530002329
Python
Python3
py
Runtime Error
0
0
580
#coding:utf-8 import numpy as np n = int(input()) m = [[0 for i in range(n)] for j in range(n)] m = np.array(m) p = [] for i in range(n): p1,p2 = map(int,input().split()) if i == 0: p.append(p1) p.append(p2) def matrixChainMultiplication(): for i in range(n): m[i,i] = 0 for l in r...
Traceback (most recent call last): File "/tmp/tmp0ew22nnf/tmpiuwbvzun.py", line 4, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s605427680
p02234
u782850731
1380371280
Python
Python
py
Runtime Error
0
0
920
#!/usr/bin/env python from __future__ import division, print_function from sys import stdin def main(): num_mat = int(stdin.readline()) data = [int(s) for s in stdin.readline().split()] for _ in range(num_mat-1): _, row = (int(s) for s in stdin.readline().split()) data.append(row) num_...
Traceback (most recent call last): File "/tmp/tmp_6sk2h91/tmp8tzw2bgw.py", line 33, in <module> main() File "/tmp/tmp_6sk2h91/tmp8tzw2bgw.py", line 7, in main num_mat = int(stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s838154909
p02235
u072053884
1530986783
Python
Python3
py
Runtime Error
0
0
615
from string import ascii_letters def llcs(x, y): pm = dict((zip(ascii_letters, [0] * 52))) for c in pm: for i, xc in enumerate(x): if c == xc: pm[c] |= (1 << i) V = (1 << len(x)) - 1 for yc in y: V = ((V + (V & pm[yc])) | (V & ~pm[yc])) ans...
Traceback (most recent call last): File "/tmp/tmp0_pdwaf9/tmpdzn_o11m.py", line 29, in <module> solve() File "/tmp/tmp0_pdwaf9/tmpdzn_o11m.py", line 22, in solve file_input == stdin ^^^^^^^^^^ NameError: name 'file_input' is not defined
s292748472
p02235
u072053884
1530987089
Python
Python3
py
Runtime Error
0
0
699
ascii_letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' def llcs(x, y): pm = dict((zip(ascii_letters, [0] * 52))) for c in pm: for i, xc in enumerate(x): if c == xc: pm[c] |= (1 << i) V = (1 << len(x)) - 1 for yc in y: V = ((V + (V & ...
Traceback (most recent call last): File "/tmp/tmpmsbik7eq/tmpwzg4hqte.py", line 30, in <module> solve() File "/tmp/tmpmsbik7eq/tmpwzg4hqte.py", line 23, in solve file_input = open("ALDS1_10_C_in_4", 'r') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'A...
s553080879
p02235
u728137020
1531296567
Python
Python3
py
Runtime Error
0
0
518
n=int(input()) x=[0 for i in range(n)] y=[0 for i in range(n)] for i in range(n): x[i]=input() y[i]=input() for i in range(n): X=list(x[i]) Y=list(y[i]) a=[int(0) for i in range(len(X))] for j in range(len(X)): b=-1 for l in range(j,len(X)): for k in range(len(Y)): ...
File "/tmp/tmpby2jv05q/tmpzqsgxhv5.py", line 22 a=[0 for i in range(n)]a=[0 for i in range(n)] ^ SyntaxError: invalid syntax
s229506728
p02235
u196653484
1531297084
Python
Python3
py
Runtime Error
0
0
528
def main(): n=int(input()) result=[] for i in range(n): a=input() b=input() array=[[1 for i in range(len(a))] for j in range(len(b))] for i in range(1,len(a)): for j in range(1,len(b)): c=0 if a[j] == b[i]: c=1 ...
Traceback (most recent call last): File "/tmp/tmpww2qt3mk/tmpwgiym47j.py", line 18, in <module> main() File "/tmp/tmpww2qt3mk/tmpwgiym47j.py", line 2, in main n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s138926973
p02235
u196653484
1531297465
Python
Python3
py
Runtime Error
0
0
653
def main(): n = int(input()) result = [] for i in range(n): a = input() b = input() array = [[1 for i in range(len(a))] for j in range(len(b))] for i in range(1, len(a)): for j in range(1, len(b)): c = 0 if a[j] == b[i]: ...
Traceback (most recent call last): File "/tmp/tmp7s01ye21/tmp85bwbegg.py", line 21, in <module> main() File "/tmp/tmp7s01ye21/tmp85bwbegg.py", line 2, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s885388826
p02235
u064320529
1531299348
Python
Python3
py
Runtime Error
0
0
419
n=int(input()) ans=[] for k in range(n): s1=input() s2=input() dp=[[0 for i in range(len(s2)+1)] for j in range(len(s1)+1)] for i in range(1,len(s1)+1): for j in range(1,len(s2)+1): if s1[i-1]==s2[j-1]: dp[i][j]=dp[i-1][j-1]+1 else: dp[i][j...
Traceback (most recent call last): File "/tmp/tmpaknntghu/tmp5u3twdqe.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s643488204
p02235
u064320529
1531300075
Python
Python3
py
Runtime Error
0
0
419
n=int(input()) ans=[] for k in range(n): s1=input() s2=input() dp=[[0 for i in range(len(s2)+1)] for j in range(len(s1)+1)] for i in range(1,len(s1)+1): for j in range(1,len(s2)+1): if s1[i-1]==s2[j-1]: dp[i][j]=dp[i-1][j-1]+1 else: dp[i][j...
Traceback (most recent call last): File "/tmp/tmpmso_r9wq/tmpww826ix2.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s386004677
p02235
u064320529
1531300087
Python
Python3
py
Runtime Error
0
0
419
n=int(input()) ans=[] for k in range(n): s1=input() s2=input() dp=[[0 for i in range(len(s2)+1)] for j in range(len(s1)+1)] for i in range(1,len(s1)+1): for j in range(1,len(s2)+1): if s1[i-1]==s2[j-1]: dp[i][j]=dp[i-1][j-1]+1 else: dp[i][j...
Traceback (most recent call last): File "/tmp/tmpv_bfwnzq/tmpa1b23i8o.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s173399828
p02235
u776834150
1531300281
Python
Python3
py
Runtime Error
0
0
679
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int q=sc.nextInt(); int[] ans=new int[q]; for(int n=0;n<q;n++){ String X=sc.next(); String Y=sc.next(); int[][] A=new int[X.length()+1][Y.length()+1]; for(int i=1;i<X.length()+1;...
File "/tmp/tmpxqypcc14/tmp3xfc0x40.py", line 1 import java.util.*; ^ SyntaxError: invalid syntax
s121100986
p02235
u684325232
1531301514
Python
Python3
py
Runtime Error
0
0
747
def lcs(list1,list2): f=[[0 for x in range(len(list1)+1)]for y in range(len(list2)+1)]#表の確保 for j in range(len(list1)): if list1[j]==list2[0]: f[j][0]=1 for j in range(len(list2)): if list1[0]==list2[j]: f[0][j]=1 for j in range(1,len(list1)): ...
Traceback (most recent call last): File "/tmp/tmp4ggxjp28/tmp4xwyk22g.py", line 22, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s775794522
p02235
u826549974
1531542786
Python
Python3
py
Runtime Error
0
0
333
m = int(input()) for i in range(m): str1 = input() str2 = input() A = [0 for j in range(len(str2)+1)] for char1 in str1: A_copy = A[:] for char2 in str2: if(char1==char2): A[k+1] = A_copy[k]+1 elif(A[k] > A[k+1]): A[k+1] = A[k] ...
Traceback (most recent call last): File "/tmp/tmpt_0l9_ws/tmpbfcstjur.py", line 1, in <module> m = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s546266801
p02235
u826549974
1531546003
Python
Python3
py
Runtime Error
0
0
424
def LCS(str1,str2): A = [0 for _ in range(len(str2)+1)] for i in range(len(str1)): A_copy = A[:] for j in range(len(str2)): if(str1[i]==str2[j]): (int)A[j+1] = (int)A_copy[j]+1 elif((int)A[j] > (int)A[j+1]): (int)A[j+1] = (int)A[j] prin...
File "/tmp/tmp4x4i66jd/tmp2rkpt260.py", line 7 (int)A[j+1] = (int)A_copy[j]+1 ^ SyntaxError: invalid syntax
s827929005
p02235
u063056051
1531826876
Python
Python3
py
Runtime Error
0
0
294
def f(x,y): list=[0] for z in y: for i in range(len(list)-1,-1,-1): tmp=x.find(z,list[i])+1 if tmp: if i+1 < len(list): list[i+1]=min(list[i+1],tmp) else: list.append(tmp) return len(list)-1 n=int(input()) for i in range(q): x=input() y=input() print(f(x,y))
Traceback (most recent call last): File "/tmp/tmpfdnx1hkt/tmp0rfj4ntx.py", line 14, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s825135509
p02235
u843517396
1531830713
Python
Python3
py
Runtime Error
0
0
576
#include <iostream> #include <string> #include <vector> using namespace std; void input(string &x,string &y){ cin>>x>>y; } int lcs(string x,string y){ vector<vector<int>> tb(vector<vector<int>>((int)x.size()+1,vector<int>(y.size()+1,0))); for(int i=1;i<(int)x.size()+1;i++){ for(int j=1;j<(int)y.size()+1;j++){ i...
File "/tmp/tmpgu6mh9kl/tmpmus77gu4.py", line 4 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s441287210
p02235
u196653484
1531878637
Python
Python3
py
Runtime Error
0
0
880
def main(): n = int(input()) for i in range(n): a = input() b = input() na=len(a) nb=len(b) array = [[[0]*nb]**na] #array = [0 for i in range(nb)] for j in range(na)] for i in range(na): for j in range(nb): if i==0: ...
Traceback (most recent call last): File "/tmp/tmpdbd8iiuj/tmpnn95e8ht.py", line 30, in <module> main() File "/tmp/tmpdbd8iiuj/tmpnn95e8ht.py", line 3, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s853591230
p02235
u196653484
1531881844
Python
Python3
py
Runtime Error
0
0
925
from pprint import pprint def main(): fp=open("result.txt","w") n = int(input()) for i in range(n): a = input() b = input() na=len(a) nb=len(b) array = [[0]*nb for i in range(na)] #array = [[0 for i in range(nb)] for j in range(na)] for i in range(na):...
Traceback (most recent call last): File "/tmp/tmps5yimzqx/tmpvqj0p8xc.py", line 31, in <module> main() File "/tmp/tmps5yimzqx/tmpvqj0p8xc.py", line 4, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s986862818
p02235
u909075105
1531885076
Python
Python3
py
Runtime Error
0
0
336
def ask(X,Y): cost=[0] for j in Y: for i in range(len(cost)-1,-1,-1): a=X.find(c,cost[i])+1 if a: if i+1<len(cost): cost[i+1]=min(cost[i+1],a) else: cost.append(a) return len(cost)-1 q=int(input()) Z=[] for p in range(q): X=input() Y=input() z=ask(X,Y) Z.append(z) for p in range(q)...
Traceback (most recent call last): File "/tmp/tmpsab0ol76/tmpcvs91nha.py", line 15, in <module> q=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s168995961
p02235
u196653484
1531885488
Python
Python3
py
Runtime Error
0
0
579
#dj 16D8101012J ito jun def search(a,b): na=len(a) nb=len(b) array = [[0]*(nb+1) for _ in range(na+1)] for i,x in enumerate(a,1): prerow=array[i-1] row=array[i] for j,y in enumerate(b,1): if x == y: row[j]=prerow[j-1]+1 elif prerow[j] < row...
Traceback (most recent call last): File "/tmp/tmpbb2indz1/tmpfnr9fkn8.py", line 18, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s062853508
p02235
u055885332
1531891162
Python
Python3
py
Runtime Error
0
0
237
e=input a='' for _ in[0]*int(e()): X,z=e(),[] for y in e(): s=i=0 for k in z: t=X.find(y,s)+1 if t<1:break if t<k:z[i]=t s=k;i+=1 else: t=X.find(y,s)+1 if t:z+=[t] a+=f'\n{len(z)}' print(a[1:]
File "/tmp/tmprm9ywwt_/tmpkych3uqi.py", line 2 e=input IndentationError: unexpected indent
s284707019
p02235
u573915636
1531897103
Python
Python3
py
Runtime Error
0
0
539
def lcs(x,y,l,j,k): if(x[j-1]==y[k-1]): lcs(x,y,l,j-1,k-1) global c c+=1 else: if l[j-1][k]>=l[j][k-1]: lcs(x,y,l,j-1,k) else: lcs(x,y,l,j,k-1) q=int(input()) c=0 for i in range(q): x=list(input()) y=list(input()) l=[[0 for i in range(len(y)+1)] for j in range(len(x)+1)] for j in range(1, len(x) ...
Traceback (most recent call last): File "/tmp/tmp0alwf4ot/tmp5aw9z7hx.py", line 12, in <module> q=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s038618895
p02235
u896240461
1531900675
Python
Python3
py
Runtime Error
0
0
629
import numpy as np def f(i,j): if i == 0 or j == 0: if s1[i] == s2[j]: x[i][j] = 1 else: if i == 0: x[i][j] = x[i][j-1] else: x[i][j] = x[i-1][j] elif s1[i] == s2[j]: x[i][j] = max(x[i-1][j-1]+1,x[i][j-1],x[i-1][j]) ...
Traceback (most recent call last): File "/tmp/tmpat0pmhi6/tmp4a7iqkrp.py", line 16, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s685538604
p02235
u896240461
1531900759
Python
Python3
py
Runtime Error
0
0
634
import numpy as np def f(i,j): if i == 0 or j == 0: if s1[i] == s2[j]: x[i][j] = 1 else: if i == 0: x[i][j] = x[i][j-1] else: x[i][j] = x[i-1][j] elif s1[i] == s2[j]: x[i][j] = max(x[i-1][j-1]+1,x[i][j-1],x[i-1][j]) ...
Traceback (most recent call last): File "/tmp/tmp21hwttyh/tmplsn2in_5.py", line 16, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s558926883
p02235
u896240461
1531901304
Python
Python3
py
Runtime Error
0
0
668
import numpy as np import time def f(i,j): if i == 0 or j == 0: if s1[i] == s2[j]: x[i][j] = 1 else: if i == 0: x[i][j] = x[i][j-1] else: x[i][j] = x[i-1][j] elif s1[i] == s2[j]: x[i][j] = max(x[i-1][j-1]+1,x[i][j-1],x[i...
Traceback (most recent call last): File "/tmp/tmp5k7pw225/tmpldold86x.py", line 18, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s940547112
p02235
u279605379
1534710006
Python
Python3
py
Runtime Error
30
5616
906
def calc(x,y): i = len(x) j = len(y) if d[i][j]: return d[i][j] else: if i == 1: if x in y: d[i][j] = 1 return 1 else: d[i][j] = 0 return 0 elif j == 1: if y in x: ...
Traceback (most recent call last): File "/tmp/tmp45cgckwd/tmp3m93y8lf.py", line 31, in <module> q = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s255649299
p02235
u279605379
1534711717
Python
Python3
py
Runtime Error
30
5604
530
def calc(x,y): i = len(x) j = len(y) if not d[i][j] == None: return d[i][j] else: if x[-1] == y[-1]: tmp = calc(x[:-1],y[:-1])+1 d[i][j] = tmp return tmp else: tmp = max(calc(x[:-1],y),calc(x,y[:-1])) d[i][j] = tmp ...
Traceback (most recent call last): File "/tmp/tmpiz11yroy/tmpuih4r7ts.py", line 16, in <module> q = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s292355601
p02235
u800534567
1540612486
Python
Python3
py
Runtime Error
0
0
473
import sys def lcm(c,i, j): if c[i][j]>0: return c[i][j] if i==0 or j==0: return 0 elif x[i]==y[j]: c[i][j] = lcm(c,i-1,j-1)+1 return c[i][j] else: c[i][j] = max(lcm(c,i,j-1), lcm(c,i-1,j)) return c[i][j] for _ in range(int(sys.stdin.readline())): x ...
Traceback (most recent call last): File "/tmp/tmph_ujruac/tmp9t88ochr.py", line 14, in <module> for _ in range(int(sys.stdin.readline())): ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s863528664
p02235
u800534567
1540612517
Python
Python3
py
Runtime Error
0
0
473
import sys def lcm(c,i, j): if c[i][j]>0: return c[i][j] if i==0 or j==0: return 0 elif x[i]==y[j]: c[i][j] = lcm(c,i-1,j-1)+1 return c[i][j] else: c[i][j] = max(lcm(c,i,j-1), lcm(c,i-1,j)) return c[i][j] for _ in range(int(sys.stdin.readline())): x ...
Traceback (most recent call last): File "/tmp/tmpwgpebxzg/tmpj8b8nic0.py", line 14, in <module> for _ in range(int(sys.stdin.readline())): ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s729891530
p02235
u800534567
1540619369
Python
Python3
py
Runtime Error
30
5628
502
import sys def lcm(c, i, j): if c[i][j]>=0: return c[i][j] if i==0 or j==0: c[i][j]=0 return 0 elif i>0 and j>0 and x[i-1]==y[j-1]: c[i][j] = lcm(c,i-1,j-1)+1 return c[i][j] else: c[i][j] = max(lcm(c,i,j-1), lcm(c,i-1,j)) return c[i][j] for _ in range(in...
Traceback (most recent call last): File "/tmp/tmpnsqxnxoc/tmplknspa4u.py", line 15, in <module> for _ in range(int(sys.stdin.readline())): ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s171877013
p02235
u800534567
1540911101
Python
Python3
py
Runtime Error
0
0
652
#include <stdio.h> #include <string.h> int main() { int n, i, j, k, xlen, ylen; char x[1003], y[1003]; int c[1001][1001]; scanf("%d\n", &n); for (k=0; k<n; k++) { fgets(x, 1002, stdin); xlen = strlen(x); if (x[xlen-1]=='\n') x[xlen-- -1]='\0'; fgets(y, 1002, stdin); ylen = strlen(y); ...
File "/tmp/tmponlrgosn/tmp85kiwhsy.py", line 4 int main() ^^^^ SyntaxError: invalid syntax
s002782513
p02235
u800534567
1540911477
Python
Python3
py
Runtime Error
0
0
806
#include <stdio.h> #include <string.h> int main() { int n, i, j, k, xlen, ylen; char x[1003], y[1003]; int c[1001][1001]; char buf[20]; buf[19]='\0'; scanf("%d\n", &n); for (k=0; k<n; k++) { fgets(x, 1002, stdin); xlen = strlen(x); if (x[xlen-1]=='\n') x[xlen-- -1]='\0'; fgets(y, 1002, st...
File "/tmp/tmpkmi7khdg/tmpjcq905q_.py", line 4 int main() ^^^^ SyntaxError: invalid syntax
s717974030
p02235
u815930811
1545969720
Python
Python3
py
Runtime Error
0
0
707
import sys def dp_init(m, n): return [[0] * n] * m def solve(str_a, str_b): dp = dp_init(len(str_a), len(str_b)) return rec(len(str_a), len(str_b), str_a, str_b, dp) def rec(i, j, str_a, str_b, dp): if i == 0 or j == 0: return 0 if dp[i][j] > 0: return dp[i][j] if str_a[i-1] =...
Traceback (most recent call last): File "/tmp/tmpzesjbnwf/tmp1gn506c4.py", line 21, in <module> nb_pairs = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s119059486
p02235
u815930811
1545974242
Python
Python3
py
Runtime Error
30
5624
1111
import sys def dp_init(m, n): ret = [] for i in range(m): ret.append([None] * n) return ret def solve(str_a, str_b): dp = dp_init(len(str_a)+1, len(str_b)+1) #pring(dp) return rec(len(str_a), len(str_b), str_a, str_b, dp, 0) def rec(i, j, str_a, str_b, dp, depth): if dp[i][j] is n...
Traceback (most recent call last): File "/tmp/tmpleskauhs/tmp1l501asl.py", line 31, in <module> nb_pairs = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s099401839
p02235
u815930811
1545975934
Python
Python3
py
Runtime Error
20
5632
1141
import sys LEN_MAX = 1000 sys.setrecursionlimit(LEN_MAX + 3) def dp_init(m, n): ret = [] for i in range(m): ret.append([None] * n) return ret def solve(str_a, str_b): dp = dp_init(len(str_a)+1, len(str_b)+1) #print(dp) return rec(len(str_a), len(str_b), str_a, str_b, dp, 0) def rec(i...
Traceback (most recent call last): File "/tmp/tmp81ugpgeb/tmpi2jh50go.py", line 33, in <module> nb_pairs = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s088450500
p02235
u981699375
1546306366
Python
Python3
py
Runtime Error
0
0
1620
import std.array, std.stdio, std.conv, std.string, std.math, std.random, std.range,std.functional, std.typecons; import std.algorithm.searching, std.algorithm.sorting, std.algorithm.iteration, std.algorithm.comparison; int[][char] memo; int[][] memo2; void main() { int Q = readln().strip.to!int; foreach(i;...
File "/tmp/tmphjyb6li4/tmpv2hbf1tv.py", line 5 int[][char] memo; ^ SyntaxError: invalid syntax
s908502550
p02235
u705443629
1556615019
Python
Python3
py
Runtime Error
0
0
431
import numpy as np q = int(input()) for _ in range(q): X = np.array([ord(i) for i in input()]) Y = np.array([ord(i) for i in input()]) NX = len(X) NY = len(Y) dp = np.zeros((NX+1,NY+1), dtype=np.int64) for x in range(NX): yes = Y == X[x] no = Y != X[x] dp[x+1][1:][yes] =...
Traceback (most recent call last): File "/tmp/tmpib6ps_mu/tmpcq1sv3v9.py", line 2, in <module> q = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s384087325
p02235
u809822290
1435815398
Python
Python
py
Runtime Error
0
0
529
from sys import stdin X = [ 0 for i in range(1000) ] Y = [ 0 for i in range(1000) ] def getLCS() : xlen = len(X[l]) ylen = len(Y[l]) Z = [[0 for i in range(xlen+2)]for i in range(ylen+2)] for i in range(1,xlen+1) : for j in range(1,ylen+1) : if X[i-1] == Y[j-1] : Z[i][j] = Z[i-1][j-1] + 1 elif Z[i-1][j]...
Traceback (most recent call last): File "/tmp/tmph0uhr7sr/tmpo4dkp1at.py", line 20, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s607509706
p02235
u809822290
1435815421
Python
Python3
py
Runtime Error
0
0
530
from sys import stdin X = [ 0 for i in range(1000) ] Y = [ 0 for i in range(1000) ] def getLCS() : xlen = len(X[l]) ylen = len(Y[l]) Z = [[0 for i in range(xlen+2)]for i in range(ylen+2)] for i in range(1,xlen+1) : for j in range(1,ylen+1) : if X[i-1] == Y[j-1] : Z[i][j] = Z[i-1][j-1] + 1 elif Z[i-1][j...
Traceback (most recent call last): File "/tmp/tmpf7kh4_z_/tmpl7i9resk.py", line 21, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s085572067
p02235
u809822290
1435823941
Python
Python3
py
Runtime Error
90
15436
489
from sys import stdin X = [ 0 for i in range(1000) ] Y = [ 0 for i in range(1000) ] Z = [[0 for i in range(1000)]for i in range(1000)] def getLCS(l) : xlen = len(X[l]) ylen = len(Y[l]) for i in range(1,xlen+1) : for j in range(1,ylen+1) : a = 1 if X[l][i-1] == Y[l][j-1] else 0 Z[i][j] = max(Z[i-1][j-1] + ...
Traceback (most recent call last): File "/tmp/tmp04cef7i6/tmpetj5t07u.py", line 18, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s954822595
p02235
u809822290
1435824051
Python
Python3
py
Runtime Error
40
6764
487
from sys import stdin X = [ 0 for i in range(1000) ] Y = [ 0 for i in range(1000) ] Z = [[0 for i in range(100)]for i in range(100)] def getLCS(l) : xlen = len(X[l]) ylen = len(Y[l]) for i in range(1,xlen+1) : for j in range(1,ylen+1) : a = 1 if X[l][i-1] == Y[l][j-1] else 0 Z[i][j] = max(Z[i-1][j-1] + a,...
Traceback (most recent call last): File "/tmp/tmptu6x2rqt/tmpv_gcw3kk.py", line 18, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s103074762
p02235
u881590806
1450190669
Python
Python
py
Runtime Error
210
72716
420
q = int(raw_input()) lcs = {} for i in range(1000): lcs[i] = {} for j in range(1000): lcs[i][j] = 0 for i in range(q): X = raw_input() Y = raw_input() for i in range(len(X)): for j in range(len(Y)): if X[i] == Y[j]: lcs[i+1][j+1] = lcs[i][j] + 1 ...
File "/tmp/tmp8kyve0dq/tmpeg13du92.py", line 18 print lcs[len(X)][len(Y)] ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s841858097
p02235
u488601719
1450345015
Python
Python
py
Runtime Error
0
0
414
def lcb(): A = raw_input() B = raw_input() m = len(A) n = len(B) dp = [[0 for i in range(n)] for j in range(m)] for i in range(1, m): for j in range(1, n): if A[i] == B[j]: dp[i][j] = dp[i - 1][j - 1] + 1 else: dp[i][j] = max(dp[...
File "/tmp/tmp3awqmwee/tmpzghy5w66.py", line 21 print lcb() ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s381609110
p02235
u970436839
1453256078
Python
Python
py
Runtime Error
0
0
350
def lcs_size(): X = input() Y = input() a = len(X) b = len(Y) for i in range(a): for j in range(b): c[i][j] = 0 if X[i] == Y[j]: c[i][j] = c[i-1][j-1] + 1 else: c[i][j] = max(c[i-1][j], c[i][j-1]) maxl = max(maxl, c[i][j]) return maxl q = input() for i ...
File "/tmp/tmpnae82bzx/tmp1t3p0k6g.py", line 22 print lcs_siz() ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s928400638
p02235
u970436839
1453256249
Python
Python
py
Runtime Error
0
0
346
def lcs_size(): X = input() Y = input() a = len(X) b = len(Y) c[1][1] = 0 for i in range(a): for j in range(b): if X[i] == Y[j]: c[i][j] = c[i-1][j-1] + 1 else: c[i][j] = max(c[i-1][j], c[i][j-1]) maxl = max(maxl, c[i][j]) return maxl q = input() for i in r...
File "/tmp/tmp4911xsop/tmphv4q65yl.py", line 22 print lcs_siz() ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s279209946
p02235
u970436839
1453256397
Python
Python
py
Runtime Error
0
0
346
def lcs_size(): X = input() Y = input() a = len(X) b = len(Y) c[0][0] = 0 for i in range(a): for j in range(b): if X[i] == Y[j]: c[i][j] = c[i-1][j-1] + 1 else: c[i][j] = max(c[i-1][j], c[i][j-1]) maxl = max(maxl, c[i][j]) return maxl q = input() for i in r...
File "/tmp/tmpanj20gn2/tmpic1w4h0i.py", line 22 print lcs_siz() ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s533200285
p02235
u970436839
1453256458
Python
Python
py
Runtime Error
0
0
354
def lcs_size(): X = input() Y = input() a = len(X) b = len(Y) c[0][0] = 0 for i in range(a): for j in range(b): if X[i] == Y[j]: c[i+1][j+1] = c[i][j] + 1 else: c[i+1][j+1] = max(c[i][j+1], c[i+1][j]) maxl = max(maxl, c[i+1][j+1]) return maxl q = input() fo...
File "/tmp/tmpiq_3x21y/tmpt95af1tg.py", line 22 print lcs_siz() ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s447734867
p02235
u970436839
1453256689
Python
Python
py
Runtime Error
0
0
380
def lcs_size(): X = input() Y = input() a = len(X) b = len(Y) c = [[0 for i in range(a)] for j in range(b)] for i in range(a): for j in range(b): if X[i] == Y[j]: c[i][j] = c[i-1][j-1] + 1 else: c[i][j] = max(c[i-1][j], c[i][j-1]) maxl = max(maxl, c[i][j]) re...
File "/tmp/tmpug0tvp7k/tmp5o7x1ni2.py", line 22 print lcs_siz() ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s824293742
p02235
u970436839
1453256759
Python
Python
py
Runtime Error
0
0
392
def lcs_size(): X = input() Y = input() a = len(X) b = len(Y) c = [[0 for i in range(a+1)] for j in range(b+1)] for i in range(a): for j in range(b): if X[i] == Y[j]: c[i+1][j+1] = c[i][j] + 1 else: c[i+1][j+1] = max(c[i][j+1], c[i+1][j]) maxl = max(maxl, c[i+1][j...
File "/tmp/tmpa1kynntb/tmp8mv_pbrj.py", line 22 print lcs_siz() ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s965765739
p02235
u970436839
1453256928
Python
Python
py
Runtime Error
0
0
403
def lcs_size(): X = input() Y = input() a = len(X) b = len(Y) c = [[0 for i in range(a+1)] for j in range(b+1)] maxl = 0 for i in range(a): for j in range(b): if X[i] == Y[j]: c[i+1][j+1] = c[i][j] + 1 else: c[i+1][j+1] = max(c[i][j+1], c[i+1][j]) maxl = max(max...
File "/tmp/tmpqaokx25n/tmpxvfchtjg.py", line 23 print lcs_siz() ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s516667992
p02235
u970436839
1453257235
Python
Python
py
Runtime Error
0
0
411
def lcs_size(): X = input() Y = input() a = len(X) b = len(Y) c = [[0 for i in range(a+1)] for j in range(b+1)] maxl = 0 for i in range(a): for j in range(b): if X[i] == Y[j]: c[i+1][j+1] = c[i][j] + 1 elif c[i+1][j+1] < c[i][j+1]: c[i+1][j+1] = c[i][j+1] maxl =...
File "/tmp/tmpnljy3pmv/tmpz3rgd5d4.py", line 23 print lcs_siz() ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s454273292
p02235
u970436839
1453257336
Python
Python
py
Runtime Error
0
0
405
def lcs_size(): X = input() Y = input() a = len(X) b = len(Y) c = [[0 for i in range(a+1)] for j in range(b+1)] maxl = 0 for i in range(a): for j in range(b): if X[i] == Y[j]: c[i][j+1] = c[i][j] + 1 elif c[i+1][j+1] < c[i][j+1]: c[i][j+1] = c[i][j+1] maxl = max...
File "/tmp/tmplfcakv3b/tmpqfab03g5.py", line 23 print lcs_siz() ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s707247152
p02235
u970436839
1453257501
Python
Python
py
Runtime Error
0
0
403
def lcs_size(): X = input() Y = input() a = len(X) b = len(Y) c = [[0 for i in range(a+1)] for j in range(b+1)] maxl = 0 for i in range(a): for j in range(b): if X[i] == Y[j]: c[i][j+1] = c[i][j] + 1 elif c[i][j+1] < c[i][j+1]: c[i][j+1] = c[i][j+1] maxl = max(m...
File "/tmp/tmpg976mgqw/tmpn47dlpdn.py", line 23 print lcs_siz() ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s944556925
p02235
u970436839
1453257661
Python
Python
py
Runtime Error
0
0
363
def lcs_size(): X = input() Y = input() a = len(X) b = len(Y) z2 = [0 for in range(b+1)] maxl = 0 for i in range(a): z1 = z2 + [] for j in range(b): if X[i] == Y[j]: z2[j+1] = z1[j] + 1 else: z2[j+1] = z1[j] maxl = max(maxl, z2[j+1]) return maxl q = in...
File "/tmp/tmpudhaygi2/tmp924se2q_.py", line 8 z2 = [0 for in range(b+1)] ^^ SyntaxError: invalid syntax