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
s408375639
p00431
u599161451
1360392663
Python
Python
py
Runtime Error
19930
4296
1026
def foo(nw, visited): last = visited[-1] r = 0 for k in nw[last]: if k not in visited: v = foo(nw, visited + (k,)) else: v = len(visited) if r < v: r = v return r def findlongetstpath(nw): return max([foo(nw, (k,)) for k in nw.keys()]) ...
File "/tmp/tmph65s8s8u/tmpocuq5bhq.py", line 44 print findlongetstpath(nw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s300252241
p00431
u599161451
1360392856
Python
Python
py
Runtime Error
19930
4296
1042
#!/usr/bin/python def foo(nw, visited): last = visited[-1] r = 0 for k in nw[last]: if k not in visited: v = foo(nw, visited + (k,)) else: v = len(visited) if r < v: r = v return r def findlongetstpath(nw): return max([foo(nw, (k,)) for k...
File "/tmp/tmpzbis79is/tmp33fv1zrt.py", line 44 print findlongetstpath(nw) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s803655381
p00431
u604412493
1378276626
Python
Python
py
Runtime Error
0
0
922
import sys from copy import deepcopy #fp = open("input.txt", "r") fp = sys.stdin def countLength(chain, start, prev): node = chain[start][:] if not node: return 0 chain[start] = [] max_len = 0 for i in node: if i == prev: continue cloned = deepcopy(chain) ...
File "/tmp/tmpo62b1fyv/tmpwn4va32c.py", line 39 print max_len ^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s614180489
p00431
u604412493
1378276722
Python
Python
py
Runtime Error
0
0
942
import sys #fp = open("input.txt", "r") fp = sys.stdin def deepcopy(li): return [i for i in li] def countLength(chain, start, prev): node = chain[start][:] if not node: return 0 chain[start] = [] max_len = 0 for i in node: if i == prev: continue cloned = de...
File "/tmp/tmp8a2_ahir/tmpl0ujmx1d.py", line 41 print max_len ^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s461681137
p00431
u604412493
1378276924
Python
Python
py
Runtime Error
0
0
945
import sys #fp = open("input.txt", "r") fp = sys.stdin def deepcopy(li): return [i for i in li] def countLength(chain, start, prev): node = chain[start][:] if not node: return 0 chain[start] = [] max_len = 0 for i in node: if i == prev: continue cloned = de...
File "/tmp/tmp8kzu4um3/tmpoizuww31.py", line 41 print max_len ^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s513184950
p00431
u604412493
1378277008
Python
Python
py
Runtime Error
0
0
342
import sys #fp = open("input.txt", "r") fp = sys.stdin while True: n = int(fp.readline()[:-1]) if n == 0: break chain = [[] for i in xrange(n)] for i in xrange(n): string = map(int , fp.readline()[:-1].split(" ")) chain[string[0]-1].append(string[1]-1) chain[string[1]-...
Traceback (most recent call last): File "/tmp/tmp7xm_yabn/tmpgw48xy4_.py", line 7, in <module> n = int(fp.readline()[:-1]) ^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s662529535
p00431
u604412493
1378277231
Python
Python
py
Runtime Error
0
0
330
import sys fp = sys.stdin while True: n = int(fp.readline()[:-1]) if n == 0: break chain = [[] for i in xrange(n)] for i in xrange(n): string = map(int , fp.readline()[:-1].split(" ")) chain[string[0]-1].append(string[1]-1) chain[string[1]-1].append(string[0]-1) pr...
File "/tmp/tmpjnukcep2/tmphbm2rz3o.py", line 15 print 'hoge' ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s103399316
p00431
u604412493
1378277277
Python
Python
py
Runtime Error
0
0
304
import sys fp = sys.stdin while True: n = int(fp.readline()[:-1]) if n == 0: break cha = [[] for i in xrange(n)] for i in xrange(n): st = map(int , fp.readline()[:-1].split(" ")) cha[st[0]-1].append(st[1]-1) cha[st[1]-1].append(st[0]-1) print 'hoge'
File "/tmp/tmpep63ne8f/tmprls43m_k.py", line 15 print 'hoge' ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s822001992
p00431
u604412493
1378277341
Python
Python
py
Runtime Error
0
0
317
import sys fp = sys.stdin while True: n = int(fp.readline()[:-1]) if n == 0: break hoge = [[] for i in xrange(n)] for i in xrange(n): fuga = map(int , fp.readline()[:-1].split(" ")) hoge[fuga[0]-1].append(fuga[1]-1) hoge[fuga[1]-1].append(fuga[0]-1) print 'hoge'
File "/tmp/tmp_jbhuygx/tmpdpeh686u.py", line 15 print 'hoge' ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s872762646
p00431
u604412493
1378277428
Python
Python
py
Runtime Error
0
0
357
import sys fp = sys.stdin while True: n = int(fp.readline()[:-1]) if n == 0: break chain = [] for i in xrange(n): chain.append([]) for i in xrange(n): string = map(int , fp.readline()[:-1].split(" ")) chain[string[0]-1].append(string[1]-1) chain[string[1]-1]...
File "/tmp/tmp0u9jzzuw/tmpytbw587o.py", line 16 print 'hoge' ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s968647875
p00432
u352394527
1531143083
Python
Python3
py
Runtime Error
0
0
1184
def main(): while True: n, r = map(int, input().split()) if n == 0: break plst = [] minx = miny = 20000 maxx = maxy = 0 for _ in range(n): x1, y1, x2, y2 = map(int, input().split()) minx = min(minx, x1) miny = min(miny, y1) maxx = max(maxx, x2) maxy = max(ma...
Traceback (most recent call last): File "/tmp/tmpbl0rfcw0/tmpr8dk7hs_.py", line 48, in <module> main() File "/tmp/tmpbl0rfcw0/tmpr8dk7hs_.py", line 3, in main n, r = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s354496116
p00432
u898097781
1467373196
Python
Python
py
Runtime Error
0
0
495
import numpy as np import csv area = np.zeros([10002,10002]) fw = open('output.txt', 'w') with open('input.txt') as f: data = [line for line in csv.reader(f, delimiter=' ')] n, r = data[0] for i in range(1, n+1): area[data[i][0]:data[i][2]+1,data[i][1]:data[i][3]+1] = 1 menseki = len(np.nonzero(area)[0]) fw.writ...
Traceback (most recent call last): File "/tmp/tmphsutuh1k/tmpljgiuj8a.py", line 8, in <module> with open('input.txt') as f: ^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'input.txt'
s096748458
p00432
u898097781
1467373564
Python
Python
py
Runtime Error
0
0
467
import numpy as np import csv area = np.zeros([10002,10002]) while (line=raw_input()): n, r = map(int, line.split(' ')) for i in xrange(n): line = raw_input() data = map(int, line.split(' ')) area[data[0]:data[2]+1,data[1]:data[3]+1] = 1 menseki = len(np.nonzero(area)[0]) print '{}\n'.format(menseki) ...
File "/tmp/tmp3zp4d3k1/tmp073f1a6b.py", line 6 while (line=raw_input()): ^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
s087314575
p00432
u898097781
1467374317
Python
Python
py
Runtime Error
0
0
634
import numpy as np import csv while 1: line=raw_input() n, r = map(int, line.split(' ')) if n == 0: break data = [] for i in xrange(n): line = raw_input() data.append(map(int, line.split(' '))) data = np.array(data) X = np.max(data[:,2]) Y = np.max(data[:,3]) area = np.zeros([X,Y]) for d in da...
File "/tmp/tmpz43jd8a7/tmp33n4hzvr.py", line 26 print '{}\n'.format(menseki) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s853372972
p00432
u898097781
1467374393
Python
Python
py
Runtime Error
0
0
742
import numpy as np import csv while 1: line=raw_input() n, r = map(int, line.split(' ')) if n == 0: break data = [] for i in xrange(n): line = raw_input() data.append(map(int, line.split(' '))) data = np.array(data) X = np.max(data[:,2]) Y = np.max(dat...
File "/tmp/tmp4tnmhbce/tmpgcars4b5.py", line 26 print '{}\n'.format(menseki) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s330907972
p00432
u898097781
1467374515
Python
Python
py
Runtime Error
0
0
738
import numpy as np import csv while 1: line=raw_input() n, r = map(int, line.split(' ')) if n == 0: break data = [] for i in xrange(n): line = raw_input() data.append(map(int, line.split(' '))) data = np.array(data) X = np.max(data[:,2]) Y = np.max(dat...
File "/tmp/tmp0azddn_b/tmp58rrq10k.py", line 26 print '{}'.format(menseki) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s125920835
p00432
u898097781
1467374652
Python
Python
py
Runtime Error
0
0
749
import numpy as np import csv while 1: line=raw_input() n, r = map(int, line.split(' ')) if n == 0 and r == 0: break data = [] for i in xrange(n): line = raw_input() data.append(map(int, line.split(' '))) data = np.array(data) X = np.max(data[:,2]) Y =...
File "/tmp/tmp6wjo4s4y/tmpsv22samy.py", line 26 print '{}'.format(menseki) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s316020388
p00432
u898097781
1467374667
Python
Python
py
Runtime Error
0
0
18
import numpy as np
s422231041
p00432
u898097781
1467376485
Python
Python
py
Runtime Error
0
0
911
import numpy import csv while 1: line=raw_input() n, r = map(int, line.split(' ')) if n == 0 and r == 0: break data = [] for i in xrange(n): line = raw_input() data.append(map(int, line.split(' '))) X = max(map(lambda x:x[2],data)) Y = max(map(lambda x:x[3],data)) area = [[0 for x in xrange(X+2)] ...
File "/tmp/tmpjfzxead3/tmpshz5ct97.py", line 36 print '{}'.format(menseki) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s791075335
p00432
u898097781
1467376645
Python
Python
py
Runtime Error
0
0
19
from numpy import *
s486957006
p00432
u662488567
1480422275
Python
Python3
py
Runtime Error
0
0
1790
from itertools import chain with 0 as efafe: max_size = 10002 while 1: n, r = (int(i) for i in input().strip().split()) if n == r == 0: break flag = False if r == 2 else True sheets = dict() max_size = 0 for i in range(n): points = tuple(int(i) + 1 for i in input().strip().sp...
Traceback (most recent call last): File "/tmp/tmpnnghpi1v/tmph61japte.py", line 5, in <module> with 0 as efafe: TypeError: 'int' object does not support the context manager protocol
s429466156
p00432
u662488567
1480422319
Python
Python3
py
Runtime Error
0
0
1654
max_size = 10002 while 1: n, r = (int(i) for i in input().strip().split()) if n == r == 0: break flag = False if r == 2 else True sheets = dict() max_size = 0 for i in range(n): points = tuple(int(i) + 1 for i in input().strip().split()) max_size = max(max_size, max(points)) sheets[points[0...
Traceback (most recent call last): File "/tmp/tmpb0s9kx9_/tmpa51ax5g9.py", line 3, in <module> n, r = (int(i) for i in input().strip().split()) ^^^^^^^ EOFError: EOF when reading a line
s969199506
p00432
u368408684
1514081695
Python
Python3
py
Runtime Error
0
0
3606
class All_Column: def __init__(self, rec_num): self.rec_num = rec_num self.x_stack = [] self.y_stack = [0 for i in range(10002)] def add(self, x, up, down): if self.y_stack[x+1] == 0: self.x_stack.append(x) self.y_stack[x+1] = One_Column(x, up, down) else: self.y_stack[x+1].add(up, down) d...
Traceback (most recent call last): File "/tmp/tmpf3ko8hdy/tmpex55cqsh.py", line 87, in <module> line = input() ^^^^^^^ EOFError: EOF when reading a line
s359742594
p00432
u846136461
1514197262
Python
Python
py
Runtime Error
0
0
516
# coding: utf-8 field = [] for i in range(99): line = [] for j in range(99): line.append(0) field.append(line) while True: n, r = map(int, raw_input().split()) if n == 0: break else: for _ in range(n): data = map(int, raw_input().split()) x_start = data[0] y_start = data[1] x_end = data[2] ...
Traceback (most recent call last): File "/tmp/tmpgt16coil/tmpy71xgrx6.py", line 11, in <module> n, r = map(int, raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s391148490
p00432
u599161451
1362030742
Python
Python
py
Runtime Error
19920
211212
1608
#!/usr/bin/python def readints(line): return map(int, line.split()) def mark(d, p): m = d.get(p, 0) d[p] = m + 1 def chunker(f): while True: line = f.readline() n, r = readints(line) if n == 0 and r == 0: raise StopIteration tiles = set() v_test = ...
File "/tmp/tmp243wgsk4/tmpex1817wm.py", line 59 print ans[0] ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s457581368
p00433
u814278309
1559224779
Python
Python3
py
Runtime Error
0
0
150
while True: a,b,c,d=map(int,input().split()) e,f,g,h=map(int,input().split()) x=a+b+c+d y=e+f+g+h if x<y: print(y) else: print(x)
Traceback (most recent call last): File "/tmp/tmpvipan5un/tmp5ugvkwup.py", line 2, in <module> a,b,c,d=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s876651820
p00433
u814278309
1559224812
Python
Python3
py
Runtime Error
0
0
151
while True: a,b,c,d=map(int,input().split()) e,f,g,h=map(int,input().split()) x=a+b+c+d y=e+f+g+h if x<=y: print(y) else: print(x)
Traceback (most recent call last): File "/tmp/tmpxr4140ny/tmp3qmm59qt.py", line 2, in <module> a,b,c,d=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s011850113
p00433
u340500592
1499407104
Python
Python3
py
Runtime Error
0
0
98
A = list(map(input().split()) B = list(map(input().split()) max = max([max(A), max(B)]) print(max)
File "/tmp/tmp_025aq5q/tmplhygulyc.py", line 1 A = list(map(input().split()) ^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma?
s025754458
p00433
u340500592
1499407143
Python
Python3
py
Runtime Error
0
0
100
A = list(map(input().split())) B = list(map(input().split())) max = max([max(A), max(B)]) print(max)
Traceback (most recent call last): File "/tmp/tmpiq9r6z_c/tmpokqgrg68.py", line 1, in <module> A = list(map(input().split())) ^^^^^^^ EOFError: EOF when reading a line
s148029152
p00433
u256256172
1508404461
Python
Python3
py
Runtime Error
0
0
80
a = map(int, input().split()) b = map(int, input().split()) print(max(sum(a,b)))
Traceback (most recent call last): File "/tmp/tmpa0yhwjd1/tmplqyr_7o8.py", line 1, in <module> a = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s031809613
p00433
u915761101
1357141530
Python
Python
py
Runtime Error
0
0
170
magro = 0 saba = [] saba=map(int,raw_input().split(‘ ‘)) #print(“ika”) ika=map(int,raw_input().split(‘ ‘)) print(max(sum(saba), sum(ika))) neko = 0 hage = 90
File "/tmp/tmpamrm25gj/tmp3d_4_zw5.py", line 4 saba=map(int,raw_input().split(‘ ‘)) ^ SyntaxError: invalid character '‘' (U+2018)
s681868785
p00433
u604412493
1377610160
Python
Python
py
Runtime Error
0
0
449
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ //$fp = fopen("input.txt", "r"); $fp = fopen("php://stdin", "r"); $str = explode(" ", rtrim(fgets($fp))); $sum_a = 0; for($i = 0; $i < 4; $i++) { $sum_a += (int)($str[$i]); } $str = explode(" ", rtrim(fgets($...
File "/tmp/tmpwna0v9h8/tmp4s0j0qvn.py", line 1 <?php ^ SyntaxError: invalid syntax
s399389804
p00433
u180584272
1379908308
Python
Python
py
Runtime Error
0
0
104
from sys import stdin print max(map(sum,map(lambda s: map(int,s.split(' ')), stdin.read().split('\n'))))
File "/tmp/tmpkq71ga_f/tmpchg29rkv.py", line 2 print max(map(sum,map(lambda s: map(int,s.split(' ')), stdin.read().split('\n')))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s506265126
p00433
u229085388
1391313053
Python
Python
py
Runtime Error
0
0
125
a = sum(map(int, input().split())) b = sum(map(int, input().split())) print (max(a,b))
Traceback (most recent call last): File "/tmp/tmp2txjk7zt/tmpv1xmos1j.py", line 1, in <module> a = sum(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s131634179
p00433
u633068244
1395076924
Python
Python
py
Runtime Error
0
0
90
s = sum(map(int, raw_input().split()) t = sum(map(int, raw_input().split()) print max(s,t)
File "/tmp/tmp__mdm3c2/tmp5zaz234z.py", line 1 s = sum(map(int, raw_input().split()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma?
s915608709
p00434
u811773570
1475423262
Python
Python3
py
Runtime Error
0
0
150
a = [False for i in range(31)] for i in range(30): x = int(input()) a[x] = True for i in range(1, 30): if a[i] == False: print(i)
Traceback (most recent call last): File "/tmp/tmppccbk6gy/tmpzns9h706.py", line 4, in <module> x = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s602690473
p00434
u662488567
1480607875
Python
Python3
py
Runtime Error
0
0
119
students = list(range(30)) [students.remove(int(input())) for _ in range(28)] [print(student) for student in students]
Traceback (most recent call last): File "/tmp/tmpnuaiyoxu/tmp8u29s85m.py", line 2, in <module> [students.remove(int(input())) for _ in range(28)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/tmpnuaiyoxu/tmp8u29s85m.py", line 2, in <listcomp> [students.remove(int(input())) for _ in rang...
s516427086
p00434
u147801965
1375165948
Python
Python
py
Runtime Error
0
0
98
c=0 for i,j in enumerate(sorted([input() for i in range(30)])): c+=1 if c!=j:print c ;c+=1
File "/tmp/tmp41x99v9n/tmpjiw6e5o5.py", line 4 if c!=j:print c ;c+=1 ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s157381340
p00434
u350508326
1392653129
Python
Python
py
Runtime Error
0
0
162
data = [x + 1 for x in xrange(30)] # print(data) for i in xrange(30): a = int(raw_input()) data.remove(a) # print(data) for i in data: print(i)
Traceback (most recent call last): File "/tmp/tmpsxt62qi1/tmpvyfvq8g7.py", line 1, in <module> data = [x + 1 for x in xrange(30)] ^^^^^^ NameError: name 'xrange' is not defined. Did you mean: 'range'?
s561461607
p00434
u633068244
1395077246
Python
Python
py
Runtime Error
0
0
121
ref = set[i for i in range(1,31)] for i in range(28): ls.append(i) print "".join(map(str, sorted(list(ref-set(ls)))))
File "/tmp/tmpymxoj0q4/tmp1rngwq92.py", line 1 ref = set[i for i in range(1,31)] ^^^ SyntaxError: invalid syntax
s619496977
p00434
u633068244
1395077684
Python
Python
py
Runtime Error
0
0
108
ref = [i for i in range(1,31)] for i in range(28): ref.pop(int(raw_input())-1) for i in ref: print i
File "/tmp/tmpprahy7hb/tmpzhs7habn.py", line 5 print i ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s079789536
p00435
u436259757
1540874948
Python
Python3
py
Runtime Error
0
0
203
x = input() str_list = list(x) dict_ = { } for a in str_list: if ord(a) - 3 < 65: print(chr(90 - 65 - ord(a) - 3) ,end = "") else: print(chr(ord(a) - 3) ,end = "") print()
Traceback (most recent call last): File "/tmp/tmp8fndkxrh/tmp6efwann_.py", line 1, in <module> x = input() ^^^^^^^ EOFError: EOF when reading a line
s400174153
p00435
u855694108
1506840483
Python
Python3
py
Runtime Error
0
0
347
def main(): d = list(input()) alp = [chr(i) for i in range(65, 65 + 26)] for x in range(len(d)): idx = alp.index(d[x]) - 3 if idx < 0: idx = 26 - idx else: pass d[x] = alp[idx] ans = "" for x in d: ans += x print(ans) if __name_...
Traceback (most recent call last): File "/tmp/tmpafpxl4v2/tmpdtlp6eju.py", line 20, in <module> main() File "/tmp/tmpafpxl4v2/tmpdtlp6eju.py", line 2, in main d = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s709109573
p00435
u855694108
1506840584
Python
Python3
py
Runtime Error
0
0
347
def main(): d = list(input()) alp = [chr(i) for i in range(65, 65 + 26)] for x in range(len(d)): idx = alp.index(d[x]) - 3 if idx < 0: idx = 26 - idx else: pass d[x] = alp[idx] ans = "" for x in d: ans += x print(ans) if __name_...
Traceback (most recent call last): File "/tmp/tmp4q3ncydr/tmpgx7c9m2_.py", line 20, in <module> main() File "/tmp/tmp4q3ncydr/tmpgx7c9m2_.py", line 2, in main d = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s552226413
p00435
u633068244
1397317793
Python
Python
py
Runtime Error
0
0
116
dic="ABCDEFGHIJKLMNOPQRSTUVWXYZ" code=raw_input() ans="" for w in code: ans+=dic[(dic.index(w)+24)%27] print ans
File "/tmp/tmp5k7h4j38/tmpv6y69wje.py", line 6 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s027047566
p00436
u545973195
1475153439
Python
Python3
py
Runtime Error
0
0
289
import copy n=int(input()) m=int(input()) card=[i for i in range(2n+1)] sub=[] for i in range(m): move=int(input()) if move!=0: sub+=card[k:] sub+=card[:k] else: for i in range(n+1): sub+=card[i] sub+=card[n+i] card=copy.deepcopy(sub) for i in range(2n+1): print(card[i])
File "/tmp/tmpwmk8rk54/tmp313shmr3.py", line 4 card=[i for i in range(2n+1)] ^ SyntaxError: invalid decimal literal
s042965869
p00436
u545973195
1475153619
Python
Python3
py
Runtime Error
0
0
287
import copy n=int(input()) m=int(input()) card=[i for i in range(1,2n+1)] sub=[] for i in range(m): move=int(input()) if move!=0: sub+=card[k:] sub+=card[:k] else: for j in range(n): sub+=card[j] sub+=card[n+j] card=copy.deepcopy(sub) for i in range(2n): print(card[i])
File "/tmp/tmp8vfztaov/tmpb_sfw0vl.py", line 4 card=[i for i in range(1,2n+1)] ^ SyntaxError: invalid decimal literal
s031462071
p00436
u545973195
1475153794
Python
Python3
py
Runtime Error
0
0
323
import copy n=int(input()) m=int(input()) card=[i for i in range(1,2n+1)] sub=[] for i in range(m): move=int(input()) if move!=0: sub.append(card[k:]) sub.append(card[:k]) else: for j in range(n): sub.append(card[j]) sub.append(card[n+j]) card=copy.deepcopy(sub) sub=[] for i in range(2n): print(card[...
File "/tmp/tmpdgyk8yqd/tmp9ywu730j.py", line 4 card=[i for i in range(1,2n+1)] ^ SyntaxError: invalid decimal literal
s407324175
p00436
u633068244
1395078493
Python
Python
py
Runtime Error
0
0
317
n = int(raw_input()) deck = [i for i in range(1,2*n+1)] m = int(raw_input()) for i in range(m): k = int(raw_input()) if k == 0: deck1 = [] for j in range(n): deck1 += deck[i]+deck[n+i] deck = deck1 elif: deck = deck[k+1:]+deck[:k+1] for i in deck: print deck
File "/tmp/tmpv48u_cx9/tmpj2k4prpa.py", line 11 elif: ^ SyntaxError: invalid syntax
s624432675
p00437
u811434779
1440132709
Python
Python
py
Runtime Error
0
0
770
while True: l = map(int, raw_input().split()) if l[0]==0 and l[1]==0 and l[2]==0: break n = l[0]+l[1]+l[2] s = [] #????¨???? a = set(range(n)) #?????? b = set() #?£???? c = set() #??£??? for i in range(input()): x, y, z, r = map(int, raw_input().split()) x-=1;y-=1;z-=1; ...
File "/tmp/tmpedp54ljf/tmpn7msacq5.py", line 26 if i in a: print 2 ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s574281187
p00437
u811434779
1440133712
Python
Python
py
Runtime Error
0
0
786
while True: l = map(int, raw_input().split()) if l[0]==0 and l[1]==0 and l[2]==0: break n = l[0]+l[1]+l[2] s = [] #????¨???? a = set(range(n)) #?????? b = set() #?£???? c = set() #??£??? for i in range(input()): x, y, z, r = map(int, raw_input().split()) x-=1;y-=1;z-=1; ...
File "/tmp/tmp8o49mxz2/tmphbuwa2rz.py", line 26 if i in a: print 2 ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s285244364
p00437
u797673668
1477043063
Python
Python3
py
Runtime Error
0
0
652
while True: m = sum(map(int, input().split())) n = int(input()) fixed = [2] * m failures = [] for _ in range(n): i, j, k, r = map(int, input().split()) i, j, k = (x - 1 for x in (i, j, k)) if r: fixed[i] = fixed[j] = fixed[k] = 1 else: failures...
Traceback (most recent call last): File "/tmp/tmpyyrsd814/tmp6bb9js6d.py", line 2, in <module> m = sum(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s027212428
p00438
u835866094
1412110722
Python
Python
py
Runtime Error
0
0
1221
#coding:utf-8 import sys import copy def main(): line = sys.stdin.readline() #case while line.split() != ["0","0"]: analy(line) line = sys.stdin.readline() return def analy(line): #t field = [int(n) for n in line.split()] # *& num = int(sys.stdin.readline()) data...
File "/tmp/tmptyajwerz/tmpokqzypw6.py", line 33 # SyntaxError: source code cannot contain null bytes
s550345253
p00438
u835866094
1412139640
Python
Python
py
Runtime Error
0
0
1231
#coding:utf-8 import sys import copy def main(): line = sys.stdin.readline() #case while line.split() != ["0","0"]: analy(line) line = sys.stdin.readline() return def analy(line): #t field = [int(n) for n in line.split()] # *& num = int(sys.stdin.readline()) ...
File "/tmp/tmp_7k292x5/tmphirnmf0f.py", line 33 # SyntaxError: source code cannot contain null bytes
s697916746
p00438
u835866094
1412410078
Python
Python
py
Runtime Error
0
0
1231
#coding:utf-8 import sys import copy def main(): line = sys.stdin.readline() #case while line.split() != ["0","0"]: analy(line) line = sys.stdin.readline() return def analy(line): #t field = [int(n) for n in line.split()] # *& num = int(sys.stdin.readline()) ...
File "/tmp/tmp03jqty4b/tmpn_kg6ha3.py", line 33 # SyntaxError: source code cannot contain null bytes
s267288604
p00438
u260980560
1385397377
Python
Python
py
Runtime Error
0
0
490
p = [[0 for i in xrange(16)] for j in xrange(16)] while 1: a,b = map(int, raw_input().split()) if a==b==0: break n = input() for i in xrange(b): for j in xrange(a): p[i][j] = 0 for i in xrange(n): x,y = map(int, raw_input().split()) p[y-1][x-1] = -10**6 p[0][0...
File "/tmp/tmpne6a1_90/tmplpphf41m.py", line 17 print p[b-1][a-1] ^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s563912364
p00439
u921038488
1555836116
Python
Python3
py
Runtime Error
0
0
386
from itertools import accumulate # 区間[N-k, N) の総和の最大値 while True: n, k = map(int, input().split(" ")) if n == 0: break a_n = [int(input()) for _ in range(n)] _ = input() a_n = list(accumulate(a_n)) # print(a_n) result = -99999999999999 for i in range(n-k): val = a_n[k+i] - a_n[i] if res...
Traceback (most recent call last): File "/tmp/tmp_zwktzj3/tmpz2ul71fd.py", line 6, in <module> n, k = map(int, input().split(" ")) ^^^^^^^ EOFError: EOF when reading a line
s036247740
p00439
u921038488
1555836180
Python
Python3
py
Runtime Error
0
0
383
from itertools import accumulate # 区間[N-k, N) の総和の最大値 while True: n, k = map(int, input().split()) if n == 0: break a_n = [int(input()) for _ in range(n)] _ = input() a_n = list(accumulate(a_n)) # print(a_n) result = -99999999999999 for i in range(n-k): val = a_n[k+i] - a_n[i] if result...
Traceback (most recent call last): File "/tmp/tmptbxxjcjy/tmpvine8y5n.py", line 6, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s801955022
p00439
u094029895
1555857974
Python
Python3
py
Runtime Error
0
0
282
n = int(input()) k = int(input()) l = list(map(int, input().split())) L=[] for i in range(n): if(i == 0): L.append(0) L.append(l[i]) else: L.append(L[i]+l[i]) ans=0 for i in range(n-k+1): tmp = L[i+k] - L[i] ans = max(ans, tmp) print(ans)
Traceback (most recent call last): File "/tmp/tmpe1va2ig1/tmp25lwo0dp.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s413887028
p00439
u060839454
1556534261
Python
Python
py
Runtime Error
0
0
351
while True: a, b = map(int, input().split(" ")) if a == 0 & b == 0: break li1 = [] for i in range(0, a): li1.append(int(input())) max = 0 for n in range(0, a + 1 - b): sum = 0 for n1 in range(n, n + b): sum = sum + li1[n1] if max < sum: ...
Traceback (most recent call last): File "/tmp/tmpm6jf4qku/tmp5rsmjy_8.py", line 2, in <module> a, b = map(int, input().split(" ")) ^^^^^^^ EOFError: EOF when reading a line
s516223765
p00439
u134812425
1559175670
Python
Python3
py
Runtime Error
0
0
1417
#!/usr/bin/env python import string import sys from itertools import chain, dropwhile, takewhile def read( *shape, f=int, it=chain.from_iterable(sys.stdin), whitespaces=set(string.whitespace) ): def read_word(): w = lambda c: c in whitespaces nw = lambda c: c not in whitespaces return ...
Traceback (most recent call last): File "/tmp/tmpsms8sfjx/tmp4gae90yw.py", line 67, in <module> main() File "/tmp/tmpsms8sfjx/tmp4gae90yw.py", line 54, in main n, k = readi(2) ^^^^^^^^ File "/tmp/tmpsms8sfjx/tmp4gae90yw.py", line 24, in readi return read(*shape) ^^^^^^^^^^^^ Fi...
s527754153
p00439
u476702877
1559176787
Python
Python3
py
Runtime Error
0
0
354
def func(n,k): A = [] ans = 0 for i in range(n): A.append(int(input())) for i in range(k-1): SUM += A[i] for i in range(k,len(a)): ans = max(ans,SUM+a[i]-a[i-k]) print(ans) for i in range(100): n,k = [int(s) for s in input().split()] if n == 0 and k ==0: ...
Traceback (most recent call last): File "/tmp/tmpmgjfo_p3/tmpnkl50_0w.py", line 13, in <module> n,k = [int(s) for s in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s456141895
p00439
u476702877
1559176911
Python
Python3
py
Runtime Error
0
0
366
def func(n,k): A = [] ans = 0 SUM = 0 for i in range(n): A.append(int(input())) for i in range(k-1): SUM += A[i] for i in range(k,len(a)): ans = max(ans,SUM+a[i]-a[i-k]) print(ans) for i in range(100): n,k = [int(s) for s in input().split()] if n == 0 and k =...
Traceback (most recent call last): File "/tmp/tmp_7p0m7vz/tmp2i_j4h_1.py", line 14, in <module> n,k = [int(s) for s in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s934489431
p00439
u476702877
1559177387
Python
Python3
py
Runtime Error
0
0
342
def func(n,k): SUM = 0 A = [int(input()) for _ in range(n)] for i in range(k-1): SUM += A[i] ans = SUM for i in range(k,len(A)): ans = max(ans,SUM+A[i]-A[i-k]) print(ans) for _ in range(10) n,k = [int(s) for s in input().split()] if n == 0 and k ==0: break el...
File "/tmp/tmpi76gvo1d/tmpydf4jao1.py", line 11 for _ in range(10) ^ SyntaxError: expected ':'
s221122542
p00439
u476702877
1559177468
Python
Python3
py
Runtime Error
0
0
370
def func(n,k): SUM = 0 ans = 0 A = [int(input()) for _ in range(n)] for i in range(k-1): SUM += A[i] for i in range(k,len(A)): ans = max(ans,SUM+A[i]-A[i-k]) SUM = SUM+A[i]-A[i-k] print(ans) for _ in range(10) n,k = [int(s) for s in input().split()] if n == 0 and...
File "/tmp/tmpjbmtaeb_/tmpb84dz831.py", line 12 for _ in range(10) ^ SyntaxError: expected ':'
s248963734
p00439
u662488567
1480610577
Python
Python3
py
Runtime Error
0
0
689
while 1: n, k = (int(x) for x in input().split()) if n == 0: break max_num = -30001 queue = list() for _ in range(k): ...
File "/tmp/tmpi1hr1k03/tmpdsc96rrk.py", line 1 while 1: IndentationError: unexpected indent
s642077639
p00439
u662488567
1480610636
Python
Python3
py
Runtime Error
0
0
689
while 1: n, k = (int(x) for x in input().split()) if n == 0: break max_num = -30001 queue = list() for _ in range(k): ...
File "/tmp/tmpgb4jgcba/tmpagwv8nvh.py", line 1 while 1: IndentationError: unexpected indent
s281521384
p00439
u563075864
1526220375
Python
Python3
py
Runtime Error
0
0
296
while 1: n,k = [int(i) for i in input().split()] if not n and k: break a = [int(input()) for i in range(n)] b = [0]*len(a) for i in range(n): b[i] = b[i-1] + a[i] b = b + [0] c = [b[i + k - 1] - b[i - 1] for i in range(n - k + 1)] print(max(c))
Traceback (most recent call last): File "/tmp/tmpxpbediw4/tmpbbs_kyyd.py", line 2, in <module> n,k = [int(i) for i in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s607792502
p00439
u104911888
1367649853
Python
Python
py
Runtime Error
0
0
309
#include <stdio.h> int main(){ int i,n,k,s; while (1){ int ma=0; scanf("%d %d",&n,&k); if (n==0 && k==0)break; int a[n]; for (i=0;i<n;i++) scanf("%d",&a[i]); for (i=0;i<n-2;i++){ s=a[i]+a[i+1]+a[i+2]; if (s>ma) ma=s; } printf("%d\n",ma); } return 0; }
File "/tmp/tmpscgx_k5m/tmp6tne049r.py", line 2 int main(){ ^^^^ SyntaxError: invalid syntax
s162002008
p00439
u238820099
1386399073
Python
Python
py
Runtime Error
0
0
232
L = [x for x in open('input.txt', 'r')] n = int(L[0].split(' ')[0]) k = int(L[0].split(' ')[1]) L = map(int, L[1:]) max = 0 for x in range(1,n-(k-1)): if max < sum(L[x:x+k]): max = sum(L[x:x+3]) print max
File "/tmp/tmpwebnel9d/tmpewi09yi_.py", line 13 print max ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s566093507
p00439
u238820099
1386400291
Python
Python
py
Runtime Error
0
0
425
import sys f = open('input.txt','w') while 1: line = raw_input() if line == '0 0': break f.write(line) f.write('\n') f.close() L = [x for x in open('input.txt', 'r') if x != "0 0"] n = int(L[0].split(' ')[0]) k = int(L[0].split(' ')[1]) L = map(int, L[1:]) max = 0 ...
File "/tmp/tmp_t70jakn/tmpht9eo4sv.py", line 26 print max ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s785175827
p00439
u238820099
1386400766
Python
Python
py
Runtime Error
0
0
469
import sys f = open('input.txt','w') while 1: line = raw_input() if line == '0 0': f.write(line) break f.write(line) f.write('\n') f.close() L = [x for x in open('input.txt', 'r')] L[0].split(' ') n = int(L[0].split(' ')[0]) k = int(L[0].split(' ')[1...
File "/tmp/tmpfwyjv2u8/tmpc1_r8s8f.py", line 30 print max ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s224692267
p00439
u238820099
1386401274
Python
Python
py
Runtime Error
0
0
457
f = open('input.txt','w') while 1: line = raw_input() if line == '0 0': f.write(line) break f.write(line) f.write('\n') f.close() L = [x for x in open('input.txt', 'r')] L[0].split(' ') n = int(L[0].split(' ')[0]) k = int(L[0].split(' ')[1]) L = L[:-...
File "/tmp/tmpv7ldrpjw/tmpxl977iku.py", line 28 print max ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s532137928
p00440
u316268279
1430136373
Python
Python
py
Runtime Error
0
0
795
#!/usr/bin/env python # -*- coding: utf-8 -*- while True: N,K = map(int,raw_input().split()) A = sorted([int(rraw_input()) for i in range(0,K)]) if (N,K) == (0,0): break if A[0] == 0: flag = True A = A[1:] K -= 1 else: flag = False diff = [] ans = ...
Traceback (most recent call last): File "/tmp/tmpr20alhkq/tmp3n3ob1f8.py", line 5, in <module> N,K = map(int,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s443604798
p00440
u847467233
1530313695
Python
Python3
py
Runtime Error
0
0
424
# AOJ 0517: Longest Steps # Python3 2018.6.30 bal4u while True: n, k = map(int, input().split()) if n == 0: break c = [0]*(n+1) f = 0; for i in range(k): a = int(input()) if a == 0: f = 1 else: c[a] = 1 ans = w0 = w = 0 for i in range(1, n+1): if c[i]: w += 1 elif w > 0: if w0 + w + f > ans: ans = ...
Traceback (most recent call last): File "/tmp/tmp7uk3t_ko/tmpx37j2jhj.py", line 5, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s053887838
p00440
u633068244
1399240376
Python
Python
py
Runtime Error
0
0
323
while 1: n,k = map(int,raw_input().split()) if n == 0: break s = [0]*(n+1) c = sorted([int(raw_input()) for i in range(k)]) p = min(0,C[0]) pre = 0 for i in c[p:]: s[i] = s[i-1] + 1 if p and s[i-1] == 0: if s[i-2]: s[i] += s[i-2] + 1 - pre pre = s[i-2] + 1 if s[i-2] == 0: pre = 0 print max...
File "/tmp/tmpa6e_wb9b/tmpgmx8anyt.py", line 16 print max(s) ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s752628273
p00441
u352394527
1526289204
Python
Python3
py
Runtime Error
0
0
486
points = [[False for i in range(5001)] for j in range(5001)] ps = [] for i in range(n): x, y = map(int,input().split()) points[x][y] = True ps.append((x,y)) ans = 0 for i in range(n): for j in range(n): p1 = ps[i] p2 = ps[j] vx = p2[0] - p1[0] vy = p2[1] - p1[1] ...
File "/tmp/tmpo77iut4z/tmp35t3wsey.py", line 1 points = [[False for i in range(5001)] for j in range(5001)] IndentationError: unexpected indent
s649994467
p00441
u352394527
1526289531
Python
Python3
py
Runtime Error
0
0
699
def main(): while True: n = int(input()) if not n: break points = [[False for i in range(5001)] for j in range(5001)] ps = [] for i in range(n): x, y = map(int,input().split()) points[x][y] = True ps.append((x,y)) ans = 0 for i in range(n): for j in r...
Traceback (most recent call last): File "/tmp/tmpa4t2q7nv/tmpbjzgqze0.py", line 27, in <module> main() ^^^^^^ File "/tmp/tmpa4t2q7nv/tmpbjzgqze0.py", line 3, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s275835153
p00441
u352394527
1526289724
Python
Python3
py
Runtime Error
0
0
699
def main(): while True: n = int(input()) if not n: break points = [[False for i in range(5001)] for j in range(5001)] ps = [] for i in range(n): x, y = map(int,input().split()) points[x][y] = True ps.append((x,y)) ans = 0 for i in range(n): for j in r...
Traceback (most recent call last): File "/tmp/tmpm3nmg046/tmpbugw305c.py", line 27, in <module> main() ^^^^^^ File "/tmp/tmpm3nmg046/tmpbugw305c.py", line 3, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s137514954
p00441
u352394527
1526289726
Python
Python3
py
Runtime Error
0
0
699
def main(): while True: n = int(input()) if not n: break points = [[False for i in range(5001)] for j in range(5001)] ps = [] for i in range(n): x, y = map(int,input().split()) points[x][y] = True ps.append((x,y)) ans = 0 for i in range(n): for j in r...
Traceback (most recent call last): File "/tmp/tmpbp9ops5e/tmph_ic0grf.py", line 27, in <module> main() ^^^^^^ File "/tmp/tmpbp9ops5e/tmph_ic0grf.py", line 3, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s620747055
p00441
u352394527
1526289944
Python
Python3
py
Runtime Error
0
0
748
def main(): points = [[False for i in range(5001)] for j in range(5001)] while True: n = int(input()) if not n: break ps = [] for i in range(n): x, y = map(int,input().split()) points[x][y] = True ps.append((x,y)) ans = 0 for i in range(n): for j in range...
Traceback (most recent call last): File "/tmp/tmp49dr_725/tmp9kmkdoup.py", line 30, in <module> main() ^^^^^^ File "/tmp/tmp49dr_725/tmp9kmkdoup.py", line 4, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s096050512
p00441
u604412493
1378127427
Python
Python
py
Runtime Error
20000
7064
910
import sys from copy import deepcopy #fp = open("input.txt", "r") fp = sys.stdin while True: n = int(fp.readline()[:-1]) if n == 0: break li = [] for i in xrange(n): element = map(int, fp.readline()[:-1].split(" ")) li.append(element) ret = 0 for i in xrange(n): ...
File "/tmp/tmpds93fo60/tmpbrdqm0sy.py", line 33 print ret ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s490866206
p00441
u604412493
1378127579
Python
Python
py
Runtime Error
20000
5752
912
import sys #fp = open("input.txt", "r") fp = sys.stdin while True: n = int(fp.readline()[:-1]) if n == 0: break li = [] for i in xrange(n): element = map(int, fp.readline()[:-1].split(" ")) li.append(element) ret = 0 for i in xrange(n): element = li.pop(0) ...
File "/tmp/tmpptlj3a8c/tmp4nx6gu3v.py", line 33 print ret ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s643700253
p00441
u633068244
1399293235
Python
Python
py
Runtime Error
0
0
468
p = 50 while 1: n = input() if n == 0: break xy = sorted([map(int,raw_input().split()) for i in range(n)]) x1,y1 = xy[0] xy = sorted(xy, key = lambda XY:(XY[0]-x1)**2 + (XY[1]-y11)**2) ans = 0 for j in range(n-3,0,-1): x2,y2 = xy[j] dx,dy = x2-x1,y2-y1 if [x1-dy,y1-dx] in xy[j+1:j+p] and [x2+dy,y2-dx] in x...
File "/tmp/tmpoe1y65r8/tmp1xmvmb21.py", line 17 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s607233169
p00441
u633068244
1399295877
Python
Python
py
Runtime Error
0
0
337
while 1: n = input() if n == 0: break xy = [map(int,raw_input().split()) for i in range(n)] S = set(map(tuple,xy)) ans = 0 for i in range(n): x1,y1 = xy[i] for j in range(n-1,i,-1): x2,y2 = xy[j] a = (x2-y2+y1,y2+x2-x1) b = (x1-y2+y1,y1+x2-x1) if a in S and b in S: ans = max((x1-x2)**2 + (y1-y...
File "/tmp/tmpy_7a5z2u/tmpvaus8vor.py", line 15 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s516049953
p00442
u072053884
1524553221
Python
Python3
py
Runtime Error
20
5620
643
import sys file_input = sys.stdin n = int(file_input.readline()) m = int(file_input.readline()) adj_list = [[] for i in range(n + 1)] for line in file_input: i, j = map(int, line.split()) adj_list[i].append(j) unvisited = [True] * (n + 1) ans = [] def dfs(u): unvisited[u] = False for v in adj_lis...
Traceback (most recent call last): File "/tmp/tmp45g4qa9j/tmp4pfz25mn.py", line 5, in <module> n = int(file_input.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s681167086
p00442
u352394527
1526566850
Python
Python3
py
Runtime Error
20
5624
534
V, E = int(input()), int(input()) L = [] visited = [0 for i in range(V)] edges = [[] for i in range(V)] #flag = 0 def visit(x): # if visited[x] == 1: # flag = 1 if not visited[x]: visited[x] = 1 for e in edges[x]: visit(e) L.insert(0,x) for i in range(E): s, t = map(int,input().split()) ed...
Traceback (most recent call last): File "/tmp/tmpxvb95ynd/tmpkavgogaw.py", line 1, in <module> V, E = int(input()), int(input()) ^^^^^^^ EOFError: EOF when reading a line
s617355658
p00442
u352394527
1526566932
Python
Python3
py
Runtime Error
0
0
564
sys.setrecursionlimit(100000) V, E = int(input()), int(input()) L = [] visited = [0 for i in range(V)] edges = [[] for i in range(V)] #flag = 0 def visit(x): # if visited[x] == 1: # flag = 1 if not visited[x]: visited[x] = 1 for e in edges[x]: visit(e) L.insert(0,x) for i in range(E): s, t =...
Traceback (most recent call last): File "/tmp/tmp9rqh6__5/tmpn9qstcz5.py", line 1, in <module> sys.setrecursionlimit(100000) ^^^ NameError: name 'sys' is not defined
s796994259
p00442
u847467233
1529488778
Python
Python3
py
Runtime Error
0
0
685
# AOJ 0519: Worst Reporter # Python3 2018.6.20 bal4u # トポロジーソート V:総ノード数, to[][]:隣接リスト def topological_sort(V, to): cnt = [0]*V for i in range(V): for j in to[i]: cnt[j] += 1 Q = [] for i in range(V): if cnt[i] == 0: Q.append(i) f = 0 while len(Q) > 0: f |= len(Q) > 1 i = Q[0] del Q[0] print(i+1) #...
Traceback (most recent call last): File "/tmp/tmpko0cqqj9/tmp0helzej4.py", line 24, in <module> n = int(fileinput.input()) ^^^^^^^^^^^^^^^^^^^^^^ TypeError: int() argument must be a string, a bytes-like object or a real number, not 'FileInput'
s518732952
p00443
u901080241
1489042620
Python
Python3
py
Runtime Error
0
0
1295
import math class Mobile: def __init__(self,leftratio=0,rightratio=0,left=-1,right=-1): self.weight = 0 self.leftratio = leftratio self.rightratio = rightratio self.left = left self.leftweight = 0 self.right = right self.rightweight = 0 def calc(self): ...
Traceback (most recent call last): File "/tmp/tmp5ud3kp77/tmpobdvn9xd.py", line 34, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s774335012
p00443
u901080241
1489042719
Python
Python3
py
Runtime Error
0
0
1373
import math class Mobile: def __init__(self,leftratio=0,rightratio=0,left=-1,right=-1): self.weight = 0 self.leftratio = leftratio self.rightratio = rightratio self.left = left self.leftweight = 0 self.right = right self.rightweight = 0 def calc(self): ...
Traceback (most recent call last): File "/tmp/tmpui8x4c43/tmpebo7uj4z.py", line 34, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s920746675
p00443
u901080241
1489042885
Python
Python3
py
Runtime Error
0
0
1494
def gcd(x,y): if x<y: tmp = x x = y y = tmp if x%y == 0: return y else: gcd(y,x%y) class Mobile: def __init__(self,leftratio=0,rightratio=0,left=-1,right=-1): self.weight = 0 self.leftratio = leftratio self.rightratio = rightratio ...
Traceback (most recent call last): File "/tmp/tmpht7d682r/tmp6kwp76nm.py", line 45, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s434241720
p00443
u352394527
1524997782
Python
Python3
py
Runtime Error
0
0
936
from math import gcd def lcm(i,j): return i * j // gcd(i,j) def main(): while True: n = int(input()) if not n: break lst = [[]] weight = [-1 for i in range(n + 1)] def setWeight(n): p,q,r,b = lst[n] if weight[n] != -1:pass elif r == 0 and b == 0: weight[n] = (p + q) // ...
Traceback (most recent call last): File "/tmp/tmp0bcmw5rx/tmpswdrtyp5.py", line 35, in <module> main() File "/tmp/tmp0bcmw5rx/tmpswdrtyp5.py", line 6, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s530764103
p00443
u352394527
1524997809
Python
Python3
py
Runtime Error
0
0
936
from math import gcd def lcm(i,j): return i * j // gcd(i,j) def main(): while True: n = int(input()) if not n: break lst = [[]] weight = [-1 for i in range(n + 1)] def setWeight(n): p,q,r,b = lst[n] if weight[n] != -1:pass elif r == 0 and b == 0: weight[n] = (p + q) // ...
Traceback (most recent call last): File "/tmp/tmpt290bseb/tmpqnn1m76y.py", line 35, in <module> main() File "/tmp/tmpt290bseb/tmpqnn1m76y.py", line 6, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s570083063
p00443
u352394527
1524997980
Python
Python3
py
Runtime Error
0
0
948
from math import gcd def lcm(i, j): return i * j // gcd(i, j) def main(): while True: n = int(input()) if not n: break lst = [[]] weight = [-1 for i in range(n + 1)] def setWeight(n): p, q, r, b = lst[n] if weight[n] != -1: pass elif r == 0 and b == 0: weight[n] = (p +...
Traceback (most recent call last): File "/tmp/tmpnq_7op5x/tmpvhpdaw8t.py", line 37, in <module> main() File "/tmp/tmpnq_7op5x/tmpvhpdaw8t.py", line 7, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s991084201
p00443
u352394527
1524998018
Python
Python3
py
Runtime Error
0
0
918
from math import gcd def lcm(i, j): return i * j // gcd(i, j) def main(): while True: n = int(input()) if not n: break lst = [[]] weight = [-1 for i in range(n + 1)] def setWeight(n): p, q, r, b = lst[n] if weight[n] != -1: pass elif r == 0 and b == 0: weight[n] = (p +...
Traceback (most recent call last): File "/tmp/tmp5r8h2k4e/tmpa7i6v1z0.py", line 36, in <module> main() File "/tmp/tmp5r8h2k4e/tmpa7i6v1z0.py", line 7, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s309124358
p00443
u467175809
1527202910
Python
Python
py
Runtime Error
0
0
1241
#!/usr/bin/env python import numpy as np def GCD(a, b): dummy1 = max(a, b) dummy2 = min(a, b) while True: dummy = dummy1 % dummy2 dummy1 = dummy2 dummy2 = dummy if(dummy == 0): break return dummy1 while True: N = input() if not N: break cost = [] E = [] root = N * (N - 1) / 2 for i in range(N...
File "/tmp/tmph8yndekt/tmp66em4m91.py", line 70 print sum(N_lst) ^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s636360965
p00444
u811434779
1440387195
Python
Python
py
Runtime Error
0
0
185
while 1: n = 1000 - input() if n==0:break m = [500,100,50,10,5,1] for i in range(6): x = n / m[i]; n -= m[i] * x; m[i] = x; print reduce(lambda a, x: a+x, m)
File "/tmp/tmpihnetrn4/tmpt_lr2izw.py", line 7 print reduce(lambda a, x: a+x, m) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s562043202
p00444
u150984829
1525451707
Python
Python3
py
Runtime Error
0
0
119
for e in iter(input,'0'): while 1: b,c=1000-int(e),0 for i in[500,100,50,10,5]: d,b=divmod(b,i) c+=d print(b+c)
File "/tmp/tmpyide5isq/tmphu8quzdt.py", line 2 while 1: ^ IndentationError: expected an indented block after 'for' statement on line 1
s201598239
p00444
u894941280
1344883384
Python
Python
py
Runtime Error
0
0
422
while True: c =0 a = int(input()) me = 1000 -a while me != 0: if me >= 500: me -= 500 c +=1 elif me >= 100: me -= 100 c +=1 elif me >= 50: me -= 50 c+=1 elif me >= 10: me -= 10 c +=1 elif me >= 5: me -= 5...
File "/tmp/tmppsao0dnk/tmpr8gar652.py", line 28 print c ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?