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
s692870752
p02261
u637322311
1531748937
Python
Python3
py
Runtime Error
0
0
1406
import copy def print_list(A): print(*A, sep=" ") def swap(a, b): return b, a def val(str): return int(str[1]) def is_stable(_in, _out, n): for i in range(0, n): for j in range(i+1, n): for a in range(0, n): for b in range(a+1, n): if val(_in[i...
Traceback (most recent call last): File "/tmp/tmpx6odj3cp/tmpg9l71iij.py", line 57, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s680479326
p02261
u637322311
1531749111
Python
Python3
py
Runtime Error
0
0
1406
import copy def print_list(A): print(*A, sep=" ") def swap(a, b): return b, a def val(str): return int(str[1]) def is_stable(_in, _out, n): for i in range(0, n): for j in range(i+1, n): for a in range(0, n): for b in range(a+1, n): if val(_in[i...
Traceback (most recent call last): File "/tmp/tmpyuwm_lq6/tmp6neclyc3.py", line 57, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s269496964
p02261
u313089641
1531758061
Python
Python3
py
Runtime Error
0
0
1499
_ = int(input()) l2 = list(map(int, input().split())) class Card(): def __init__(self, card): self.card = card self.mark = card[0] self.number = card[1] def __lt__(self, other): if not isinstance(other, Card): return NotImplemented return self.numbe...
Traceback (most recent call last): File "/tmp/tmpthyj2ngl/tmpoj47o3zl.py", line 1, in <module> _ = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s288480625
p02261
u635209856
1541160299
Python
Python3
py
Runtime Error
0
0
709
def bubble(A): flag=True; n=len(A) i=0 while flag: for j in range(n-1,i,-1): if A[j][1]<A[j-1][1]: A[j],A[j-1]=A[j-1],A[j] flag=True i+=1 def selection(A): n=len(A) for i in range(n): minj=i for j in range(i,n): ...
File "/tmp/tmp6q9jm6a8/tmptm_497kq.py", line 18 if i!=minj: IndentationError: expected an indented block after 'if' statement on line 17
s071717059
p02261
u312681524
1546420457
Python
Python
py
Runtime Error
0
0
1203
<?php fscanf(STDIN, '%d', $N); $line = trim(fgets(STDIN)); $arr = explode(' ', $line); $bubbleArr = BubbleSort($arr,$N); echo(implode(' ',$bubbleArr).PHP_EOL."Stable".PHP_EOL); $selectionArr = SelectionSort($arr,$N); echo implode(" ",$selectionArr) . PHP_EOL; isStable($bubbleArr, $selectionArr); function BubbleSort($...
File "/tmp/tmp1mrihbw2/tmprfim8__o.py", line 1 <?php ^ SyntaxError: invalid syntax
s502861917
p02261
u412294315
1559288406
Python
Python3
py
Runtime Error
20
5624
1568
class Sort(): def __init__(self,n,cards): self.cards = cards self.n = n def bubble_sort(self): # bubble sort flag = 1 while flag != 0: flag = 0 rev = list(range(1,self.n)) rev.reverse() for j in rev: if int(self.cards[j][1]) < int(self.cards[j-1][1]): self.cards[j],self.cards[j-1] = se...
Traceback (most recent call last): File "/tmp/tmp4dnqrse6/tmp52qg2kqp.py", line 52, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s737804692
p02261
u567380442
1421308790
Python
Python3
py
Runtime Error
0
0
928
def compare_cards(a, b): return a[1] < b[1] def bubble(C): for i in range(len(C)): for j in range(len(C) - 1, i, -1): if compare_cards(C[j], C[j - 1]): C[j], C[j - 1] = C[j -1], C[j] def selection(C): for i in range(len(C)): mini = i for j in range(i, le...
Traceback (most recent call last): File "/tmp/tmpjt7ahld2/tmpe7jbpbem.py", line 26, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s287836713
p02261
u567380442
1421309382
Python
Python3
py
Runtime Error
0
0
863
def compare_cards(a, b): return a[1] < b[1] def bubble(C): for i in range(len(C)): for j in range(len(C) - 1, i, -1): if compare_cards(C[j], C[j - 1]): C[j], C[j - 1] = C[j -1], C[j] def selection(C): for i in range(len(C)): mini = i for...
Traceback (most recent call last): File "/tmp/tmp030h9kdg/tmp1qltmj7t.py", line 26, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s429676893
p02261
u567380442
1421309475
Python
Python3
py
Runtime Error
0
0
312
def compare_cards(a, b): return a[1] < b[1] def bubble(C): for i in range(len(C)): for j in range(len(C) - 1, i, -1): if compare_cards(C[j], C[j - 1]): C[j], C[j - 1] = C[j -1], C[j] N = int(input()) C = input().split() bubbleC = C.copy() bubble(bubbleC) print(*C)
Traceback (most recent call last): File "/tmp/tmp2a84yjug/tmpg4lggv02.py", line 10, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s045058781
p02261
u567380442
1421309628
Python
Python3
py
Runtime Error
0
0
338
def compare_cards(a, b): return a[1] < b[1] def bubble(C): for i in range(len(C)): for j in range(len(C) - 1, i, -1): if compare_cards(C[j], C[j - 1]): C[j], C[j - 1] = C[j -1], C[j] N = int(input()) C = input().split() bubbleC = C.copy() #bubble(bubbleC) compare_cards(C[...
Traceback (most recent call last): File "/tmp/tmprz4wj6ck/tmpytw6_yrq.py", line 10, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s726938574
p02261
u567380442
1421309767
Python
Python3
py
Runtime Error
0
0
152
def compare_cards(a, b): return int(a[1]) < int(b[1]) N = int(input()) C = input().split() bubbleC = C.copy() #compare_cards(C[0],C[1]) print(*C)
Traceback (most recent call last): File "/tmp/tmpypnzq_dp/tmpqdpcmes4.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s149223007
p02261
u313994256
1442293630
Python
Python
py
Runtime Error
0
0
749
#?????????????????? N = int(raw_input()) num_list1 = raw_input().split() num_list2 = num_list1 flag = 1 while flag==1: flag =0 for j in range(N-1,0,-1): if int(num_list1[j][1:]) < int(num_list1[j-1][1:]): a = num_list1[j] num_list1[j] = num_list1[j-1] num_list1[j-1...
File "/tmp/tmpacowvj2z/tmp2op9_gjo.py", line 19 print " ".join(num_list1) ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s141648409
p02261
u885889402
1442293831
Python
Python3
py
Runtime Error
0
0
1338
def str_selection_sort(a,n): m=0 for i in range(0,n): minj=i for j in range(i,n): if(int(a[minj][1:]) > int(a[j][1:])): minj=j if(minj!=i): m+=1 a[minj],a[i] = a[i],a[minj] print(" ".join(a)) return a def bubble_sort(a...
Traceback (most recent call last): File "/tmp/tmpo4d1w43x/tmpjllrujsc.py", line 50, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s972219050
p02261
u885889402
1442293949
Python
Python3
py
Runtime Error
0
0
1315
def str_selection_sort(a,n): m=0 for i in range(0,n): minj=i for j in range(i,n): if(int(a[minj][1:]) > int(a[j][1:])): minj=j if(minj!=i): m+=1 a[minj],a[i] = a[i],a[minj] print(" ".join(a)) return a def bubble_sort(a...
Traceback (most recent call last): File "/tmp/tmpt99ltbvt/tmpm6jy3jcz.py", line 49, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s827990699
p02261
u885889402
1442294019
Python
Python3
py
Runtime Error
0
0
1331
def str_selection_sort(a,n): m=0 for i in range(0,n): minj=i for j in range(i,n): if(int(a[minj][1:]) > int(a[j][1:])): minj=j if(minj!=i): m+=1 a[minj],a[i] = a[i],a[minj] print(" ".join(a)) return a def bubble_sort(a...
Traceback (most recent call last): File "/tmp/tmpdycq8imp/tmp_1094ek8.py", line 50, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s080634886
p02261
u496045719
1469603631
Python
Python3
py
Runtime Error
0
0
1305
STABLE = 'Stable' UNSTABLE = 'Not stable' def main(): card_num = int(input()) cards = input().split() bubble_sorted = bubble_sort(cards, card_num) select_sorted = select_sort(cards, card_num) stability = True for i, c in enumerate(select_sorted): if c != bubble_sorted[i]: stability = False ...
Traceback (most recent call last): File "/tmp/tmpnunvdkcq/tmpqlzw02ye.py", line 60, in <module> main() File "/tmp/tmpnunvdkcq/tmpqlzw02ye.py", line 6, in main card_num = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s080043565
p02261
u390995924
1472572010
Python
Python3
py
Runtime Error
0
0
622
import copy N = int(input()) bscs = [(int(c[-1]), c) for c in input().split(" ")] sscs = copy.copy(bscs) for i in range(N): j = N - 1 while j > i: if bscs[j][0] < bscs[j - 1][0]: tmp = bscs[j] bscs[j] = bscs[j - 1] bscs[j - 1] = tmp j -= 1 print(" ".join([c[1]...
File "/tmp/tmpcbhn5nj0/tmpmjq4zdgh.py", line 13 print(" ".join([c[1] for c in bscs]) ^ SyntaxError: '(' was never closed
s312461867
p02261
u756595712
1474855285
Python
Python3
py
Runtime Error
0
0
603
length = int(input()) eles = [int(l) for l in input().split()] is_stable = 'Stable' import copy _copy = copy.deepcopy(eles) for i in range(length): for j in range(length-1, 0, -1): if _copy[j][1] < _copy[j-1][1]: _copy[j], _copy[j-1] = _copy[j-1], _copy[j] print(*_copy) print(is_stable) __co...
Traceback (most recent call last): File "/tmp/tmp9bkpl8sv/tmpwbn6cskd.py", line 1, in <module> length = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s762224099
p02261
u918276501
1484820510
Python
Python3
py
Runtime Error
0
0
654
n = int(input()) lst = input().split() bub, sel = [lst]*2 sls = [] for i in range(n): m = i li = lst[i][0] if not li in sls: sls.append(li) for j in range(n-1,i,-1): if bub[j] < bub[j-1]: bub[j-1:j+1] = bub[j], bub[j-1] for k in range(i, n): if sel[k][1] < sel[k][...
Traceback (most recent call last): File "/tmp/tmp6hia9ovv/tmpsrftojg4.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s991322285
p02261
u935329231
1485000990
Python
Python3
py
Runtime Error
0
0
1428
# -*- coding: utf-8 -*- def bubble_sort(cards, num): for left in range(num-1): for right in range(left+1, num): if cards[right][1] < cards[left][1]: cards[left], cards[right] = cards[right], cards[left] print(list_to_str(cards)) def selection_sort(cards, num): for head...
File "/tmp/tmpi50z_nhf/tmp_mx7wz5l.py", line 10 print(list_to_str(cards)) ^ IndentationError: unindent does not match any outer indentation level
s127968561
p02261
u895660619
1487543006
Python
Python3
py
Runtime Error
0
0
792
N = int(input()) C = input().split() B = C[:] S = C[:] # bubble sort flag = 1 while(flag): flag = 0 for x in (1, N): if C[x][1:] < C[x-1][1:]: C[x], C[x-1] = C[x-1], C[x] flag = 1 # sectionSot for x in range(0,N): minj = x for j in (x,n): if S[j][1:] < S[minj]...
Traceback (most recent call last): File "/tmp/tmpduccnzzn/tmpthlpr2s_.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s265365504
p02261
u148628801
1488960279
Python
Python3
py
Runtime Error
0
0
600
import sys def bubble_sort(C, N): for i in range(N): for j in range(N - 1, i, -1): if C[j][1] < C[j - 1][1]: C[j], C[j - 1] = C[j - 1], C[j] return C def selection_sort(C, N): for i in range(N): minj = i for j in range(i, N): if C[j][1] < C[minj][1]: minj = j C[i], C[minj] = C[minj], C[...
Traceback (most recent call last): File "/tmp/tmpq88isrrp/tmp7cio3gqd.py", line 22, in <module> fin = open("test.txt", "r") ^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'test.txt'
s699248270
p02261
u548155360
1489035667
Python
Python3
py
Runtime Error
0
0
920
def isStable(inlist, outlist): for i in range(0, N): for j in range(i+1, N): for a in range(0, N): for b in range(a+1, N): if int(inlist[i][1:]) == int(inlist[j][1:]) && inlist[i] == outlist[b] && inlist[j] == outlist[a]: return FALSE break else: return TRUE N = int(input()) A = input()....
File "/tmp/tmpcrbv2oan/tmpxw8prscq.py", line 6 if int(inlist[i][1:]) == int(inlist[j][1:]) && inlist[i] == outlist[b] && inlist[j] == outlist[a]: ^ SyntaxError: invalid syntax
s753756268
p02261
u796784914
1492850806
Python
Python
py
Runtime Error
10
6452
1053
N = input() A = map(str,raw_input().split()) Ab = A[:] As = A[:] def BubbleSort(A,N): for i in range(N): flag = 0 for i in range(1,N): j = N - i if A[j][1] < A[j-1][1]: v = A[j] A[j] = A[j-1] A[j-1] = v flag = 1...
File "/tmp/tmpzgoywel7/tmpgxralro7.py", line 29 print A[i], ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s120107374
p02261
u782850499
1494744784
Python
Python3
py
Runtime Error
0
0
1117
def bubble_sort(num_list): list_b = num_list[:] for i in range(len(list_b)-1): for j in range(len(list_b)-1,i,-1): if list_b[j][1] < list_b[j-1][1]: list_b[j],list_b[j-1] = list_b[j-1],list_b[j] return list_b def selection_sort(num_list): list_s = num_list[:] for...
File "/tmp/tmpv4ggqq9c/tmpmqe009cd.py", line 37 print(isStable(num_list,ss) ^ SyntaxError: '(' was never closed
s028960900
p02261
u782850499
1494744958
Python
Python3
py
Runtime Error
0
0
1120
def bubble_sort(num_list): list_b = num_list[:] for i in range(len(list_b)-1): for j in range(len(list_b)-1,i,-1): if list_b[j][1] < list_b[j-1][1]: list_b[j],list_b[j-1] = list_b[j-1],list_b[j] return list_b def selection_sort(num_list): list_s = num_list[:] fo...
File "/tmp/tmpodz_zhel/tmpr93sns1k.py", line 40 print(isStable(num_list,ss) ^ SyntaxError: '(' was never closed
s790305692
p02261
u813534019
1497487853
Python
Python
py
Runtime Error
0
0
1459
def buble(lst): src_list = list(lst) flag=True while flag: flag = False for idx in range(len(lst)-1, 0, -1): if int(lst[idx][1]) < int(lst[idx-1][1]): flag_stable = True for num in range(0, 9): tmp1 = [] tmp2 = [] for i in range(0, len(lst)): ...
File "/tmp/tmp36qeb_z4/tmpoaq05f7b.py", line 9 flag_stable = True IndentationError: expected an indented block after 'if' statement on line 8
s819986989
p02261
u747635679
1498536811
Python
Python3
py
Runtime Error
0
0
559
n = int(input()) a = input().split() b = a for i in range(n): for j in range(i + 1, n): if int(a[j - 1][1]) > int(a[j][1]): tmp = a[j - 1] a[j - 1] = a[j] a[j] = tmp ra = " ".join(a) print(ra) print("Stable") for i in range(n - 1): minj = i for j in (i + 1, n)...
Traceback (most recent call last): File "/tmp/tmpuzim41lc/tmpmch4v1p1.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s371848031
p02261
u760630500
1498817156
Python
Python3
py
Runtime Error
0
0
816
def BubbleSort(N, C): C = [] + C for i in range(N): for j in range(N-1, i, -1): if C[j][1] < C[j-1][1]: C[j], C[j-1] = C[j-1], C[j] return C def SelectionSort(N, C): C = [] + C for i in range(N): minj = i for j in range(i, N): if C[mi...
Traceback (most recent call last): File "/tmp/tmpp54xk05m/tmp2178j1aw.py", line 30, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s175094731
p02261
u760630500
1498817220
Python
Python3
py
Runtime Error
0
0
818
def BubbleSort(N, C): C = [] + C for i in range(N): for j in range(N-1, i, -1): if C[j][1] < C[j-1][1]: C[j], C[j-1] = C[j-1], C[j] return C def SelectionSort(N, C): C = [] + C for i in range(N): minj = i for j in range(i, N): if C[mi...
Traceback (most recent call last): File "/tmp/tmp1s9o0rmf/tmp51fjzn_u.py", line 30, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s972306423
p02261
u735204496
1498980536
Python
Python
py
Runtime Error
0
0
1274
import sys class Card: def __init__(self, num, kind): self.kind = kind self.num = num def list_to_string(array): s = "" for n in array: s += str(n) + " " return s.strip() def swap(array, i, j): tmp = array[i] array[i] = array[j] array[j] = tmp def is_stable(ar...
File "/tmp/tmpeszgxpmq/tmpnam1xdde.py", line 46 print list_to_string(bubble_sort(a)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s462779938
p02261
u735204496
1498980720
Python
Python
py
Runtime Error
0
0
1503
import sys class Card: def __init__(self, kind, num): self.kind = kind self.num = num def __eq__(self, other): return (self.kind == other.kind) and (self.num == other.num) def __ne__(self, other): return not ((self.kind == other.kind) and (self.num == other.num)) d...
File "/tmp/tmpkxr5w4qp/tmparr4fjw1.py", line 51 print list_to_string(bubble_sort(a)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s865290910
p02261
u914146430
1500715883
Python
Python3
py
Runtime Error
0
0
719
# bable sort def bubbleSort(o_nums, n): nums=o_nums[:] for i in range(len(nums)-1): for j in range(len(nums)-1,i,-1): if nums[j][1]<nums[j-1][1]: nums[j],nums[j-1]=nums[j-1],nums[j] return nums # bable sort def bubbleSort(o_nums, n): nums=o_nums[:] for i in ran...
Traceback (most recent call last): File "/tmp/tmpygigkte2/tmp24h13vf7.py", line 19, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s183721804
p02261
u914146430
1500716005
Python
Python3
py
Runtime Error
0
0
719
# bable sort def bubbleSort(o_nums, n): nums=o_nums[:] for i in range(len(nums)-1): for j in range(len(nums)-1,i,-1): if nums[j][1]<nums[j-1][1]: nums[j],nums[j-1]=nums[j-1],nums[j] return nums # bable sort def bubbleSort(o_nums, n): nums=o_nums[:] for i in ran...
Traceback (most recent call last): File "/tmp/tmp7qx6xf1a/tmpsas6dcor.py", line 19, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s472088074
p02261
u914146430
1500716513
Python
Python3
py
Runtime Error
0
0
711
def bubbleSort(o_nums, n): nums=o_nums[:] for i in range(len(nums)-1): for j in range(len(nums)-1,i,-1): if nums[j][1]<nums[j-1][1]: nums[j],nums[j-1]=nums[j-1],nums[j] return nums def bubbleSort(o_nums, n): nums=o_nums[:] for i in range(len(nums)-1): f...
Traceback (most recent call last): File "/tmp/tmpyxooqkm6/tmpm4omq2ry.py", line 17, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s456642745
p02261
u153665391
1504878673
Python
Python3
py
Runtime Error
0
0
1157
n = int(input()) a = list(input().split()) A = [] A1 = [] A2 = [] for i in a: A.append(list(i)) A1.append(list(i)) A2.append(list(i)) # check stable or not def is_stable(A3): for i in range( 1, n ): if int(A3[i-1][1]) == int(A3[i][1]): sm = i-1 bg = i for j ...
Traceback (most recent call last): File "/tmp/tmp6209ms20/tmp787u3k6_.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s270222431
p02261
u024715419
1507276252
Python
Python3
py
Runtime Error
0
0
463
n = int(input()) a = input().split() b = a[:] while flag: flag = 0 for i in range(n-1): if a[i][1] > a[i+1][1]: a[i][1], a[i+1][1] = a[i+1][1], a[i][1] flag = 1 print(*a) print("Stable") for i in range(n-1): min_j = i for j in range(i,n): if b[j][1] < b[min_j][1...
Traceback (most recent call last): File "/tmp/tmp2mq1zi_l/tmpwtrtafuh.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s890607117
p02261
u024715419
1507276328
Python
Python3
py
Runtime Error
0
0
463
n = int(input()) a = input().split() b = a[:] while flag: flag = 0 for i in range(n-1): if a[i][1] > a[i+1][1]: a[i][1], a[i+1][1] = a[i+1][1], a[i][1] flag = 1 print(*a) print("Stable") for i in range(n-1): min_j = i for j in range(i,n): if b[j][1] < b[min_j][1...
Traceback (most recent call last): File "/tmp/tmprv7zex8v/tmpiu8tu6kk.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s852320074
p02261
u626266743
1510058822
Python
Python3
py
Runtime Error
0
0
441
N = int(input()) C = input().split() _C = C.copy() for i in range(N): for j in range(N-1, i, -1): if (C[j][1] < C[j-1][1]): C[j][1], C[j-1][1] = C[j-1][1], C[j][1] print(*C) print("Stable") for j in range(N): m = i for j in range(i, N): if (_C[j][1] < _C[j-1][1]): m...
Traceback (most recent call last): File "/tmp/tmpcf5vl6zm/tmpy4fncdx3.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s711796543
p02261
u150984829
1516473360
Python
Python3
py
Runtime Error
0
0
278
n=int(input()) c=input().split();d=c[:] for i in range(n-1): for j in range(0,n-i-1): if c[j][1]>c[j+1][1]:c[j],c[j+1]=c[j+1],c[j] m=i for j in range(i,n): if b[m][1]>b[j][1]:m=j d[i],d[m]=d[m],d[i] print(*c);print("Stable") print(*d) print(['Not s','S'][b==s]+'table')
Traceback (most recent call last): File "/tmp/tmpmfkt4yfw/tmpmf9sf7dm.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s503962094
p02261
u150984829
1516473393
Python
Python3
py
Runtime Error
0
0
278
n=int(input()) c=input().split();d=c[:] for i in range(n-1): for j in range(0,n-i-1): if c[j][1]>c[j+1][1]:c[j],c[j+1]=c[j+1],c[j] m=i for j in range(i,n): if d[m][1]>d[j][1]:m=j d[i],d[m]=d[m],d[i] print(*c);print("Stable") print(*d) print(['Not s','S'][b==s]+'table')
Traceback (most recent call last): File "/tmp/tmp3ficxwwy/tmprm0oz0e8.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s039214989
p02261
u996463517
1518224244
Python
Python3
py
Runtime Error
0
0
614
a = int(input()) B = input().split() print(bubble(a,B)) print("Stable") print(selection(a,B)) if bubble(a,B) == selection(a,B): print("Stable") else: print("Not stable") def selection(n,A): for i in range(n): minj = i for j in range(i,n): if int(A[j][1]) < int(A[minj][1]): ...
Traceback (most recent call last): File "/tmp/tmpmrvsxxkt/tmp90h6yo2q.py", line 1, in <module> a = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s233816414
p02261
u933096856
1518590426
Python
Python3
py
Runtime Error
0
0
469
n=int(input()) l=input().split() def BubbleSort(c): for i in range(len(c)-1): for j in range(len(c)-1, i, -1): if int(c[j][-1]) < int(c[j-1][-1]): c[j], c[j-1]=c[j-1],c[j] return c def SelectionSort(C): for i in range(len(c)-1): m=i for j in range(i, len...
File "/tmp/tmp3zv301d6/tmp19sshica.py", line 20 print(SelectionSort(l) ^ SyntaxError: '(' was never closed
s815504800
p02261
u933096856
1518590451
Python
Python3
py
Runtime Error
0
0
470
n=int(input()) l=input().split() def BubbleSort(c): for i in range(len(c)-1): for j in range(len(c)-1, i, -1): if int(c[j][-1]) < int(c[j-1][-1]): c[j], c[j-1]=c[j-1],c[j] return c def SelectionSort(C): for i in range(len(c)-1): m=i for j in range(i, len...
Traceback (most recent call last): File "/tmp/tmpj45je77o/tmpzr4zmv2r.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s369259326
p02261
u933096856
1518607376
Python
Python
py
Runtime Error
0
0
575
n=raw_int(input()) r=raw_input().split() def BubbleSort(c, n): for i in range(n): for j in range(n-1, i, -1): if int(c[j][-1]) < int(c[j-1][-1]): c[j], c[j-1]=c[j-1],c[j] return c def SelectionSort(c, n): for i in range(n): m=i for j in range(i, n): ...
File "/tmp/tmpahzk4yzr/tmpjb7a74op.py", line 22 print *a ^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s575552612
p02261
u933096856
1518607395
Python
Python
py
Runtime Error
0
0
575
n=int(raw_input()) r=raw_input().split() def BubbleSort(c, n): for i in range(n): for j in range(n-1, i, -1): if int(c[j][-1]) < int(c[j-1][-1]): c[j], c[j-1]=c[j-1],c[j] return c def SelectionSort(c, n): for i in range(n): m=i for j in range(i, n): ...
File "/tmp/tmp5hr5klzv/tmpcmiri3if.py", line 22 print *a ^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s782099167
p02261
u906360845
1520702778
Python
Python3
py
Runtime Error
0
0
724
n = input() nums = input() nums = nums.split() print(' '.join(map(str, nums))) def bubble_sort(c, n): for i in range(n-1): for j in range(n-1): if c[j] > c[j+1]: c[j], c[j+1] = c[j+1], c[j] return c def selection_sort(c, n): for i in range((n): mink = i ...
File "/tmp/tmp88lrpkdc/tmpxulk6ewr.py", line 14 for i in range((n): ^ SyntaxError: invalid syntax
s292603628
p02261
u613534067
1521354725
Python
Python3
py
Runtime Error
0
0
1319
# Quick Sort # # 安定かどうかの判定の計算量を減らすことができなかったので,悪いことをした... def partition(A, p, r): x = A[r][1] i = p-1 for k in range(p, r): if A[k][1] <= x: i += 1 A[i], A[k] = A[k], A[i] A[i+1], A[r] = A[r], A[i+1] return i+1 def quick_sort(A, p, r): if p < r: q = partit...
Traceback (most recent call last): File "/tmp/tmpcl3lssbj/tmpg1an9i6m.py", line 37, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s845960800
p02261
u464859367
1522463985
Python
Python3
py
Runtime Error
0
0
1292
import re import copy pattern = r'([0-9])' repatter = re.compile(pattern) n = str(input()) text = input() *lists, = text.split(" ") lists2 = copy.copy(lists) lists3 = copy.copy(lists) # バブルソート def bubble_sort(a): flag = 1 i = 0 while flag: flag = 0 for j in range(n-1, i, -1): ...
Traceback (most recent call last): File "/tmp/tmp5ejn9efe/tmpq17grfe4.py", line 6, in <module> n = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s499628205
p02261
u308033440
1526012545
Python
Python3
py
Runtime Error
0
0
1606
# #バブルソート # def BubbleSort(C,N): # for i in range (0,N,1): # for j in range(N-1,i-1,-1): # if int(C[j][1:2]) < int(C[j-1][1:2]): # tmp = C[j] # C[j] = C[j-1] # C[j-1] = tmp # print(' '.join(C)) #バブルソート def BubbleSort(C,N): flag = 1 whi...
Traceback (most recent call last): File "/tmp/tmp3mkshmcg/tmpota3hdjh.py", line 53, in <module> 愚直に調べるパターン NameError: name '愚直に調べるパターン' is not defined
s345785444
p02261
u308033440
1526012576
Python
Python3
py
Runtime Error
0
0
1323
#バブルソート def BubbleSort(C,N): flag = 1 while flag: flag = 0 for j in range(N-1,0,-1): if int(C[j][1:2]) < int(C[j-1][1:2]): tmp = C[j] C[j] = C[j-1] C[j-1] = tmp flag = 1 print(' '.join(C)) ...
Traceback (most recent call last): File "/tmp/tmparz7myyu/tmpqkmyflxe.py", line 43, in <module> 愚直に調べるパターン NameError: name '愚直に調べるパターン' is not defined
s857219389
p02261
u356729014
1528433430
Python
Python3
py
Runtime Error
0
0
1731
package main import ( "bufio" "fmt" "os" "strconv" "reflect" ) var sc = bufio.NewScanner(os.Stdin) var wtr = bufio.NewWriter(os.Stdout) func nextInt() int { sc.Scan() i, e := strconv.Atoi(sc.Text()) if e != nil { panic(e) } return i } type Card struct { mark string number int } func nextCard() Card...
File "/tmp/tmpvt1mhn69/tmpxs3kq37i.py", line 1 package main ^^^^ SyntaxError: invalid syntax
s754432796
p02261
u298224238
1529386472
Python
Python3
py
Runtime Error
0
0
1564
class Card: def __init__(self, mark, value): self.mark = mark self.value = value def __eq__(self, other): if not isinstance(other, Card): return NotImplemented return self.value == other.value and self.mark == other.mark def __lt__(self, other): return s...
File "/tmp/tmpfgmy0zyk/tmpeyvh_dkk.py", line 57 printJudgeStable(arr, b_arr): ^ SyntaxError: invalid syntax
s391848830
p02261
u298224238
1529386506
Python
Python3
py
Runtime Error
0
0
1575
class Card: def __init__(self, mark, value): self.mark = mark self.value = value def __eq__(self, other): if not isinstance(other, Card): return NotImplemented return self.value == other.value and self.mark == other.mark def __lt__(self, other): return s...
File "/tmp/tmpvaf69pv_/tmpx3ehcgxh.py", line 58 printJudgeStable(arr, b_arr): ^ SyntaxError: invalid syntax
s812307435
p02261
u677291728
1530604483
Python
Python3
py
Runtime Error
0
0
1040
def bubble(A):     flag = True     n = len(A)     i = 0     while flag:         flag = False         for j in range(n-1,i,-1):            if A[j][1] < A[j-1][1]:                A[j],A[j-1] = A[j-1],A[j]                flag = True         i += 1     def selection(A):     n = len(A)     for i in range(n):         minj = ...
File "/tmp/tmprhdym_bw/tmpmviy6kwb.py", line 2     flag = True ^ SyntaxError: invalid non-printable character U+00A0
s027463483
p02261
u677291728
1530604582
Python
Python3
py
Runtime Error
0
0
1033
def bubble(A):     flag = True     n = len(A)     i = 0     while flag:         flag = False         for j in range(n-1,i,-1):            if A[j][1] < A[j-1][1]:                A[j],A[j-1] = A[j-1],A[j]                flag = True         i += 1     def selection(A):     n = len(A)     for i in range(n):         minj = ...
File "/tmp/tmph3uzjccd/tmpjpbr0pal.py", line 2     flag = True ^ SyntaxError: invalid non-printable character U+00A0
s113504799
p02261
u677291728
1530604699
Python
Python3
py
Runtime Error
0
0
1033
def bubble(A):     flag = True     n = len(A)     i = 0     while flag:         flag = False         for j in range(n-1,i,-1):            if A[j][1] < A[j-1][1]:                A[j],A[j-1] = A[j-1],A[j]                flag = True         i += 1     def selection(A):     n = len(A)     for i in range(n):         minj = ...
File "/tmp/tmp1xk8wov3/tmp3ocrdb0m.py", line 2     flag = True ^ SyntaxError: invalid non-printable character U+00A0
s842847978
p02261
u922633376
1530671432
Python
Python3
py
Runtime Error
0
0
5106
Last login: Thu Jun 28 18:57:04 on ttys001 fujitaryuuki-no-MacBook-Pro:~ fujitaryuki$ ls Applications Applications (Parallels) Desktop Documents Downloads KUT Master Library Logicool ゲームソフトウェア 8.82.lnk Movies Music Pictures Public PythonStudy Windows 10 eclipse matsuzaki-lab tenhou wget 就活 fujitaryuuki-no-MacBook-Pro:~...
File "/tmp/tmpmdy3xg0k/tmp1sihkovi.py", line 1 Last login: Thu Jun 28 18:57:04 on ttys001 ^ SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
s464855727
p02261
u922633376
1530671560
Python
Python3
py
Runtime Error
0
0
795
input_line = int(input()) out_selection = input().split() out_bubble = out_bubble[:] # bubblesort for i in range(n): for j in range(n-1, i, -1): if out_bubble[j][1] < out_bubble[j-1][1]: out_bubble[j], out_bubble[...
Traceback (most recent call last): File "/tmp/tmpcflv1qj5/tmps9s849i8.py", line 1, in <module> input_line = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s501210889
p02261
u922633376
1530671905
Python
Python3
py
Runtime Error
0
0
795
input_line = int(input()) out_selection = input().split() out_bubble = out_bubble[:] # bubblesort for i in range(n): for j in range(n-1, i, -1): if out_bubble[j][1] < out_bubble[j-1][1]: out_bubble[j], out_bubble[...
Traceback (most recent call last): File "/tmp/tmpgufxbewy/tmpe4sgmyat.py", line 1, in <module> input_line = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s124736143
p02261
u782850731
1379686838
Python
Python
py
Runtime Error
0
0
1118
#!/usr/bin/env python from __future__ import division, print_function from sys import stdin def bubble(cards): for i in range(len(cards)): for j in range(len(cards)-1, i, -1): if cards[j][1] < cards[j-1][1]: cards[j], cards[j-1] = cards[j-1], cards[j] def selection(cards): ...
Traceback (most recent call last): File "/tmp/tmpc5zex94g/tmpigsyj4vz.py", line 37, in <module> orders = [o for o in orders if len(s) > 1] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/tmpc5zex94g/tmpigsyj4vz.py", line 37, in <listcomp> orders = [o for o in orders if len(s) > 1] ...
s176057408
p02261
u140201022
1389651306
Python
Python
py
Runtime Error
0
0
1153
#!/usr/bin/env python # -*- coding:utf-8 -*- from __future__ import print_function import time import sys import io import re import math start = time.clock() def bubble(cards): for i in range(len(cards)): for j in range(len(cards)-1, i, -1): if cards[j][1]<cards[j-1][1]: cards[...
Traceback (most recent call last): File "/tmp/tmpb6lctc0c/tmpwyhbfaxn.py", line 9, in <module> start = time.clock() ^^^^^^^^^^ AttributeError: module 'time' has no attribute 'clock'
s097344607
p02262
u427752990
1535598565
Python
Python3
py
Runtime Error
0
0
704
def printing(m, G, cnt, A): print(m) for i in range(len(G)): if i != len(G) - 1: print(G[i], end=' ') else: print(G[i]) print(cnt) for i in A: print(i) def insertionSort(A, n, g, cnt): for i in range(g, n): v = A[i] j = i - g ...
Traceback (most recent call last): File "/tmp/tmp2btmck1t/tmp3c7xu3wj.py", line 35, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s057736993
p02262
u635209856
1541240797
Python
Python3
py
Runtime Error
0
0
621
import System if sys.version_info[0]>=3: raw_input=InputStream def insertionSort(a,g): global cnt for i in range(g,len(a)): v=a[i] j=i-g while j>=0 and a[j]>v: a[j+g]=a[j] j=j-g cnt+=1 a[j+g]=v def shellSort(a): global cnt cnt=0 ...
Traceback (most recent call last): File "/tmp/tmptjbms09o/tmpe529k1hr.py", line 1, in <module> import System ModuleNotFoundError: No module named 'System'
s404443071
p02262
u099826363
1546005803
Python
Python3
py
Runtime Error
0
0
986
#include <bits/stdc++.h> using namespace std; #define ll long long ll cnt = 0; void swap(int& a, int& b){ int tmp = a; a = b; b = tmp; } void insertionSort(int A[], int n, int g) { for(int i=g;i<n;i++){ int v = A[i]; int j = i - g; // cout << "g=" << g << "i=" << i << "j=" << j << endl; while( j>= 0 && ...
File "/tmp/tmp6714kpms/tmpi6jtap_n.py", line 2 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s190014655
p02262
u908238078
1546487915
Python
Python3
py
Runtime Error
0
0
939
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> using namespace std; long long cnt; int l; int A[1000000]; int n; vector<int> G; void insertionSort(int A[], int n, int g) { for (int i = g; i < n; i++) { int v = A[i]; int j = i - g; while (j >= 0 && A[j] > v) { ...
File "/tmp/tmpz0ijntmr/tmps3fzkwlz.py", line 6 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s565929638
p02262
u840247626
1556033535
Python
Python3
py
Runtime Error
20
5620
385
n = int(input()) G = [g for g in [1, 4, 10, 23, 57, 132, 301, 701] if g < n] while True: g = int(2.25 * G[-1]) if g > n: break G.append(g) G.reverse() A = [int(input()) for _ in range(n)] cnt = 0 for g in G: for j, v in enumerate(A[g:]): while j >= 0 and A[j] > v: A[j+g] = A[j] j -= g cnt += 1 A[j+...
Traceback (most recent call last): File "/tmp/tmpnwpgakcu/tmpbbrjk_ox.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s561786327
p02262
u840247626
1556034095
Python
Python3
py
Runtime Error
0
0
410
n = int(input()) if n == 1: G = [1] else: G = [g for g in [1, 4, 10, 23, 57, 132, 301, 701] if g < n] while True: g = int(2.25 * G[-1]) if g > n: break G.append(g) G.reverse() A = [int(input()) for _ in range(n)] cnt = 0 for g in G: for j, v in enumerate(A[g:]): while j >= 0 and A[j] > v: A[j+g] = ...
File "/tmp/tmp7pz4hk2k/tmpjc34v812.py", line 26 print(cnt, a*, sep='\n') ^ SyntaxError: invalid syntax
s126319962
p02262
u840247626
1556034117
Python
Python3
py
Runtime Error
0
0
410
n = int(input()) if n == 1: G = [1] else: G = [g for g in [1, 4, 10, 23, 57, 132, 301, 701] if g < n] while True: g = int(2.25 * G[-1]) if g > n: break G.append(g) G.reverse() A = [int(input()) for _ in range(n)] cnt = 0 for g in G: for j, v in enumerate(A[g:]): while j >= 0 and A[j] > v: A[j+g] = ...
Traceback (most recent call last): File "/tmp/tmpr81vr2ig/tmpt2vpr4e7.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s932986131
p02262
u286589639
1556421282
Python
Python3
py
Runtime Error
0
0
497
def insertion_sort(A ,N, g): grobal cnt for i in range(g, N): v = A[i] j = i - g while j>=0 and A[j]>v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v def shell_sort(A, N): grobal cnt cnt = 0 G = [] h = 1 while h<=len(A): G.append(h) h = 3*h+1 G.reverse() m = len(G) print(m) print(' '.jo...
File "/tmp/tmpay5zqqbn/tmpbnzjhnmd.py", line 2 grobal cnt ^^^ SyntaxError: invalid syntax
s510707291
p02262
u535719732
1559410408
Python
Python3
py
Runtime Error
0
0
571
n = int(input()) a = [] for i in range(n): a.append(int(input())) def insertion_sort(datan,n,g): cnt = 0 for i in range(g,n): v = data[i] j = i - g while j >= 0 and data[j] > v: data[j+g] = data[j] j = j - g cnt += 1 data[j+g] = v retu...
Traceback (most recent call last): File "/tmp/tmpmbfnru8s/tmp41isrqw7.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s423362647
p02262
u482227082
1559453767
Python
Python3
py
Runtime Error
0
0
828
def insertionSort(A, n, g, cnt): for i in range(g, n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v return cnt def shellSort(A, n): cnt = 0 G = [] if n <= 3: m = 1: G[...
File "/tmp/tmpzat4z2vt/tmpju62mtjn.py", line 19 m = 1: ^ SyntaxError: invalid syntax
s454409727
p02262
u482227082
1559453797
Python
Python3
py
Runtime Error
20
5608
827
def insertionSort(A, n, g, cnt): for i in range(g, n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v return cnt def shellSort(A, n): cnt = 0 G = [] if n <= 3: m = 1 G[0...
Traceback (most recent call last): File "/tmp/tmpmx0a5rrr/tmpc52sapd2.py", line 51, in <module> main() File "/tmp/tmpmx0a5rrr/tmpc52sapd2.py", line 39, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s775058603
p02262
u535719732
1559489036
Python
Python3
py
Runtime Error
0
0
682
def shell_sort(array): n = len(array) h = 0 k = 0 cnt = 0 g = [] while h <= n/9: h = 3*h + 1 g.append = h while g[k] > 0: for i in range(h,n): tmp = array[i] if tmp < array[i-g[k]]: j = i while True: ...
Traceback (most recent call last): File "/tmp/tmpwfd7cywb/tmp2tup8xpo.py", line 27, in <module> for i in range(int(input())): ^^^^^^^ EOFError: EOF when reading a line
s932047761
p02262
u535719732
1559489077
Python
Python3
py
Runtime Error
0
0
681
def shell_sort(array): n = len(array) h = 0 k = 0 cnt = 0 g = [] while h <= n/9: h = 3*h + 1 g.append = h while g[k] > 0: for i in range(h,n): tmp = array[i] if tmp < array[i-g[k]]: j = i while True: ...
Traceback (most recent call last): File "/tmp/tmpjkogjuph/tmpdkmdmvgt.py", line 27, in <module> for i in range(int(input())): ^^^^^^^ EOFError: EOF when reading a line
s054000585
p02262
u535719732
1559489092
Python
Python3
py
Runtime Error
0
0
680
def shell_sort(array): n = len(array) h = 0 k = 0 cnt = 0 g = [] while h <= n/9: h = 3*h + 1 g.append(h) while g[k] > 0: for i in range(h,n): tmp = array[i] if tmp < array[i-g[k]]: j = i while True: ...
Traceback (most recent call last): File "/tmp/tmp9f5jn8g3/tmpph32ukge.py", line 27, in <module> for i in range(int(input())): ^^^^^^^ EOFError: EOF when reading a line
s231359879
p02262
u535719732
1559536526
Python
Python3
py
Runtime Error
0
0
466
def insertionSort(A,n,g): cnt = 0 for i in range(g,n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v def shellsort(A,n): cnt = 0 h = 0 while(h <= n / 9): h = 3*h + 1 G = [] while h > 0: G.append(h) h /= 3 print(len(G)) print(*G) for i in ran...
File "/tmp/tmpy_stj1y3/tmpppkno34l.py", line 21 print(*G) ^ IndentationError: unindent does not match any outer indentation level
s633921540
p02262
u535719732
1559536967
Python
Python3
py
Runtime Error
0
0
484
def insertionSort(A,n,g): cnt = 0 for i in range(g,n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v def shellsort(A,n): cnt = 0 h = 0 while(h <= n / 9): h = 3*h + 1 G = [] while h > 0: G.append(h) h /= 3 print(len(G)) print(" ".join(map(str,...
File "/tmp/tmprnnuxd8q/tmp8z_ak0bg.py", line 21 print(" ".join(map(str,G))) ^ IndentationError: unindent does not match any outer indentation level
s496059193
p02262
u535719732
1559537046
Python
Python3
py
Runtime Error
0
0
484
def insertionSort(A,n,g): cnt = 0 for i in range(g,n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v def shellsort(A,n): cnt = 0 h = 0 while(h <= n / 9): h = 3*h + 1 G = [] while h > 0: G.append(h) h /= 3 print(len(G)) print(" ".join(map(int,...
File "/tmp/tmpqyzugj5w/tmpznn3cktb.py", line 21 print(" ".join(map(int,G))) ^ IndentationError: unindent does not match any outer indentation level
s302153037
p02262
u535719732
1559537070
Python
Python3
py
Runtime Error
0
0
466
def insertionSort(A,n,g): cnt = 0 for i in range(g,n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v def shellsort(A,n): cnt = 0 h = 0 while(h <= n / 9): h = 3*h + 1 G = [] while h > 0: G.append(h) h /= 3 print(len(G)) print(*G) for i in ran...
File "/tmp/tmp4bxv51hs/tmp92r1dxb_.py", line 21 print(*G) ^ IndentationError: unindent does not match any outer indentation level
s393580999
p02262
u535719732
1559537446
Python
Python3
py
Runtime Error
0
0
489
def insertionSort(A,n,g): cnt = 0 for i in range(g,n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v def shellsort(A,n): cnt = 0 h = 0 while(h <= n / 9): h = 3*h + 1 G = [] while h > 0: G.append(h) h /= 3 print(len(G)) print(" ".join(map(str,...
File "/tmp/tmpg9avtfuo/tmp0fmaquvc.py", line 21 print(" ".join(map(str,G))) ^ IndentationError: unindent does not match any outer indentation level
s463634742
p02262
u535719732
1559537483
Python
Python3
py
Runtime Error
0
0
496
def insertionSort(A,n,g): cnt = 0 for i in range(g,n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v def shellsort(A,n): cnt = 0 h = 0 while(h <= n / 9): h = 3*h + 1 G = [] while h > 0: G.append(h) h /= 3 print(len(G)) print(" ".join(map...
File "/tmp/tmp2hs2enlr/tmppdwnk4g6.py", line 22 print(" ".join(map(str,G))) ^ IndentationError: unindent does not match any outer indentation level
s759915886
p02262
u535719732
1559537570
Python
Python3
py
Runtime Error
0
0
499
def insertionSort(A,n,g): cnt = 0 for i in range(g,n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v def shellsort(A,n): cnt = 0 h = 0 while(h <= n / 9): h = 3*h + 1 G = [] while h > 0: G.append(h) h /= 3 print("-----") print(len(G)) print(" "...
Traceback (most recent call last): File "/tmp/tmpfci4m9v8/tmp64m66mb9.py", line 28, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s246833138
p02262
u535719732
1559537594
Python
Python3
py
Runtime Error
0
0
504
def insertionSort(A,n,g): cnt = 0 for i in range(int(g),n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v def shellsort(A,n): cnt = 0 h = 0 while(h <= n / 9): h = 3*h + 1 G = [] while h > 0: G.append(h) h /= 3 print("-----") print(len(G)) prin...
Traceback (most recent call last): File "/tmp/tmp4o5w5jg7/tmpnrfi6v4x.py", line 28, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s534923542
p02262
u535719732
1559538098
Python
Python3
py
Runtime Error
0
0
767
def insertionSort(A,n,g): cnt = 0 for i in range(g,n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v return ...
File "/tmp/tmphs89la8x/tmpd2f53nq_.py", line 15 G = [] TabError: inconsistent use of tabs and spaces in indentation
s682972977
p02262
u535719732
1559538149
Python
Python3
py
Runtime Error
0
0
662
def insertionSort(A,n,g): cnt = 0 for i in range(g,n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v return cnt def shellsort(A,n): cnt = 0 ...
File "/tmp/tmpa0rlcr7w/tmp0zzkhn_j.py", line 16 while h <= 1: TabError: inconsistent use of tabs and spaces in indentation
s636021132
p02262
u535719732
1559538233
Python
Python3
py
Runtime Error
0
0
667
def insertionSort(A,n,g): cnt = 0 for i in range(g,n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v return cnt def shellsort(A,n): cnt = 0 ...
File "/tmp/tmpcc6_s839/tmp3aa8fcdc.py", line 23 print(" ".join(map(str,G))) ^^^^^ SyntaxError: invalid syntax
s442703723
p02262
u535719732
1559538255
Python
Python3
py
Runtime Error
0
0
668
def insertionSort(A,n,g): cnt = 0 for i in range(g,n): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j+g] = A[j] j = j - g cnt += 1 A[j+g] = v return cnt def shellsort(A,n): cnt = 0 ...
File "/tmp/tmp1ucj3o0m/tmp_lz5_2s0.py", line 21 print(m ^ SyntaxError: '(' was never closed
s841019775
p02262
u379499530
1415372879
Python
Python
py
Runtime Error
0
0
594
def insertion(A, n, g): c = 0 for i in range(g, n): key = A[i] j = i - g while j >= 0 and A[j] > key: A[j + g] = A[j] j -= g c += 1 A[j + g] = key return c def main(): n = input() A = [input() for i in range(n)] h = range(n - 1...
Traceback (most recent call last): File "/tmp/tmpw6d5euha/tmpbmcrhium.py", line 32, in <module> main() File "/tmp/tmpw6d5euha/tmpbmcrhium.py", line 14, in main n = input() ^^^^^^^ EOFError: EOF when reading a line
s059755475
p02262
u379499530
1415415151
Python
Python
py
Runtime Error
19930
67884
568
def insertion(A, n, g): c = 0 for i in range(g, n): key = A[i] j = i - g while j >= 0 and A[j] > key: A[j + g] = A[j] j -= g c += 1 A[j + g] = key return c def main(): n = input() A = [input() for i in range(n)] G = [1] h ...
Traceback (most recent call last): File "/tmp/tmp5pxyxer5/tmpqx30p1jl.py", line 34, in <module> main() File "/tmp/tmp5pxyxer5/tmpqx30p1jl.py", line 14, in main n = input() ^^^^^^^ EOFError: EOF when reading a line
s691474256
p02262
u379499530
1415436323
Python
Python
py
Runtime Error
0
0
548
def insertion(A, n, g): c = 0 for i in range(g, n): key = A[i] j = i - g while j >= 0 and A[j] > key: A[j + g] = A[j] j -= g c += 1 A[j + g] = key return c def main(): n = input() A = [input() for i in range(n)] G = list() ...
Traceback (most recent call last): File "/tmp/tmpsg_6l8md/tmpiktnpbbd.py", line 32, in <module> main() File "/tmp/tmpsg_6l8md/tmpiktnpbbd.py", line 14, in main n = input() ^^^^^^^ EOFError: EOF when reading a line
s780827084
p02262
u379499530
1415436367
Python
Python
py
Runtime Error
19930
67884
550
def insertion(A, n, g): c = 0 for i in range(g, n): key = A[i] j = i - g while j >= 0 and A[j] > key: A[j + g] = A[j] j -= g c += 1 A[j + g] = key return c def main(): n = input() A = [input() for i in range(n)] G = list() ...
Traceback (most recent call last): File "/tmp/tmp5k63co6t/tmpsxv50di1.py", line 32, in <module> main() File "/tmp/tmp5k63co6t/tmpsxv50di1.py", line 14, in main n = input() ^^^^^^^ EOFError: EOF when reading a line
s375972186
p02262
u379499530
1415439328
Python
Python
py
Runtime Error
19930
67880
529
def insertion(A, n, g): c = 0 for i in range(g, n): j = i - g while j >= 0 and A[j] > A[j + g]: A[j + g], A[j] = A[j], A[j + g] j -= g c += 1 return c def main(): n = input() A = [input() for i in range(n)] G = list() h = 1 while h <=...
Traceback (most recent call last): File "/tmp/tmpzywz_gk6/tmpvi0svbp6.py", line 30, in <module> main() File "/tmp/tmpzywz_gk6/tmpvi0svbp6.py", line 12, in main n = input() ^^^^^^^ EOFError: EOF when reading a line
s523926878
p02262
u379499530
1415439789
Python
Python
py
Runtime Error
19930
67876
511
def insertion(A, n, g): c = 0 for i in range(g, n): while i >= g and A[i - g] > A[i]: A[i], A[i - g] = A[i - g], A[i] i -= g c += 1 return c def main(): n = input() A = [input() for i in range(n)] G = list() h = 1 while h <= n: G[0:0]...
Traceback (most recent call last): File "/tmp/tmp0mt6m5at/tmp_vc9svqm.py", line 29, in <module> main() File "/tmp/tmp0mt6m5at/tmp_vc9svqm.py", line 11, in main n = input() ^^^^^^^ EOFError: EOF when reading a line
s903893176
p02262
u379499530
1415440533
Python
Python
py
Runtime Error
19930
75688
544
def insertion(A, n, g): c = 0 for i in range(g, n): while i >= g and A[i - g] > A[i]: A[i], A[i - g] = A[i - g], A[i] i -= g c += 1 return c def main(): n = int(raw_input()) A = [int(raw_input()) for i in range(n)] G = list() h = 1 while h <=...
Traceback (most recent call last): File "/tmp/tmpf424nqlc/tmpeacy3ek3.py", line 30, in <module> main() File "/tmp/tmpf424nqlc/tmpeacy3ek3.py", line 11, in main n = int(raw_input()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s913889741
p02262
u379499530
1415441236
Python
Python
py
Runtime Error
19930
75692
546
def insertion(A, n, g): global cnt for i in range(g, n): while i >= g and A[i - g] > A[i]: A[i], A[i - g] = A[i - g], A[i] i -= g cnt += 1 def main(): global cnt cnt = 0 n = int(raw_input()) A = [int(raw_input()) for i in range(n)] G = list() ...
Traceback (most recent call last): File "/tmp/tmpsdltet86/tmpthcbe21j.py", line 30, in <module> main() File "/tmp/tmpsdltet86/tmpthcbe21j.py", line 12, in main n = int(raw_input()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s532298659
p02262
u567380442
1421314363
Python
Python3
py
Runtime Error
19930
47308
590
def insertionSort(A, g): cnt = 0 for i in range(g, len(A)): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j + g] = A[j] j = j - g cnt += 1 A[j + g] = v return cnt def shellSort(A): cnt = 0 m = 0 n = len(A) while n: ...
Traceback (most recent call last): File "/tmp/tmp01dgwpw_/tmpxdxrzn6h.py", line 29, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s659355545
p02262
u567380442
1421314924
Python
Python3
py
Runtime Error
19930
46920
688
def insertionSort(A, g): cnt = 0 for i in range(g, len(A)): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j + g] = A[j] j = j - g cnt += 1 A[j + g] = v return cnt def shellSort(A): cnt = 0 m = 0 n = len(A) while n: ...
Traceback (most recent call last): File "/tmp/tmppso4k03i/tmpepwxil5j.py", line 29, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s461914114
p02262
u567380442
1421315638
Python
Python3
py
Runtime Error
19930
47308
591
def insertionSort(A, g): global cnt for i in range(g, len(A)): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j + g] = A[j] j = j - g cnt += 1 A[j + g] = v def shellSort(A): global cnt cnt = 0 m = 0 n = len(A) while n: ...
Traceback (most recent call last): File "/tmp/tmpgygpwt66/tmpxe8ne7z4.py", line 27, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s009473172
p02262
u567380442
1421318686
Python
Python3
py
Runtime Error
19930
47316
604
def insertionSort(A, g): global cnt for i in range(g, len(A)): v = A[i] j = i - g while j >= 0 and A[j] > v: A[j + g] = A[j] j = j - g cnt += 1 A[j + g] = v def shellSort(A): global cnt cnt = 0 h = 1 G = [] while h <= ...
Traceback (most recent call last): File "/tmp/tmp2jls5xyv/tmpfb19n2kc.py", line 30, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line