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
s755097651
p02277
u313994256
1442583732
Python
Python
py
Runtime Error
0
0
1519
def mergesort(A, left, right): if left + 1 < right: mid = (left + right)/2 mergesort(A, left, mid) mergesort(A, mid, right) merge(A, left, mid, right) def merge(A, left, mid, right): n1 = mid -left n2 = right - mid L = [] R = [] x = [" "," ", 10000...
File "/tmp/tmps5lgk1ln/tmp4w7lqj7q.py", line 77 print " \n".join(num_list) ^ IndentationError: unindent does not match any outer indentation level
s960104671
p02277
u313994256
1442584006
Python
Python
py
Runtime Error
0
0
1491
def mergesort(A, left, right): if left + 1 < right: mid = (left + right)/2 mergesort(A, left, mid) mergesort(A, mid, right) merge(A, left, mid, right) def merge(A, left, mid, right): n1 = mid -left n2 = right - mid L = [] R = [] x = [" "," ", 10000...
File "/tmp/tmpp9b5hnpb/tmpqds_tg7f.py", line 77 print " \n".join(num_list) ^ IndentationError: unindent does not match any outer indentation level
s076138227
p02277
u313994256
1442584101
Python
Python
py
Runtime Error
0
0
1490
def mergesort(A, left, right): if left + 1 < right: mid = (left + right)/2 mergesort(A, left, mid) mergesort(A, mid, right) merge(A, left, mid, right) def merge(A, left, mid, right): n1 = mid -left n2 = right - mid L = [] R = [] x = [" "," ", 10000...
File "/tmp/tmps8e9rk1r/tmp0hq1wo1a.py", line 77 print "\n".join(num_list) ^ IndentationError: unindent does not match any outer indentation level
s761710190
p02277
u313994256
1442755215
Python
Python
py
Runtime Error
0
0
1531
def mergesort(A, left, right): if left + 1 < right: mid = (left + right)/2 mergesort(A, left, mid) mergesort(A, mid, right) merge(A, left, mid, right) def merge(A, left, mid, right): n1 = mid -left n2 = right - mid L = [] R = [] x = [" "," ", 10000...
File "/tmp/tmpsbalz7wk/tmp7sl8cm7l.py", line 49 rn i+1 ^ SyntaxError: invalid syntax
s239685672
p02277
u313994256
1442755272
Python
Python
py
Runtime Error
0
0
1531
def mergesort(A, left, right): if left + 1 < right: mid = (left + right)/2 mergesort(A, left, mid) mergesort(A, mid, right) merge(A, left, mid, right) def merge(A, left, mid, right): n1 = mid -left n2 = right - mid L = [] R = [] x = [" "," ", 10000...
File "/tmp/tmpxwd9_seb/tmp09lbu_kq.py", line 49 rn i+1 ^ SyntaxError: invalid syntax
s389442742
p02277
u313994256
1442755317
Python
Python
py
Runtime Error
0
0
1532
def mergesort(A, left, right): if left + 1 < right: mid = (left + right)/2 mergesort(A, left, mid) mergesort(A, mid, right) merge(A, left, mid, right) def merge(A, left, mid, right): n1 = mid -left n2 = right - mid L = [] R = [] x = [" "," ", 10000...
File "/tmp/tmpcatp8i0o/tmpz61c3zyp.py", line 49 rn i+1 ^ SyntaxError: invalid syntax
s508357251
p02277
u313994256
1442761751
Python
Python
py
Runtime Error
0
0
1499
def mergesort(A, left, right): if left + 1 < right: mid = (left + right)/2 mergesort(A, left, mid) mergesort(A, mid, right) merge(A, left, mid, right) def merge(A, left, mid, right): n1 = mid -left n2 = right - mid L = [] R = [] x = [" "," ", ...
File "/tmp/tmpzpcwis1c/tmpel397xxi.py", line 71 print "\n".join(num_list) ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s505383031
p02277
u313994256
1442762617
Python
Python
py
Runtime Error
0
0
1506
#????????? def mergesort(A, left, right): if left + 1 < right: mid = (left + right)/2 mergesort(A, left, mid) mergesort(A, mid, right) merge(A, left, mid, right) def merge(A, left, mid, right): n1 = mid -left n2 = right - mid L = [] R = [] x =...
File "/tmp/tmp04x_9rq4/tmpztj2j5ob.py", line 72 print "\n".join(num_list) ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s452327356
p02277
u313994256
1442795581
Python
Python
py
Runtime Error
0
0
1498
#????????? def mergesort(A, left, right): if left + 1 < right: mid = (left + right)/2 mergesort(A, left, mid) mergesort(A, mid, right) merge(A, left, mid, right) def merge(A, left, mid, right): n1 = mid -left n2 = right - mid L = [] R = [] x =...
File "/tmp/tmpnr5_airb/tmpeg1iq4v0.py", line 73 print "\n".join(num_list) ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s809966355
p02277
u731710433
1455975495
Python
Python3
py
Runtime Error
20
7812
918
def partition(A, p, r): x = A[r][1] i = p-1 for j in range(p, r): if A[j][1] <= x: i += 1 A[i], A[j] = A[j], A[i] A[i + 1], A[r] = A[r], A[i + 1] return i + 1 def quicksort(A, p, r): if p < r: q = partition(A, p, r) quicksort(A, p, q-1) q...
Traceback (most recent call last): File "/tmp/tmpdnwk06c4/tmpj47qza73.py", line 35, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s717670848
p02277
u742013327
1478604971
Python
Python3
py
Runtime Error
0
0
1421
#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_6_C&lang=jp def partition(target_list, l, r): x = int(target_list[r][1:]) i = l - 1 for j in range(l, r): if int(target_list[j][1:]) <= x: i = i + 1 tmp = target_list[i] target_list[i] = target_list...
Traceback (most recent call last): File "/tmp/tmpli99vuyf/tmpgbu1jjbd.py", line 36, in <module> n_list = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s433995968
p02277
u742013327
1478605012
Python
Python3
py
Runtime Error
0
0
1437
#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_6_C&lang=jp def partition(target_list, l, r): x = int(target_list[r][1:]) i = l - 1 for j in range(l, r): if int(target_list[j][1:]) <= x: i = i + 1 tmp = target_list[i] target_list[i] = target_list...
Traceback (most recent call last): File "/tmp/tmp6kntjrl1/tmpfehftj7i.py", line 36, in <module> n_list = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s894782368
p02277
u022407960
1478848723
Python
Python3
py
Runtime Error
0
0
1855
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Input: 6 D 3 H 2 D 1 S 3 D 2 C 1 Output: Not stable / Stable D 1 C 1 D 2 H 2 D 3 S 3 """ import sys import copy def partition(array, start, end): x = int(array[end][2:]) i = start - 1 assert start <= end for j in range(start, end): if int(arr...
Traceback (most recent call last): File "/tmp/tmpd4w8s0d5/tmpeabtomwz.py", line 75, in <module> array_length = int(_input[0]) ~~~~~~^^^ IndexError: list index out of range
s690557776
p02277
u811733736
1480892093
Python
Python3
py
Runtime Error
20
7876
2044
def merge_sort(A, left, right): if left + 1 < right: mid = (left + right) // 2 merge_sort(A, left, mid) merge_sort(A, mid, right) merge(A, left, mid, right) def merge(A, left, mid, right): n1 = mid - left n2 = right - mid L = A[left:mid] R = A[mid:right] L.appen...
Traceback (most recent call last): File "/tmp/tmpdf5d9_ob/tmpvrguvm2u.py", line 56, in <module> num_of_cards = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s537923096
p02277
u512342660
1484106313
Python
Python
py
Runtime Error
0
0
1747
def partition(A,B,p,r): x = A[r] i = p-1 for j in xrange(p,r): if A[j] <= x: i += 1 tmp = A[i] A[i] = A[j] A[j] = tmp tmp = B[i] B[i] = B[j] B[j] = tmp tmp = A[i+1] A[i+1] = A[r] A[r] = tmp tmp = B[i+...
File "/tmp/tmppzvwgn12/tmpd_tm6w26.py", line 60 print stable_check(A,B,cpA,cpB,n) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s604361014
p02277
u564398841
1486271349
Python
Python3
py
Runtime Error
0
0
1269
def mergesort(A, s, e): if s + 1 < e: m = (e + s) // 2 mergesort(A, s, m) mergesort(A, m, e) merge(A, s, m, e) def merge(A, s, m, e): L = A[s:m] + [('*', 1E10)] R = A[m:e] + [('*', 1E10)] ix_l = ix_r = 0 for ix in range(s, e): if L[ix_l][1] < R[ix_r][1]: ...
Traceback (most recent call last): File "/tmp/tmpbh7cfdga/tmpz7yehqax.py", line 40, in <module> fin = open('sample.txt') ^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'sample.txt'
s360806683
p02277
u564398841
1486271489
Python
Python3
py
Runtime Error
0
0
1273
def mergesort(A, s, e): if s + 1 < e: m = (e + s) // 2 mergesort(A, s, m) mergesort(A, m, e) merge(A, s, m, e) def merge(A, s, m, e): L = A[s:m] + [('*', 1E10)] R = A[m:e] + [('*', 1E10)] ix_l = ix_r = 0 for ix in range(s, e): if L[ix_l][1] < R[ix_r][1]: ...
Traceback (most recent call last): File "/tmp/tmp3668g2sa/tmp2nhdi8ki.py", line 40, in <module> fin = open('sample.txt') ^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'sample.txt'
s369710370
p02277
u918276501
1507982244
Python
Python3
py
Runtime Error
0
0
937
def swap(A,i,j): A[i],A[j] = A[j],A[i] return A def isStable(A): for i in range(1, len(A)): if A[i][1] == A[i-1][1]: if A[i][2] < A[i-1][2]: return False return True def partition(A,p=0, r=None): if r is None: r = len(A)-1 x = A[r] i = p-1 fo...
File "/tmp/tmpd3wmy1xs/tmpfsmj4y8a.py", line 38 A.append(int(card[1]), [card[0], i]) ^ IndentationError: unindent does not match any outer indentation level
s906880370
p02277
u918276501
1507982262
Python
Python3
py
Runtime Error
0
0
937
def swap(A,i,j): A[i],A[j] = A[j],A[i] return A def isStable(A): for i in range(1, len(A)): if A[i][1] == A[i-1][1]: if A[i][2] < A[i-1][2]: return False return True def partition(A,p=0, r=None): if r is None: r = len(A)-1 x = A[r] i = p-1 fo...
File "/tmp/tmpmxz96wn4/tmpk_2rg1n1.py", line 38 A.append([int(card[1]), card[0], i]) ^ IndentationError: unindent does not match any outer indentation level
s184233842
p02277
u918276501
1507982383
Python
Python3
py
Runtime Error
0
0
943
def swap(A,i,j): A[i],A[j] = A[j],A[i] return A def isStable(A): for i in range(1, len(A)): if A[i][1] == A[i-1][1]: if A[i][2] < A[i-1][2]: return False return True def partition(A,p=0, r=None): if r is None: r = len(A)-1 x = A[r] i = p-1 fo...
File "/tmp/tmp_xgt5d03/tmpw0xke3nw.py", line 38 A.append([card[0], int(card[1]), i]) ^ IndentationError: unindent does not match any outer indentation level
s431487359
p02277
u426534722
1517237990
Python
Python3
py
Runtime Error
0
0
775
import sys readline = sys.stdin.readline def partition(A, p, r): x = A[r][1] i = p - 1 for j in range(p, r): if A[j][1] <= x: i += 1 A[i], A[j] = A[j], A[i] A[i + 1], A[r] = A[r], A[i + 1] return i + 1 def quicksort(A, p, r): if p < r: q = partition(A, p, ...
Traceback (most recent call last): File "/tmp/tmp1wdzbf58/tmpprno7ak5.py", line 23, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s957918720
p02277
u177808190
1518527491
Python
Python3
py
Runtime Error
20
5620
1092
def partition(hoge, p, r): x = int(hoge[r-1][1]) i = p-1 for j in range(p, len(hoge)): if int(hoge[j][1]) <= x: i += 1 tmp = hoge[i] hoge[i] = hoge[j] hoge[j] = tmp return i def qSort(hoge, p, r): if p < r: q = partition(hoge, p, r...
Traceback (most recent call last): File "/tmp/tmpjaefib2z/tmpe2xzjf69.py", line 29, in <module> num = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s598690782
p02277
u150984829
1518841310
Python
Python3
py
Runtime Error
0
0
471
import sys def t(A,p,r): x=A[r][1];i=p-1 for j in range(p,r): if A[j][1]<=x:i+=1;A[i],A[j]=A[j],A[i] A[i+1],A[r]=A[r],A[i+1] return i+1 def k(A,p,r): if p<r:q=t(A,p,r);k(A,p,q-1);k(A,q+1,r) def s(A): for i in range(n-1): if A[i][1]==A[i+1][1]: if A[i][2]>A[i+1][2]:return 0 return 1 n=int(input()) f=lambda...
File "/tmp/tmpidp08rar/tmp3zee9ps1.py", line 17 A=[f(sys.stdin.readline().split(),i))for i in range(n)] ^ SyntaxError: closing parenthesis ')' does not match opening parenthesis '['
s130648760
p02277
u150984829
1518843458
Python
Python3
py
Runtime Error
0
0
445
import sys def t(A,p,r): x=A[r][1];i=p-1 for j in range(p,r): if A[j][1]<=x:i+=1;A[i],A[j]=A[j],A[i] A[i+1],A[r]=A[r],A[i+1] return i+1 def k(A,p,r): if p<r:q=t(A,p,r);k(A,p,q-1);k(A,q+1,r) def s(A): for i in range(n-1): if A[i][1]==A[i+1][1]and A[i][2]>A[i+1][2]:return'Not s' return'S' n=int(input()) A=[(e[...
Traceback (most recent call last): File "/tmp/tmpe0l7fcxo/tmpecevla8c.py", line 14, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s354904776
p02277
u150984829
1520051083
Python
Python3
py
Runtime Error
0
0
484
import sys def t(A,p,r): x=A[r][1];i=p-1 for j in range(p,r): if A[j][1]<=x:i+=1;A[i],A[j]=A[j],A[i] A[i+1],A[r]=A[r],A[i+1] return i+1 def k(A,p,r): if p<r:q=t(A,p,r);k(A,p,q-1);k(A,q+1,r) def s(A): for i in range(n-1): if A[i][1]==A[i+1][1]and A[i][2]>A[i+1][2]:return'Not s' return'S' def m(): n=int(input...
Traceback (most recent call last): File "/tmp/tmp4y5ffter/tmpr4n8oz0_.py", line 20, in <module> if'__main__'==__name__:m() ^^^ File "/tmp/tmp4y5ffter/tmpr4n8oz0_.py", line 15, in m n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s668807896
p02277
u328199937
1524621695
Python
Python3
py
Runtime Error
20
5612
1246
def partition(A, left, right): p = left r = right x = A[r][1] i = p - 1 for j in range(p, r): if A[j][1] <= x: i += 1 key = A[i] A[i] = A[j] A[j] = key key = A[i + 1] A[i + 1] = A[r] A[r] = key if i + 1 - left <= 1: if r...
Traceback (most recent call last): File "/tmp/tmp66n4ad9_/tmp9x9kz5mg.py", line 41, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s489620411
p02277
u328199937
1524623224
Python
Python3
py
Runtime Error
20
5616
1245
def partition(A, left, right): p = left r = right x = A[r][1] i = p - 1 for j in range(p, r): if A[j][1] <= x: i += 1 key = A[i] A[i] = A[j] A[j] = key key = A[i + 1] A[i + 1] = A[r] A[r] = key if i + 1 - left <= 1: if r...
Traceback (most recent call last): File "/tmp/tmpn8e4ui2x/tmpess4noir.py", line 41, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s793887808
p02277
u255317651
1525354073
Python
Python3
py
Runtime Error
20
5620
1038
# -*- coding: utf-8 -*- """ Created on Thu May 3 21:24:25 2018 ALDS1_6_C @author: maezawa """ a = [] n = int(input()) for i in range(n): s = input().split() a.append([s[0], int(s[1])]) a_in = a.copy() def is_stable(a, b): s = True for i, card in enumerate(b): if b[i+1][1] == b[i][1]: ...
Traceback (most recent call last): File "/tmp/tmpp1rxci7d/tmp458t2tcw.py", line 8, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s634911755
p02277
u684241248
1527768019
Python
Python3
py
Runtime Error
0
0
1426
INF = 10**10 def partition(ary, p, r): x = ary[r][1] i = p - 1 for j in range(p, r): if ary[j][1] <= x: i += 1 ary[i], ary[j] = ary[j], ary[i] ary[i + 1], ary[r] = ary[r], ary[i + 1] return i + 1 def quick_sort(ary, p, r): if p < r: q = partition(ary...
Traceback (most recent call last): File "/tmp/tmp88a7n47t/tmp2hud4g0j.py", line 58, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s348669463
p02277
u007270338
1528091966
Python
Python3
py
Runtime Error
30
6348
1142
#coding:utf-8 from copy import deepcopy n = int(input()) A = [] for i in range(n): ch, num = input().split() A.append([ch, int(num)]) B = deepcopy(A) def Merge(A, left, mid, right): L = A[left:mid] R = A[mid:right] L.append(["S",20000000]) R.append(["S",20000000]) i,j = 0,0 for k in ...
Traceback (most recent call last): File "/tmp/tmp1pif2l3q/tmpx_ghdqdk.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s575819031
p02277
u424720817
1530591818
Python
Python3
py
Runtime Error
0
0
399
n = int(input()) numbers = list(map(int, input().split())) def main() : x = numbers[n - 1] i = 0 for j in range(n) : if numbers[j] <= x : numbers[i], numbers[j] = numbers[j], numbers[i] i += 1 [print(numbers[j] if j != i - 1 else '['+str(numbers[j])+']', end = ' ' if j ...
Traceback (most recent call last): File "/tmp/tmptakv_r1s/tmp573cknhn.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s325639292
p02277
u912237403
1371352726
Python
Python
py
Runtime Error
20
4272
831
def partition(A, p, r): x = A[r]/10 i = p-1 for j in range(p, r): if A[j]/10 <= x: i += 1 A[i], A[j] = A[j], A[i] i += 1 A[i], A[r] = A[r], A[i] return i def quicksort(A, p, r): if p<r: q = partition(A, p, r) quicksort(A, p, q-1) quick...
File "/tmp/tmpjbtvg5wg/tmpkxpjjwkp.py", line 38 print 'Stable' ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s624856791
p02277
u912237403
1371365342
Python
Python
py
Runtime Error
0
0
846
def partition(A, p, r): x = A[r]/10 i = p-1 for j in range(p, r): if A[j]/10 <= x: i += 1 A[i], A[j] = A[j], A[i] i += 1 A[i], A[r] = A[r], A[i] print A,i,r return i def quicksort(A, p, r): if p<r: q = partition(A, p, r) quicksort(A, p, q-...
File "/tmp/tmp4ni4oupr/tmpbndwhy3s.py", line 10 print A,i,r ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s862778680
p02278
u440050957
1454083178
Python
Python
py
Runtime Error
0
0
673
def get_weights(): input() return raw_input().split() #weights: list def minimam_cost_sort(weights): lol = [] for i in weights: if i !=0: j = i l = [j] while weights[j - 1] != 0: l.append(weights[j - 1]) j = weights[j - 1] ...
File "/tmp/tmplpg9puxv/tmp36sj_342.py", line 24 print s ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s550878983
p02278
u440050957
1454083967
Python
Python
py
Runtime Error
10
6408
766
def get_weights(): raw_input() return map(int, raw_input().split()) #weights: list def minimam_cost_sort(weights): lol = [] for i in range(len(weights)): if weights[i] !=0: j = weights[i] weights[i] = 0 l = [j] while weights[j - 1] != 0: ...
File "/tmp/tmpgx3te0hi/tmpnb8z9dbe.py", line 26 print s ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s327720666
p02278
u567281053
1459614983
Python
Python
py
Runtime Error
20
6548
686
import sys def minimumCostSort(A): B = sorted(A) V = [False] * len(A) T = [0] * 10000 ans = 0 s = min(A) for i in range(len(A)): T[B[i]] = i for i in range(len(A)): if V[i]: continue S = an = 0 j = i m = 10000 while True: ...
File "/tmp/tmp99p9cdkb/tmpnjrmrxxq.py", line 34 print minimumCostSort(A) ^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s374806663
p02278
u742013327
1478840293
Python
Python3
py
Runtime Error
20
7912
2401
#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_6_D #????°??????????????????? def partition(target_list, l, r): x = target_list[r] i = l - 1 for j in range(l, r): if target_list[j] <= x: i = i + 1 tmp = target_list[i] target_list[i] = target_list[...
Traceback (most recent call last): File "/tmp/tmpl948nwfs/tmpljxwmc04.py", line 75, in <module> main() File "/tmp/tmpl948nwfs/tmpljxwmc04.py", line 70, in main n_list = input() ^^^^^^^ EOFError: EOF when reading a line
s618661055
p02278
u022407960
1479897472
Python
Python3
py
Runtime Error
20
7744
1141
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys MAX_VALUE = 1e4 def min_cost_sort(): ans = 0 for i in range(array_length): if check_order[i]: continue current_index = i _sum, min_value, circle_size = 0, MAX_VALUE, 0 while True: check_order[cur...
Traceback (most recent call last): File "/tmp/tmpmy4t1qfc/tmppct4wg5o.py", line 31, in <module> array_length = int(_input[0]) ~~~~~~^^^ IndexError: list index out of range
s813406616
p02278
u918276501
1508063320
Python
Python3
py
Runtime Error
0
0
767
def swap(A,i,j): A[i],A[j] = A[j],A[i] return A def mincost(A): B = sorted(A) cost = 0 for i, bi in enumerate(B): t = 0 j = A.index(bi) tmp_cost = 0 # swap in a cyclic group while j != i: t += 1 bj = B[j] k = ...
Traceback (most recent call last): File "/tmp/tmpc1r0xh3l/tmpa6__zst8.py", line 34, in <module> input() EOFError: EOF when reading a line
s019119332
p02278
u957470671
1511917819
Python
Python3
py
Runtime Error
20
5600
550
# line = "4 3 2 1" # L = [int(x) for x in line.split()] # n = len(L) n = int(input()) line = input() L = [int(x) for x in line.split()] flags = [False] * n loops = [] for i, x in enumerate(L): k = x - 1 if flags[k]: continue if i == k: flags[i] = True continue loop = [] w...
Traceback (most recent call last): File "/tmp/tmpbaywjafn/tmp5_svd4_1.py", line 5, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s416905491
p02278
u957470671
1511917903
Python
Python3
py
Runtime Error
20
5604
480
n = int(input()) line = input() L = [int(x) for x in line.split()] flags = [False] * n loops = [] for i, x in enumerate(L): k = x - 1 if flags[k]: continue if i == k: flags[i] = True continue loop = [] while x not in loop: flags[k] = True loop.append(x) ...
Traceback (most recent call last): File "/tmp/tmpcg2sdwtx/tmp2k8zwhlw.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s466438584
p02278
u426534722
1517324830
Python
Python3
py
Runtime Error
0
0
579
n = int(input()) A = list(map(int, input().split())) s = min(A) def solve(): ans = 0 V = [False] * n # B = sorted(A) # T = {B[i]: i for i in range(n)} T = {B: i for i, B in enumerate(sorted(A))} for i in range(n): if V[i]: continue cur = i S = an = 0 m = ...
File "/tmp/tmp_jgkfz55/tmpx49romjb.py", line 9 T = {B: i for i, B in enumerate(sorted(A))} TabError: inconsistent use of tabs and spaces in indentation
s404025644
p02278
u150984829
1518977988
Python
Python3
py
Runtime Error
0
0
226
n=int(input()) a=list(map(int, input().split())) b=sorted(a) c=0 for i in range(n): x=a.index(b[i]) j=0 while x > i: j+=1 y=a.index(b[x]) c+=a[b] a[x],a[y]=a[y],a[x] x=y c+=min(b[i]*j,b[i]*2+b[0]*(j+2)) print(c)
Traceback (most recent call last): File "/tmp/tmp3bh3mqea/tmpg62s_kvj.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s676599596
p02278
u500386459
1519402405
Python
Python3
py
Runtime Error
0
0
1208
let quick_sort a n cmp = let swap i j = let tmp = a.(i) in a.(i) <- a.(j); a.(j) <- tmp in let partition p r = let i = ref p in for j = p to r - 1 do if cmp a.(j) a.(r) <= 0 then (swap !i j; incr i) done; swap !i r; !i in let rec doit p r = if p >= r then () else let q = partitio...
File "/tmp/tmpt3elr98w/tmp6y4q6jjg.py", line 1 let quick_sort a n cmp = ^^^^^^^^^^ SyntaxError: invalid syntax
s092462832
p02278
u500386459
1519402412
Python
Python
py
Runtime Error
0
0
1208
let quick_sort a n cmp = let swap i j = let tmp = a.(i) in a.(i) <- a.(j); a.(j) <- tmp in let partition p r = let i = ref p in for j = p to r - 1 do if cmp a.(j) a.(r) <= 0 then (swap !i j; incr i) done; swap !i r; !i in let rec doit p r = if p >= r then () else let q = partitio...
File "/tmp/tmp2zozzpgn/tmp99cwgoep.py", line 1 let quick_sort a n cmp = ^^^^^^^^^^ SyntaxError: invalid syntax
s561586851
p02278
u138546245
1524566688
Python
Python3
py
Runtime Error
20
5648
2243
def partition(li, p, r): """Separate li with a value of li[r]. Returns index of the partition value. >>> ax = [13, 19, 9, 5, 12, 8, 7, 4, 21, 2, 6, 11] >>> partition(ax, 0, 11) 7 >>> ax [9, 5, 8, 7, 4, 2, 6, 11, 21, 13, 19, 12] """ x = li[r] i = p - 1 for j in range(p, r): ...
Traceback (most recent call last): File "/tmp/tmpatxtipu8/tmpfxzek6ob.py", line 103, in <module> run() File "/tmp/tmpatxtipu8/tmpfxzek6ob.py", line 94, in run _ = int(input()) # flake8: noqa ^^^^^^^ EOFError: EOF when reading a line
s538963761
p02278
u318430977
1528817706
Python
Python3
py
Runtime Error
20
5612
1290
def partition(a, p, r): x = a[r] i = p - 1 for j in range(p, r): if a[j] <= x: i += 1 tmp = a[i] a[i] = a[j] a[j] = tmp tmp = a[i+1] a[i+1] = a[r] a[r] = tmp return i + 1 def quick_sort(a, p, r): if p < r: q = partition(a,...
Traceback (most recent call last): File "/tmp/tmpzxgmf52m/tmpq0o6fg2c.py", line 58, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s616023301
p02278
u318430977
1528817986
Python
Python3
py
Runtime Error
30
5624
1392
def partition(a, p, r): x = a[r] i = p - 1 for j in range(p, r): if a[j] <= x: i += 1 tmp = a[i] a[i] = a[j] a[j] = tmp tmp = a[i+1] a[i+1] = a[r] a[r] = tmp return i + 1 def quick_sort(a, p, r): if p < r: q = partition(a,...
Traceback (most recent call last): File "/tmp/tmpub06j0za/tmp_q2rz2lo.py", line 61, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s875012938
p02279
u153665391
1531230222
Python
Python3
py
Runtime Error
0
0
1525
N = int(input()) def get_parent(node): parent = -1 if "parent" in node: parent = node["parent"] return parent def get_depth(node): depth = 0 while "parent" not in node: depth += 1 parent = node["parent"] node = rooted_tree[parent] return depth def get_node_type...
Traceback (most recent call last): File "/tmp/tmp3lk_3a_d/tmphws_13b9.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s118951374
p02279
u153665391
1531436040
Python
Python3
py
Runtime Error
20
5612
1701
N = int(input()) def get_parent(node): parent = -1 if "parent" in node: parent = node["parent"] return parent def get_node_type(node): if "parent" not in node: return "root" if "left" not in node: return "leaf" return "internal node" def get_children(node): if "lef...
Traceback (most recent call last): File "/tmp/tmp7vk5aa7g/tmp5q06fclw.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s411722048
p02279
u657361950
1531707092
Python
Python3
py
Runtime Error
0
0
2011
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class Main { static class Node { int id; int parentId; int depth; int[] children; public Node(int id, int parentId) { this.id = id; this.paren...
File "/tmp/tmpxss4eyhv/tmp4jzr9pue.py", line 7 public class Main { ^^^^^ SyntaxError: invalid syntax
s603592848
p02279
u657361950
1531790943
Python
Python3
py
Runtime Error
0
0
1349
class Node: def __init__(self, id): self.id = id self.parent_id = -1 self.depth = -1 self.children = None def get_type(self): if self.parent_id == -1: return 'root' elif self.children == None or len(self.children) == 0: return 'leaf' return 'internal node' def __str__(self): strNode = 'node ' +...
File "/tmp/tmp087_mst0/tmp5g4n_n1h.py", line 55 for i in range(n): IndentationError: expected an indented block after 'for' statement on line 55
s474523829
p02279
u637322311
1535099929
Python
Python3
py
Runtime Error
20
5612
1125
from sys import stdin class Node(object): def __init__(self, parent=None, children=None, name=None, depth=None): self.parent = parent self.children = children self.name = name self.depth = depth def set_depth(nodes, u): p = nodes[u].parent d = nodes[p].depth if d != Non...
Traceback (most recent call last): File "/tmp/tmp9_mbkewo/tmprmgn5hdh.py", line 30, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s016238642
p02279
u487861672
1535698209
Python
Python3
py
Runtime Error
20
5608
898
#! /usr/local/bin/python3 # coding: utf-8 class Node(): def __init__(self, parent=-1, child=[]): self.parent = parent self.child = child def node_depth(u, id): if u[id].parent == -1: return 0 else: return node_depth(u, u[id].parent) + 1 def node_type(u, id): if u[id...
Traceback (most recent call last): File "/tmp/tmp0fmwabf5/tmpbnhdirqt.py", line 44, in <module> main() File "/tmp/tmp0fmwabf5/tmpbnhdirqt.py", line 28, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s077990586
p02279
u487861672
1535698304
Python
Python3
py
Runtime Error
20
5616
987
#! /usr/local/bin/python3 # coding: utf-8 from sys import setrecursionlimit setrecursionlimit(21) class Node(): def __init__(self, parent=-1, child=[]): self.parent = parent self.child = child def node_depth(u, id): if u[id].parent == -1: return 0 else: return node_dept...
Traceback (most recent call last): File "/tmp/tmpdj7nuxk5/tmpnuasvmqe.py", line 49, in <module> main() File "/tmp/tmpdj7nuxk5/tmpnuasvmqe.py", line 32, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s356769780
p02279
u487861672
1535698327
Python
Python3
py
Runtime Error
20
5620
987
#! /usr/local/bin/python3 # coding: utf-8 from sys import setrecursionlimit setrecursionlimit(22) class Node(): def __init__(self, parent=-1, child=[]): self.parent = parent self.child = child def node_depth(u, id): if u[id].parent == -1: return 0 else: return node_dept...
Traceback (most recent call last): File "/tmp/tmpuoirx8ja/tmp9lo0lhdl.py", line 49, in <module> main() File "/tmp/tmpuoirx8ja/tmp9lo0lhdl.py", line 32, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s510482477
p02279
u487861672
1535975339
Python
Python3
py
Runtime Error
20
5616
1410
class Node(): NIL = -1 def __init__(self, parent=NIL, left=NIL, right=NIL, depth=-1): self.parent = parent self.left = left self.right = right self.depth = depth def read_nodes(T): for _ in range(len(T)): id, _, *child = [int(x) for x in input().split()] for...
Traceback (most recent call last): File "/tmp/tmp26yeawv9/tmpwnwen_qp.py", line 64, in <module> main() File "/tmp/tmp26yeawv9/tmpwnwen_qp.py", line 57, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s766638627
p02279
u487861672
1535975667
Python
Python3
py
Runtime Error
0
0
1481
from sys import setrecursionlimit setrecursionlimit(1000) class Node(): NIL = -1 def __init__(self, parent=NIL, left=NIL, right=NIL, depth=-1): self.parent = parent self.left = left self.right = right self.depth = depth def read_nodes(T): for _ in range(len(T))...
File "/tmp/tmpj4cktvai/tmpk78n825d.py", line 1 from sys import setrecursionlimit IndentationError: unexpected indent
s195783752
p02279
u487861672
1535975690
Python
Python3
py
Runtime Error
20
5620
1472
from sys import setrecursionlimit setrecursionlimit(1000) class Node(): NIL = -1 def __init__(self, parent=NIL, left=NIL, right=NIL, depth=-1): self.parent = parent self.left = left self.right = right self.depth = depth def read_nodes(T): for _ in range(len(T)): ...
Traceback (most recent call last): File "/tmp/tmp9178y9yo/tmpi44c2qg6.py", line 67, in <module> main() File "/tmp/tmp9178y9yo/tmpi44c2qg6.py", line 60, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s780475739
p02279
u487861672
1535975734
Python
Python3
py
Runtime Error
20
5620
1474
from sys import setrecursionlimit setrecursionlimit(200000) class Node(): NIL = -1 def __init__(self, parent=NIL, left=NIL, right=NIL, depth=-1): self.parent = parent self.left = left self.right = right self.depth = depth def read_nodes(T): for _ in range(len(T)): ...
Traceback (most recent call last): File "/tmp/tmpgzwxqw0u/tmpmu0k9esa.py", line 67, in <module> main() File "/tmp/tmpgzwxqw0u/tmpmu0k9esa.py", line 60, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s153622781
p02279
u487861672
1535976010
Python
Python3
py
Runtime Error
20
5616
1474
from sys import setrecursionlimit setrecursionlimit(100000) class Node(): NIL = -1 def __init__(self, parent=NIL, left=NIL, right=NIL, depth=-1): self.parent = parent self.left = left self.right = right self.depth = depth def read_nodes(T): for _ in range(len(T)): ...
Traceback (most recent call last): File "/tmp/tmpcyr_5tsj/tmp2vcekub3.py", line 67, in <module> main() File "/tmp/tmpcyr_5tsj/tmp2vcekub3.py", line 60, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s256653212
p02279
u487861672
1535976026
Python
Python3
py
Runtime Error
20
5616
1473
from sys import setrecursionlimit setrecursionlimit(50000) class Node(): NIL = -1 def __init__(self, parent=NIL, left=NIL, right=NIL, depth=-1): self.parent = parent self.left = left self.right = right self.depth = depth def read_nodes(T): for _ in range(len(T)): ...
Traceback (most recent call last): File "/tmp/tmpqb25t0hi/tmplenav03a.py", line 67, in <module> main() File "/tmp/tmpqb25t0hi/tmplenav03a.py", line 60, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s891273863
p02279
u487861672
1535976049
Python
Python3
py
Runtime Error
30
5620
1473
from sys import setrecursionlimit setrecursionlimit(99999) class Node(): NIL = -1 def __init__(self, parent=NIL, left=NIL, right=NIL, depth=-1): self.parent = parent self.left = left self.right = right self.depth = depth def read_nodes(T): for _ in range(len(T)): ...
Traceback (most recent call last): File "/tmp/tmpa2gtdbiz/tmp0pjf7eqv.py", line 67, in <module> main() File "/tmp/tmpa2gtdbiz/tmp0pjf7eqv.py", line 60, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s084869984
p02279
u609159835
1546151307
Python
Python3
py
Runtime Error
0
0
1427
#include<stdio.h> #include<stdlib.h> #define MAX 100000 #define NIL -1 typedef struct node { int p; int l; int r; } Node; Node no[MAX]; int D[MAX]; void setDepth(int u, int p){ D[u] = p; if(no[u].l != NIL){ setDepth(no[u].l, p + 1); } if (no[u].r != NIL){ setDepth(no[u]...
File "/tmp/tmp65ullto_/tmpec2k0i38.py", line 6 typedef struct node { ^^^^^^ SyntaxError: invalid syntax
s467622726
p02279
u631142478
1559360041
Python
Python3
py
Runtime Error
20
5620
1038
class Node(): def __init__(self, p, l, r): self.p = p self.l = l self.r = r def rec(u, p): D[u] = p if T[u].r != -1: rec(T[u].r, p) if T[u].l != -1: rec(T[u].l, p + 1) N = int(input()) T = [Node(-1, -1, -1) for _ in range(N)] D = [-1] * N for i in range(N): ...
Traceback (most recent call last): File "/tmp/tmpqn7bvlww/tmpsvbnep4h.py", line 16, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s235773555
p02279
u631142478
1559360112
Python
Python3
py
Runtime Error
20
5624
1080
import sys sys.setrecursionlimit(10000) class Node(): def __init__(self, p, l, r): self.p = p self.l = l self.r = r def rec(u, p): D[u] = p if T[u].r != -1: rec(T[u].r, p) if T[u].l != -1: rec(T[u].l, p + 1) N = int(input()) T = [Node(-1, -1, -1) for _ in ra...
Traceback (most recent call last): File "/tmp/tmph4v8pfyx/tmpzkeeq7qd.py", line 20, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s086467730
p02279
u631142478
1559360131
Python
Python3
py
Runtime Error
20
5624
1081
import sys sys.setrecursionlimit(100000) class Node(): def __init__(self, p, l, r): self.p = p self.l = l self.r = r def rec(u, p): D[u] = p if T[u].r != -1: rec(T[u].r, p) if T[u].l != -1: rec(T[u].l, p + 1) N = int(input()) T = [Node(-1, -1, -1) for _ in r...
Traceback (most recent call last): File "/tmp/tmp9dpo9s1q/tmp565shrc2.py", line 20, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s592896594
p02279
u567380442
1421820075
Python
Python3
py
Runtime Error
0
0
1370
class Tree(): def __init__(self, root_id): self.nodes = {root_id:Node(root_id)} def add_node(self, parent_id, child_id): child = Node(child_id, self.nodes[parent_id]) self.nodes[child.id] = child class Node(): def __init__(self, id, parent = None): self.id = id s...
Traceback (most recent call last): File "/tmp/tmp3tra9f5p/tmp1i58zkt4.py", line 35, in <module> tree NameError: name 'tree' is not defined. Did you mean: 'Tree'?
s645412441
p02279
u567380442
1421820259
Python
Python3
py
Runtime Error
30
6752
1377
class Tree(): def __init__(self, root_id): self.nodes = {root_id:Node(root_id)} def add_node(self, parent_id, child_id): child = Node(child_id, self.nodes[parent_id]) self.nodes[child.id] = child class Node(): def __init__(self, id, parent = None): self.id = id s...
Traceback (most recent call last): File "/tmp/tmppj8qpk06/tmpz2oblhwm.py", line 37, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s457390630
p02279
u253463900
1445866965
Python
Python3
py
Runtime Error
40
7784
1638
def Get_leafs_list(T, p): l = p.l ans = [] while(T[l].r != -1): ans.append(T[l].r) l = T[l].r return ans def rec(T,node, p): T[node].d = p if(T[node].r != -1): rec(T,T[node].r, p) if(T[node].l != -1): rec(T,T[node].l, p+1) class Node(): def __init__(sel...
Traceback (most recent call last): File "/tmp/tmpp59ca7dd/tmp_f2r3c5x.py", line 52, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s126259604
p02279
u881590806
1448767798
Python
Python
py
Runtime Error
20
6416
1328
class Node: def __init__(self, parent, left, right): self.parent = parent self.left = left self.right = right def get_type(self): if self.parent == -1: return "root" elif self.left == -1: return "leaf" else: return "internal node" def set_depth(u,d): global ...
File "/tmp/tmpko_ed4vd/tmpp9cokgow.py", line 30 print "node %s: parent = %s, depth = %s, %s, [%s]" % (i, t[i].parent, D[i], t[i].get_type(), ", ".join(map(str, children))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: M...
s122212381
p02279
u881590806
1448874506
Python
Python
py
Runtime Error
10
6500
1336
class Node: def __init__(self, parent, left, right): self.parent = parent self.left = left self.right = right def get_type(self): if self.parent == -1: return "root" elif self.left == -1: return "leaf" else: return "internal node" def set_depth(u,d): global ...
File "/tmp/tmpsjtjmaow/tmp0ahmnapv.py", line 30 print "node %s: parent = %s, depth = %s, %s, [%s]" % (i, t[i].parent, D[i], t[i].get_type(), ", ".join(map(str, children))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: M...
s809884429
p02279
u881590806
1448874959
Python
Python
py
Runtime Error
10
6332
1346
class Node: def __init__(self, parent, left, right): self.parent = parent self.left = left self.right = right def get_type(self): if self.parent == -1: return "root" elif self.left == -1: return "leaf" else: return "internal node" def set_depth(u,d): global ...
File "/tmp/tmpc6xcms3o/tmpwq7qcchd.py", line 31 print "node %s: parent = %s, depth = %s, %s, [%s]" % (i, t[i].parent, D[i], t[i].get_type(), ", ".join(map(str, children))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: M...
s602830499
p02279
u797673668
1454172466
Python
Python3
py
Runtime Error
20
7744
1134
n = int(input()) tree = [None] * n formatted_tree = [None] * n def register_node(i, node, searching): if not searching: return False for si, st in enumerate(searching[1]): if st[0] == i: searching[1][si] = node return True elif st[1]: if register_nod...
Traceback (most recent call last): File "/tmp/tmptagrg74j/tmpo7y1ctyv.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s582912421
p02279
u072053884
1454781859
Python
Python3
py
Runtime Error
30
7804
1798
"""Rooted Trees.""" class Node: def __init__(self, num, parent, rightSibling, *children): self.id = num self.parent = parent self.rightSibling = rightSibling self.children = list(children) self.depth = 0 def showInfo(self): print('node {0}: '.format(self.id), end...
Traceback (most recent call last): File "/tmp/tmp8jcmmv2l/tmp21dc5mor.py", line 58, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s504083169
p02279
u072053884
1454783019
Python
Python3
py
Runtime Error
20
7868
1813
"""Rooted Trees.""" class Node: def __init__(self, num, parent, rightSibling, *children): self.id = num self.parent = parent self.rightSibling = rightSibling self.children = list(children) self.depth = 0 def showInfo(self): print('node {0}: '.format(self.id), end...
Traceback (most recent call last): File "/tmp/tmpk3lf91tg/tmpcowyiqff.py", line 58, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s584455858
p02279
u072053884
1454783492
Python
Python3
py
Runtime Error
660
90272
1844
"""Rooted Trees.""" class Node: def __init__(self, num, parent, rightSibling, *children): self.id = num self.parent = parent self.rightSibling = rightSibling self.children = list(children) self.depth = 0 def showInfo(self): print('node {0}: '.format(self.id), end...
Traceback (most recent call last): File "/tmp/tmp8jy8ww40/tmpkyl6x4kf.py", line 60, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s098971326
p02279
u072053884
1454783544
Python
Python3
py
Runtime Error
570
90472
1845
"""Rooted Trees.""" class Node: def __init__(self, num, parent, rightSibling, *children): self.id = num self.parent = parent self.rightSibling = rightSibling self.children = list(children) self.depth = 0 def showInfo(self): print('node {0}: '.format(self.id), end...
Traceback (most recent call last): File "/tmp/tmpf_pgoop3/tmpd8o2cy9o.py", line 60, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s695448265
p02279
u341533698
1454852279
Python
Python
py
Runtime Error
10
6488
1401
import sys n = int(raw_input()) #class of node class Node: def __init__(self): self.p = -1 self.l = -1 self.r = -1 T = [ Node() for _ in xrange(n)] #info of u D = [0] * n #depth of u def printInfo(u): #print 'node', u, ':', #print 'parent = ', T[u].p, ',', #print 'depth = ',...
File "/tmp/tmpd_z6lsw7/tmp_lx46uzx.py", line 20 print "node {}: parent = {}, depth = {},".format(u, T[u].p, D[u]) , ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s312818756
p02279
u247976584
1454910478
Python
Python3
py
Runtime Error
30
8184
1579
from collections import deque, namedtuple class RootedTree: def __init__(self, t, n): self.t = t self.n = n self.d = [-1] * n def setDepth(self, u, p): self.d[u] = p if self.t[u].r != -1: self.setDepth(self.t[u].r, p) if self.t[u].l != -1: ...
Traceback (most recent call last): File "/tmp/tmp25nyll57/tmp1l9t3yim.py", line 35, in <module> n = int(input().rstrip()) ^^^^^^^ EOFError: EOF when reading a line
s536717301
p02279
u247976584
1454910836
Python
Python3
py
Runtime Error
30
8204
1619
from collections import deque, namedtuple import sys sys.setrecursionlimit(10000) class RootedTree: def __init__(self, t, n): self.t = t self.n = n self.d = [-1] * n def setDepth(self, u, p): self.d[u] = p if self.t[u].r != -1: self.setDepth(self.t[u].r, p) ...
Traceback (most recent call last): File "/tmp/tmpm6tapa8g/tmptq23dgwt.py", line 37, in <module> n = int(input().rstrip()) ^^^^^^^ EOFError: EOF when reading a line
s470088129
p02279
u247976584
1454910942
Python
Python3
py
Runtime Error
1060
63832
1620
from collections import deque, namedtuple import sys sys.setrecursionlimit(100000) class RootedTree: def __init__(self, t, n): self.t = t self.n = n self.d = [-1] * n def setDepth(self, u, p): self.d[u] = p if self.t[u].r != -1: self.setDepth(self.t[u].r, p) ...
Traceback (most recent call last): File "/tmp/tmp5mib4_40/tmpvnrwrbq9.py", line 37, in <module> n = int(input().rstrip()) ^^^^^^^ EOFError: EOF when reading a line
s282886033
p02279
u247976584
1454911142
Python
Python3
py
Runtime Error
1080
63852
1621
from collections import deque, namedtuple import sys sys.setrecursionlimit(1000000) class RootedTree: def __init__(self, t, n): self.t = t self.n = n self.d = [-1] * n def setDepth(self, u, p): self.d[u] = p if self.t[u].r != -1: self.setDepth(self.t[u].r, p)...
Traceback (most recent call last): File "/tmp/tmpuiuvyhkw/tmpnwq3g_in.py", line 37, in <module> n = int(input().rstrip()) ^^^^^^^ EOFError: EOF when reading a line
s229368194
p02279
u247976584
1454911342
Python
Python3
py
Runtime Error
1080
63404
1623
from collections import deque, namedtuple import sys sys.setrecursionlimit(100000000) class RootedTree: def __init__(self, t, n): self.t = t self.n = n self.d = [-1] * n def setDepth(self, u, p): self.d[u] = p if self.t[u].r != -1: self.setDepth(self.t[u].r, ...
Traceback (most recent call last): File "/tmp/tmp4pdtfpqx/tmp6_3jknuk.py", line 37, in <module> n = int(input().rstrip()) ^^^^^^^ EOFError: EOF when reading a line
s658952893
p02279
u247976584
1454911545
Python
Python3
py
Runtime Error
1070
63844
1619
from collections import deque, namedtuple import sys sys.setrecursionlimit(1000000000) class RootedTree: def __init__(self, t, n): self.t = t self.n = n self.d = [-1] * n def setDepth(self, u, p): self.d[u] = p if self.t[u].r != -1: self.setDepth(self.t[u].r,...
Traceback (most recent call last): File "/tmp/tmppkxshuoq/tmpkwj184lr.py", line 37, in <module> n = int(input().rstrip()) ^^^^^^^ EOFError: EOF when reading a line
s699996899
p02279
u963402991
1459994124
Python
Python3
py
Runtime Error
0
0
999
class Node: def __init__(self, num, parent, children): self.id = num self.parent = -1 self.depth = 0 self.type = None self.children = children def show_info(self): print('node {0}: parent = {1}, depth = {2}, {3}, {4}'.format(self.id, self.parent, self.depth,self...
Traceback (most recent call last): File "/tmp/tmp1l342ksy/tmprdrcm729.py", line 35, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s476940978
p02279
u317901693
1477022668
Python
Python3
py
Runtime Error
0
0
1603
# -*- coding: utf-8 -*- class Node(object): # left????????¨??????????????????(leaf), right???s?????¨?????????????????????????????? # ???????????????????????????????????¨???????????´??????parent???-1????????? def __init__(self, N): self.p = [-1 for i in range(N)] self.l = [-1 for i in range(...
/tmp/tmp8xs1miyu/tmpsid3fikk.py:14: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.r[u] is not -1: /tmp/tmp8xs1miyu/tmpsid3fikk.py:16: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.l[u] is not -1: /tmp/tmp8xs1miyu/tmpsid3fikk.py:22: SyntaxWarning: "is not" with a literal. Di...
s074616888
p02279
u317901693
1477022784
Python
Python3
py
Runtime Error
0
0
1303
class Node(object): def __init__(self, N): self.p = [-1 for i in range(N)] self.l = [-1 for i in range(N)] self.r = [-1 for i in range(N)] self.D = [-1 for i in range(N)] def set_depth(self, u, p): self.D[u] = p if self.r[u] is not -1: self.set_depth(...
/tmp/tmp0u9puc9w/tmpvddknya5.py:10: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.r[u] is not -1: /tmp/tmp0u9puc9w/tmpvddknya5.py:12: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.l[u] is not -1: /tmp/tmp0u9puc9w/tmpvddknya5.py:18: SyntaxWarning: "is not" with a literal. Di...
s562523852
p02279
u317901693
1477022822
Python
Python3
py
Runtime Error
0
0
1251
class Node(object): def __init__(self, N): self.p = [-1 for i in range(N)] self.l = [-1 for i in range(N)] self.r = [-1 for i in range(N)] self.D = [-1 for i in range(N)] def set_depth(self, u, p): self.D[u] = p if self.r[u] is not -1: self.set_depth(...
/tmp/tmpxl9h4ouh/tmpvajhrjcx.py:10: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.r[u] is not -1: /tmp/tmpxl9h4ouh/tmpvajhrjcx.py:12: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.l[u] is not -1: /tmp/tmpxl9h4ouh/tmpvajhrjcx.py:18: SyntaxWarning: "is not" with a literal. Di...
s155269556
p02279
u317901693
1477023278
Python
Python3
py
Runtime Error
0
0
1264
class Node(object): def __init__(self, N): self.p = [-1 for i in range(N)] self.l = [-1 for i in range(N)] self.r = [-1 for i in range(N)] self.D = [-1 for i in range(N)] def set_depth(self, u, p): self.D[u] = p if self.r[u] is not -1: self.set_depth...
/tmp/tmpzii264k9/tmpktberl1o.py:10: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.r[u] is not -1: /tmp/tmpzii264k9/tmpktberl1o.py:12: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.l[u] is not -1: /tmp/tmpzii264k9/tmpktberl1o.py:18: SyntaxWarning: "is not" with a literal. Di...
s206480495
p02279
u317901693
1477024099
Python
Python3
py
Runtime Error
20
7792
1522
# -*- coding: utf-8 -*- class Node(object): # left????????¨??????????????????(leaf), right???s?????¨?????????????????????????????? # ???????????????????????????????????¨???????????´??????parent???-1????????? def __init__(self, N): self.p = [-1 for i in range(N)] self.l = [-1 for i in range(...
/tmp/tmp05hpvmqi/tmpy5xk4ztx.py:14: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.r[u] is not -1: /tmp/tmp05hpvmqi/tmpy5xk4ztx.py:16: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.l[u] is not -1: /tmp/tmp05hpvmqi/tmpy5xk4ztx.py:22: SyntaxWarning: "is not" with a literal. Di...
s721720362
p02279
u317901693
1477032244
Python
Python3
py
Runtime Error
0
0
1562
# -*- coding: utf-8 -*- import sys sys.getrecursionlimit(10000) class Node(object): # left????????¨??????????????????(leaf), right???s?????¨?????????????????????????????? # ???????????????????????????????????¨???????????´??????parent???-1????????? def __init__(self, N): self.p = [-1 for i in range(N...
/tmp/tmpqah3ryt6/tmp77esn4zy.py:15: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.r[u] is not -1: /tmp/tmpqah3ryt6/tmp77esn4zy.py:17: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.l[u] is not -1: /tmp/tmpqah3ryt6/tmp77esn4zy.py:23: SyntaxWarning: "is not" with a literal. Di...
s601939799
p02279
u317901693
1477032355
Python
Python3
py
Runtime Error
30
7844
1563
# -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10000) class Node(object): # left????????¨??????????????????(leaf), right???s?????¨?????????????????????????????? # ???????????????????????????????????¨???????????´??????parent???-1????????? def __init__(self, N): self.p = [-1 for i in range...
/tmp/tmp4l0va1q0/tmpgbkhs0s1.py:17: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.r[u] is not -1: /tmp/tmp4l0va1q0/tmpgbkhs0s1.py:19: SyntaxWarning: "is not" with a literal. Did you mean "!="? if self.l[u] is not -1: /tmp/tmp4l0va1q0/tmpgbkhs0s1.py:25: SyntaxWarning: "is not" with a literal. Di...
s276554044
p02279
u811733736
1480917355
Python
Python3
py
Runtime Error
0
0
2133
class Node(object): def __init__(self, parent, left, right): self.parent = parent # ???????????? self.left = left # ?????????????????????????????????????????? self.right = right # ??????????????????????????????????????´????????? def get_depth(self): if self.parent == No...
Traceback (most recent call last): File "/tmp/tmp0mx7nque/tmpqorglx5c.py", line 50, in <module> num_of_nodes = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s493841072
p02279
u811733736
1480917631
Python
Python3
py
Runtime Error
30
7820
2195
class Node(object): def __init__(self, parent, left, right): self.parent = parent # ???????????? self.left = left # ?????????????????????????????????????????? self.right = right # ??????????????????????????????????????´????????? def get_depth(self): if self.parent == -...
Traceback (most recent call last): File "/tmp/tmp6u0naf4x/tmpb31gwo6d.py", line 51, in <module> num_of_nodes = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s035135719
p02279
u923668099
1484735458
Python
Python3
py
Runtime Error
20
7872
1296
import sys nil = -1 class Node: def __init__(self, p, l, r): self.p = p self.l = l self.r = r def depth_rec(u, p, depth): depth[u] = p if tree[u].r != nil: depth_rec(tree[u].r, p, depth) if tree[u].l != nil: depth_rec(tree[u].l, p + 1, depth) pass n = int(...
Traceback (most recent call last): File "/tmp/tmps1gxv3l1/tmp_2t52ing.py", line 19, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s160063647
p02279
u923668099
1484735617
Python
Python3
py
Runtime Error
550
72936
1327
import sys sys.setrecursionlimit(10 ** 6) nil = -1 class Node: def __init__(self, p, l, r): self.p = p self.l = l self.r = r def depth_rec(u, p, depth): depth[u] = p if tree[u].r != nil: depth_rec(tree[u].r, p, depth) if tree[u].l != nil: depth_rec(tree[u].l, p...
Traceback (most recent call last): File "/tmp/tmp1846k06f/tmp3skq4zqu.py", line 20, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s045446283
p02279
u923668099
1484735679
Python
Python3
py
Runtime Error
520
72808
1327
import sys sys.setrecursionlimit(10 ** 8) nil = -1 class Node: def __init__(self, p, l, r): self.p = p self.l = l self.r = r def depth_rec(u, p, depth): depth[u] = p if tree[u].r != nil: depth_rec(tree[u].r, p, depth) if tree[u].l != nil: depth_rec(tree[u].l, p...
Traceback (most recent call last): File "/tmp/tmppv35dd2u/tmpa44qe9dm.py", line 20, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s084862864
p02279
u923668099
1484735830
Python
Python3
py
Runtime Error
510
72812
1327
import sys sys.setrecursionlimit(10 ** 9) nil = -1 class Node: def __init__(self, p, l, r): self.p = p self.l = l self.r = r def depth_rec(u, p, depth): depth[u] = p if tree[u].r != nil: depth_rec(tree[u].r, p, depth) if tree[u].l != nil: depth_rec(tree[u].l, p...
Traceback (most recent call last): File "/tmp/tmp8z1aah3d/tmplp1u76dv.py", line 20, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s462681322
p02279
u564398841
1486285587
Python
Python3
py
Runtime Error
0
0
1187
fin = open('sample.txt') input = fin.readline def main(): N = int(input()) A = [0] * N node_info = [[-1, 0, 'internal node', None] for _ in range(int(1E5 + 1))] for i in range(N): A[i] = [int(i) for i in input().strip().split()] for line in A: if line[1] != 0: node_info...
Traceback (most recent call last): File "/tmp/tmpmjo0qsru/tmpsvyymtfg.py", line 1, in <module> fin = open('sample.txt') ^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'sample.txt'