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
s311306409
p02262
u567380442
1421320249
Python
Python3
py
Runtime Error
19920
47312
604
import sys 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 = [] ...
Traceback (most recent call last): File "/tmp/tmp7_qwpwc3/tmpofpuri64.py", line 32, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s469556105
p02262
u567380442
1421323371
Python
Python3
py
Runtime Error
19930
47312
645
import sys 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 = [] ...
Traceback (most recent call last): File "/tmp/tmp72f4q0rd/tmpfntq6_td.py", line 32, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s649028204
p02262
u567380442
1421323541
Python
Python3
py
Runtime Error
19920
47312
684
import sys def isort(a, n, g): global 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 -= g cnt += 1 a[j + g] = v # input data n = int(sys.stdin.readline()) a = [] for i in range(n): a.append(i...
Traceback (most recent call last): File "/tmp/tmprnxpbnfc/tmp5_abm7uv.py", line 15, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s301062679
p02262
u567380442
1421323944
Python
Python3
py
Runtime Error
19930
47312
661
#!/usr/bin/python import sys if sys.version_info[0]>=3: raw_input=input 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...
Traceback (most recent call last): File "/tmp/tmptu1luyr5/tmp8j4zya8k.py", line 31, in <module> a=[int(raw_input()) for i in range(int(raw_input()))] ^^^^^^^^^^^ EOFError: EOF when reading a line
s382301594
p02262
u567380442
1426472267
Python
Python3
py
Runtime Error
19930
159368
607
import sys def shell(a): g = [] h = 1 while h <= len(a): g.append(h) h = 3*h+1 g.reverse() print(len(g)) print(*g) for i in g: insertion(a, i) def insertion(a, g): global cnt for i in range(g, len(a)): v = a[i] i -= g while i >= 0 an...
Traceback (most recent call last): File "/tmp/tmpt1kicscv/tmpicwo8d6r.py", line 35, in <module> main() File "/tmp/tmpt1kicscv/tmpicwo8d6r.py", line 28, in main n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s625882885
p02262
u567380442
1426473286
Python
Python3
py
Runtime Error
19930
47080
441
import sys n = int(sys.stdin.readline()) a = list(map(int,sys.stdin)) g = [] h = 1 while h <= n: g.append(h) h = 3 * h + 1 g.reverse() cnt = 0 for gi in g: for i in range(gi, n): v = a[i] i -= gi while i >= 0 and a[i] > v: a[i + gi] = a[i] i -= gi ...
Traceback (most recent call last): File "/tmp/tmpcgw55y9l/tmpbaf5a85y.py", line 2, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s180232281
p02262
u567380442
1426473549
Python
Python3
py
Runtime Error
19920
47064
439
import sys n = int(sys.stdin.readline()) a = list(map(int,sys.stdin)) g = [] h = 1 while h <= n: g.append(h) h = 3 * h + 1 g.reverse() cnt = 0 for gi in g: for i in range(gi, n): v = a[i] i -= gi while i >= 0 and a[i] > v: a[i + gi] = a[i] i -= gi ...
Traceback (most recent call last): File "/tmp/tmp6xszvv3r/tmpe_hl6bfp.py", line 2, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s830259494
p02262
u567380442
1428925820
Python
Python3
py
Runtime Error
19930
47076
509
from sys import stdin def main(): n = int(stdin.readline()) a = list(map(int, stdin)) g = [] h = 1 while h <= n: g.append(h) h = 3 * h + 1 g.reverse() cnt = 0 for gi in g: for i in range(gi, n): v = a[i] i -= gi while i >= 0...
Traceback (most recent call last): File "/tmp/tmpnpqvfdf8/tmpw9ntd8pd.py", line 26, in <module> main() File "/tmp/tmpnpqvfdf8/tmpw9ntd8pd.py", line 5, in main n = int(stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s933324342
p02262
u567380442
1428926841
Python
Python3
py
Runtime Error
19930
159360
562
from sys import stdin def main(): n = int(stdin.readline()) a = list(map(int, stdin.readlines())) g = [] h = 1 while h <= n: g.append(h) h = 3 * h + 1 g.reverse() cnt = 0 for gi in g: for i in range(gi, n): v = a[i] i -= gi ...
Traceback (most recent call last): File "/tmp/tmp252de9np/tmpb2cw7pog.py", line 30, in <module> main() File "/tmp/tmp252de9np/tmpb2cw7pog.py", line 5, in main n = int(stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s842454433
p02262
u604774382
1432852011
Python
Python3
py
Runtime Error
19930
47312
671
def insertionSort( nums, n, g ): cnt = 0 for i in range( g, len( nums ) ): v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v return cnt def shellSort( nums, n ): cnt = 0 g = [] val =0 for i in range( 0, n )...
Traceback (most recent call last): File "/tmp/tmpk0i6p48v/tmpggoksaw3.py", line 33, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s865813296
p02262
u604774382
1432888469
Python
Python3
py
Runtime Error
19920
47308
732
def insertionSort( nums, n, g ): cnt = 0 for i in range( g, len( nums ) ): v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v return cnt def shellSort( nums, n ): cnt = 0 g = [] val =0 for i in range( 0, n ): val = 3*val+1 if n < va...
Traceback (most recent call last): File "/tmp/tmpd_wi_7is/tmpc7frw6ym.py", line 32, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s562278661
p02262
u604774382
1432888843
Python
Python3
py
Runtime Error
19930
47308
658
def insertionSort( nums, n, g ): cnt = 0 i = g n = len( nums ) while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 return cnt def shellSort( nums, n ): cnt = 0 g = [] val =0 for i in range( 0, n ): val = 3*val+1 ...
Traceback (most recent call last): File "/tmp/tmpyaurzutd/tmp05xqrc2y.py", line 37, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s562863397
p02262
u604774382
1432889935
Python
Python
py
Runtime Error
19930
67900
678
def insertionSort( nums, n, g ): cnt = 0 i = g n = len( nums ) while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j] and j+g < n: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 return cnt def shellSort( nums, n ): cnt = 0 g = [] val =0 for i in range( 0, n ): va...
Traceback (most recent call last): File "/tmp/tmp8tskd7_e/tmpq7s_rhdz.py", line 37, in <module> n = int( raw_input( ) ) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s691818280
p02262
u604774382
1432890677
Python
Python3
py
Runtime Error
19920
47316
651
def insertionSort( nums, n, g ): cnt = 0 i = g while i < len( nums ): v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 return cnt def shellSort( nums, n ): cnt = 0 g = [] val =0 for i in range( 0, n ): val = 3*val+1 if n...
Traceback (most recent call last): File "/tmp/tmpr5pls73m/tmp2zs8e187.py", line 36, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s881056403
p02262
u604774382
1432892811
Python
Python3
py
Runtime Error
19930
47308
645
def insertionSort( nums, g ): c = 0 i = g n = len( nums ) while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g c += 1 nums[ j+g ] = v i += 1 return c def shellSort( nums, n ): cnt = 0 g = [] val =0 for i in range( 0, n ): val = 3*val+1 if n < v...
Traceback (most recent call last): File "/tmp/tmpbitsjou_/tmpu6bp14ky.py", line 36, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s680264929
p02262
u604774382
1432899624
Python
Python3
py
Runtime Error
19930
47308
648
def insertionSort( nums, n, g ): cnt = 0 i = g while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 return cnt def shellSort( nums, n ): cnt = 0 g = [] val =0 for i in range( n ): val = 3*val+1 if n < val: break...
Traceback (most recent call last): File "/tmp/tmp9up1r_ok/tmpw4sv9vvo.py", line 33, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s345866675
p02262
u604774382
1432899747
Python
Python3
py
Runtime Error
0
0
599
def insertionSort( nums, n, g ): cnt = 0 i = g while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 return cnt n = int( input( ) ) nums = [] for i in range( 0, n ): nums.append( int( input( ) ) ) cnt = 0 g = [] val =0 for...
Traceback (most recent call last): File "/tmp/tmpg7pqmx_g/tmp8d3n5nr9.py", line 15, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s266994714
p02262
u604774382
1432899828
Python
Python3
py
Runtime Error
19930
47312
578
def insertionSort( nums, n, g ): cnt = 0 i = g while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 return cnt n = int( input( ) ) nums = [] for i in range( 0, n ): nums.append( int( input( ) ) ) cnt = 0 g = [] val =0 for...
Traceback (most recent call last): File "/tmp/tmpujxhmq1a/tmprvdfkmuy.py", line 15, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s976589776
p02262
u604774382
1432900033
Python
Python3
py
Runtime Error
19930
47312
585
def insertionSort( nums, n, g ): cnt = 0 i = g while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 return cnt n = int( input( ) ) nums = [] for i in range( 0, n ): nums.append( int( input( ) ) ) cnt = 0 g = [] val = 0 fo...
Traceback (most recent call last): File "/tmp/tmplhzt5lvt/tmp32o66uv2.py", line 15, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s952109540
p02262
u604774382
1432900448
Python
Python3
py
Runtime Error
19930
47308
646
def insertionSort( nums, n, g ): global cnt i = g while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 def shellSort( nums, n ): global cnt g = [] val =0 for i in range( 0, n ): val = 3*val+1 if n < val: break ...
Traceback (most recent call last): File "/tmp/tmpt2pbj7v3/tmp5k348xcq.py", line 31, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s794502674
p02262
u604774382
1432900642
Python
Python3
py
Runtime Error
19930
47312
625
def insertionSort( nums, n, g ): global cnt i = g while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 def shellSort( nums, n ): g = [] val =0 for i in range( n ): val = 3*val+1 if n < val: break g.append( val...
Traceback (most recent call last): File "/tmp/tmpbx7is6yy/tmp6adc7l6a.py", line 30, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s430191413
p02262
u604774382
1432900731
Python
Python
py
Runtime Error
19920
104012
663
import sys def insertionSort( nums, n, g ): global cnt i = g while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 def shellSort( nums, n ): g = [] val =0 for i in range( n ): val = 3*val+1 if n < val: break g...
Traceback (most recent call last): File "/tmp/tmpmserpvk7/tmp20ehjjgs.py", line 32, in <module> n = int( sys.stdin.readline( ) ) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s770338993
p02262
u604774382
1432900960
Python
Python3
py
Runtime Error
19920
47308
681
import sys def insertionSort( nums, n, g ): cnt = 0 i = g while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 return cnt def shellSort( nums, n ): g = [] val =0 for i in range( n ): val = 3*val+1 if n < val: ...
Traceback (most recent call last): File "/tmp/tmpy42uyz2_/tmptxmmttsx.py", line 35, in <module> n = int( sys.stdin.readline( ) ) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s472069640
p02262
u604774382
1432901695
Python
Python3
py
Runtime Error
19930
47308
653
import sys def insertionSort( nums, n, g ): cnt = 0 i = g while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 return cnt def shellSort( nums, n ): g = [] val = 1 while val <= n: g.append( val ) val = 3*val+1 g...
Traceback (most recent call last): File "/tmp/tmpu57qpwxj/tmphlukc2yq.py", line 33, in <module> n = int( sys.stdin.readline( ) ) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s562124570
p02262
u604774382
1432902097
Python
Python3
py
Runtime Error
19930
47308
635
import sys def insertionSort( nums, n, g ): global cnt i = g while i < n: v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v i += 1 def shellSort( nums, n ): g = [] val = 1 while val <= n: g.append( val ) val = 3*val+1 g.reverse(...
Traceback (most recent call last): File "/tmp/tmpw58eo2rr/tmpl31s49wg.py", line 30, in <module> n = int( sys.stdin.readline( ) ) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s963226480
p02262
u604774382
1432902366
Python
Python3
py
Runtime Error
19930
47304
592
def insertionSort( nums, n, g ): global cnt for i in range( g, n ): v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v def shellSort( nums, n ): g = [] val = 1 while val <= n: g.append( val ) val = 3*val+1 g.reverse( ) m = len( g ) ...
Traceback (most recent call last): File "/tmp/tmpjvtj83c3/tmpn5q9aoal.py", line 26, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s875646735
p02262
u604774382
1432903288
Python
Python3
py
Runtime Error
19930
47308
527
def insertionSort( nums, n, g ): global cnt for i in range( g, n ): v = nums[i] j = i - g while 0 <= j and v < nums[j]: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v n = int( input( ) ) nums = [] for i in range( n ): nums.append( int( input( ) ) ) g = [] val = 1 while val <= n: g.append...
Traceback (most recent call last): File "/tmp/tmp2jb6kuc7/tmpmbtd8pl2.py", line 12, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s116600536
p02262
u604774382
1432903566
Python
Python3
py
Runtime Error
19930
47308
462
n = int( input( ) ) nums = [] for i in range( n ): nums.append( int( input( ) ) ) g = [] val = 1 while val <= n: g.append( val ) val = 3*val+1 g.reverse( ) m = len( g ) print( m ) print( " ".join( map( str, g ) ) ) cnt = 0 for i in range( m ): for k in range( g[i], n ): v = nums[k] j = k - g[i] while 0 <= j ...
Traceback (most recent call last): File "/tmp/tmpwgqdmdoj/tmpr3p4kz10.py", line 1, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s102693747
p02262
u604774382
1432904431
Python
Python3
py
Runtime Error
19930
47308
463
n = int( input( ) ) nums = [] for i in range( n ): nums.append( int( input( ) ) ) g = [] val = 1 while val <= n: g.append( val ) val = 3*val+1 g.reverse( ) m = len( g ) print( m ) print( " ".join( map( str, g ) ) ) cnt = 0 for i in range( m ): for k in range( g[i], n ): v = nums[k] j = k - g[i] while 0 <= j ...
Traceback (most recent call last): File "/tmp/tmpi7pxxg26/tmp2zj3_nde.py", line 1, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s886364943
p02262
u604774382
1432904812
Python
Python3
py
Runtime Error
19930
47308
462
n = int( input( ) ) nums = [] for i in range( n ): nums.append( int( input( ) ) ) g = [] val = 1 while val <= n: g.append( val ) val = 3*val+1 g.reverse( ) m = len( g ) print( m ) print( " ".join( map( str, g ) ) ) cnt = 0 for i in range( m ): for k in range( g[i], n ): v = nums[k] j = k - g[i] while 0 <= j ...
Traceback (most recent call last): File "/tmp/tmpkiak4ag2/tmpaid4ny65.py", line 1, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s275931454
p02262
u604774382
1432906431
Python
Python3
py
Runtime Error
19930
47308
596
def insertionSort( nums, n, g ): cnt = 0 for i in range( g, n): v = nums[i] j = i - g while ( 0 <= j ) and ( v < nums[j] ): nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v return cnt def shellSort( nums, n ): cnt = 0 g = [] v = 1 while v <= n: g.append( v ) v = 3*v+1 g.reverse...
Traceback (most recent call last): File "/tmp/tmpnji_zdyt/tmp8s96qg5f.py", line 28, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s303705193
p02262
u604774382
1432906534
Python
Python3
py
Runtime Error
19920
47308
593
def insertionSort( nums, n, g ): global cnt for i in range( g, n): v = nums[i] j = i - g while ( 0 <= j ) and ( v < nums[j] ): nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v def shellSort( nums, n ): global cnt cnt = 0 g = [] v = 1 while v <= n: g.append( v ) v = 3*v+1 g.reve...
Traceback (most recent call last): File "/tmp/tmp49n54y4g/tmpu2188qc3.py", line 29, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s069915323
p02262
u604774382
1432906630
Python
Python3
py
Runtime Error
19920
47308
577
def insertionSort( nums, n, g ): global cnt for i in range( g, n): v = nums[i] j = i - g while ( 0 <= j ) and ( v < nums[j] ): nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v def shellSort( nums, n ): g = [] v = 1 while v <= n: g.append( v ) v = 3*v+1 g.reverse( ) m = len( g ) ...
Traceback (most recent call last): File "/tmp/tmphjouiz0q/tmpg2o6i7m8.py", line 25, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s905599356
p02262
u604774382
1432907108
Python
Python3
py
Runtime Error
19930
47308
560
def insertionSort( nums, n, g ): global cnt for i in range( g, n): v = nums[i] j = i - g while ( 0 <= j ) and ( v < nums[j] ): nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v def shellSort( nums, n ): g = [] v = 1 while v <= n: g.append( v ) v = 3*v+1 g.reverse( ) m = len( g ) ...
Traceback (most recent call last): File "/tmp/tmp6ro4zqav/tmpo_tk0n79.py", line 25, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s053727443
p02262
u604774382
1432907375
Python
Python3
py
Runtime Error
19930
47308
572
def insertionSort( nums, n, g ): global cnt for i in range( g, n ): v = nums[i] j = i - g while ( 0 <= j ) and ( v < nums[j] ): nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v def shellSort( nums ): g = [] v = 1 n = len( nums ) while v <= n: g.append( v ) v = 3*v+1 g.reverse( )...
Traceback (most recent call last): File "/tmp/tmp9ppln01h/tmpt9b3xwe2.py", line 26, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s175827468
p02262
u604774382
1432953157
Python
Python3
py
Runtime Error
19920
47308
604
def insertionSort( nums, n, g ): cnt = 0 for i in range( g, n ): v = nums[i] j = i - g while j >= 0 and nums[j] > v: nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v return cnt def shellSort( nums, n ): g = [] v = 1 while v <= n: g.append( v ) v = 3*v+1 g.reverse( ) m = len(...
Traceback (most recent call last): File "/tmp/tmpc3zov484/tmpmdnnk_gh.py", line 30, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s129170470
p02262
u604774382
1433166438
Python
Python3
py
Runtime Error
0
0
706
def insertionSort( nums, n, g ): global cnt for i in range( g, n ): v = nums[i] j = i - g while ( 0 <= j ) and ( v < nums[j] ): nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v def shellSort( nums ): global cnt g = [] v ...
File "/tmp/tmpppdodr1w/tmpi2grpct3.py", line 14 g = [] ^ IndentationError: unindent does not match any outer indentation level
s589646206
p02262
u604774382
1433166545
Python
Python3
py
Runtime Error
0
0
593
def insertionSort( nums, n, g ): global cnt for i in range( g, n ): v = nums[i] j = i - g while ( 0 <= j ) and ( v < nums[j] ): nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v def shellSort( nums ): global cnt g = [] v = 1 n = len( nums ) while v <= n: g.append( v ) v = 3*v+1 g....
Traceback (most recent call last): File "/tmp/tmpvak5nkzp/tmpo22viblq.py", line 29, in <module> n = int( raw_input( ) ) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s185398917
p02262
u604774382
1433166582
Python
Python3
py
Runtime Error
19930
47308
585
def insertionSort( nums, n, g ): global cnt for i in range( g, n ): v = nums[i] j = i - g while ( 0 <= j ) and ( v < nums[j] ): nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v def shellSort( nums ): global cnt g = [] v = 1 n = len( nums ) while v <= n: g.append( v ) v = 3*v+1 g....
Traceback (most recent call last): File "/tmp/tmppz5tc013/tmpaaezw_v7.py", line 29, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s170738802
p02262
u604774382
1435153212
Python
Python3
py
Runtime Error
19930
47308
714
def insertionSort( nums, n, g ): global cnt for i in range( g, n ): v = nums[i] j = i - g while ( 0 <= j ) and ( v < nums[j] ): nums[ j+g ] = nums[j] j -= g cnt += 1 nums[ j+g ] = v def shellSort( nums ): global cnt g = [] v = 1 ...
Traceback (most recent call last): File "/tmp/tmpvyam77gh/tmpzk15kejq.py", line 30, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s613362394
p02262
u604774382
1435154426
Python
Python3
py
Runtime Error
19930
47316
677
def insertionSort( s, n, g ): global cnt for i in range( g, n ): v = s[i] j = i - g while ( 0 <= j ) and ( v < s[j] ): s[ j+g ] = s[j] j -= g cnt += 1 s[ j+g ] = v def shellSort( s ): global cnt g = [] v = 1 n = len( s ) ...
Traceback (most recent call last): File "/tmp/tmp6n_ih8qx/tmp6h3jkx5s.py", line 31, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s662116855
p02262
u609407244
1436244293
Python
Python3
py
Runtime Error
30
6776
839
def insertion_sort(array, g, result): for i in range(g, len(array)): v = array[i] j = i - g while j >= 0 and array[j] > v: array[j + g] = array[j] j -= g result['count'] += 1 A[j + g] = v def shell_sort(array, result): result['count'] = 0 ...
Traceback (most recent call last): File "/tmp/tmpd3h_62o6/tmpbgtrwzvs.py", line 25, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s645349975
p02262
u609407244
1436244625
Python
Python3
py
Runtime Error
19930
47320
922
def insertion_sort(array, g, result): for i in range(g, len(array)): v = array[i] j = i - g while j >= 0 and array[j] > v: array[j + g] = array[j] j -= g result['count'] += 1 A[j + g] = v def g_gene(n): yield 1 for i in range(2, n): ...
Traceback (most recent call last): File "/tmp/tmpioru4p6y/tmpf4gp03hh.py", line 33, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s235567975
p02262
u609407244
1436245310
Python
Python3
py
Runtime Error
19930
47324
934
def insertion_sort(array, g, result): for i in range(g, len(array)): v = array[i] j = i - g while j >= 0 and array[j] > v: array[j + g] = array[j] j -= g result['count'] += 1 A[j + g] = v def g_gene(n): yield 1 i = 2 while 1: ...
Traceback (most recent call last): File "/tmp/tmp552odkfk/tmpakk2h9ca.py", line 35, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s687748137
p02262
u609407244
1436245917
Python
Python3
py
Runtime Error
19930
47316
921
def insertion_sort(array, g, result): for i in range(g, len(array)): v = array[i] j = i - g while j >= 0 and array[j] > v: array[j + g] = array[j] j -= g result['count'] += 1 A[j + g] = v def g_gene(n): yield 1 for i in range(2, n): ...
Traceback (most recent call last): File "/tmp/tmph9kjt2qh/tmpu217tc41.py", line 33, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s040837384
p02262
u609407244
1436258459
Python
Python3
py
Runtime Error
19930
47316
945
def insertion_sort(array, g, result): for i in range(g, len(array)): v = array[i] j = i - g while j >= 0 and array[j] > v: array[j + g] = array[j] j -= g result['count'] += 1 A[j + g] = v def g_gene(n): yield 1 for i in range(2, n): ...
Traceback (most recent call last): File "/tmp/tmpwg8j531l/tmpops30_ki.py", line 33, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s600989786
p02262
u609407244
1436258595
Python
Python3
py
Runtime Error
19920
47320
986
def insertion_sort(array, g, result): for i in range(g, len(array)): v = array[i] j = i - g while j >= 0 and array[j] > v: array[j + g] = array[j] j -= g result['count'] += 1 A[j + g] = v def g_gene(n): yield 1 for i in range(2, n): ...
Traceback (most recent call last): File "/tmp/tmp3m4ek7x3/tmp8u9d5sxg.py", line 34, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s171963275
p02262
u609407244
1436258655
Python
Python3
py
Runtime Error
19930
47328
805
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 import sys def isort(a, n, g): global 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 -= g ...
Traceback (most recent call last): File "/tmp/tmpa8tzpkq1/tmps8q4tcwk.py", line 59, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s074009144
p02262
u609407244
1436258790
Python
Python3
py
Runtime Error
19930
47308
690
import sys def isort(a, n, g): global 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 -= g cnt += 1 a[j + g] = v # input data n = int(sys.stdin.readline()) a = [] for i in range(n): a.append...
Traceback (most recent call last): File "/tmp/tmpi6aer06b/tmpqmuus79e.py", line 15, in <module> n = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s342355935
p02262
u609407244
1436259320
Python
Python3
py
Runtime Error
19920
47308
661
#!/usr/bin/python import sys if sys.version_info[0]>=3: raw_input=input 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...
Traceback (most recent call last): File "/tmp/tmpdwnck38j/tmpm8iqvz62.py", line 31, in <module> a=[int(raw_input()) for i in range(int(raw_input()))] ^^^^^^^^^^^ EOFError: EOF when reading a line
s389857045
p02262
u197445199
1442297636
Python
Python
py
Runtime Error
0
0
536
import math N = int(raw_input()) A = [] for i in range(N): a = raw_input() A.append(int(a)) g_pre_list = [1093, 364, 121, 40, 13, 4, 1] g_list = [] for g in g_pre_list: if g < math.ceil((N**1.5): g_list.append(g) print len(g_list) print " ".join(map(str, g_list)) count = 0 for g in g_list: for...
File "/tmp/tmpr9ej6iae/tmpputhojyy.py", line 11 if g < math.ceil((N**1.5): ^ SyntaxError: invalid syntax
s729311605
p02262
u072053884
1444715383
Python
Python3
py
Runtime Error
0
0
392
n = int(input()) A = [int(input()) for i in range(n)] #shellSort cnt = 0 m = 3 G = [n - 1,int((n - 1) / 2) 1] for i in range(m): g = G[i] # insertionSort for j in range(g, n): k = j - g while (k >= 0) and (A[k] > A[k + g]): A[k + g], A[k] = A[k], A[k + g] k -= g ...
File "/tmp/tmpitu3dvge/tmpma7ebz67.py", line 7 G = [n - 1,int((n - 1) / 2) 1] ^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma?
s381492220
p02262
u072053884
1444757778
Python
Python3
py
Runtime Error
0
0
472
import sys A = list(map(int, sys.stdin.read().split("\n"))) n = A[0] del A[0] #shellSort cnt = 0 G = [] tg = 1 while tg <= n: G.append(tg) tg = 3 * tg + 1 G.reverse() m = len(G) for i in range(m): g = G[i] # insertionSort for j in range(g, n): k = j - g while (k >= 0) and (A[k] ...
Traceback (most recent call last): File "/tmp/tmprgy2vsdb/tmp9y_cxftq.py", line 3, in <module> A = list(map(int, sys.stdin.read().split("\n"))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s698680901
p02262
u963402991
1448344505
Python
Python3
py
Runtime Error
0
0
719
def insertionSort(A, n, g): global count for i in range(g,n): v = A[i] j = i - g #間隔gずつ選択ソートを行っていく while j >= 0 and A[j] > v: A[j+g] = A[j] j -= g count += 1 A[j+g] = v def shellSort(A, n): global count G = [i for i in range(1,...
Traceback (most recent call last): File "/tmp/tmpt7zqax4e/tmpxpbk0us0.py", line 23, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s900180595
p02262
u963402991
1448344672
Python
Python3
py
Runtime Error
0
0
587
n = int(input()) A = [int(input()) for i in range(n)] count = 0 def insertionSort(A, n, g): global count 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 -= g count += 1 A[j+g] = v def shellSort(A, ...
Traceback (most recent call last): File "/tmp/tmph6wbs0p_/tmpgqluing4.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s234316657
p02262
u488601719
1448782155
Python
Python3
py
Runtime Error
0
0
587
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 g = [] h = 1 while h <= len(a): ...
Traceback (most recent call last): File "/tmp/tmpdr5f6ab7/tmpwj5mi6fq.py", line 29, in <module> a=[int(raw_input()) for i in range(int(raw_input()))] ^^^^^^^^^ NameError: name 'raw_input' is not defined
s161838952
p02262
u488601719
1448782942
Python
Python3
py
Runtime Error
0
0
672
import math def insertion_sort(A, N, g): for i in range(g, N): v = A[i] j = i - g while j >= 0 and A[j] > v: # v????????§???????????°??????????????? A[j+g] = A[j] j -= g A[j+g] = v print(*A) def shell_sort(a, n): g = [] gap = 1 ...
Traceback (most recent call last): File "/tmp/tmp4ov0o86l/tmpq9yqyh6j.py", line 31, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s160383556
p02262
u341533698
1454397620
Python
Python
py
Runtime Error
0
0
823
def insertionSort(A, n, g, cnt): for i in xrange(1,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 A, cnt def shellSort(A, n): cnt = 0 G = [1] for i in range(1,len(A)): i...
File "/tmp/tmp06demrxt/tmpg_n7abh6.py", line 21 print m ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s390211766
p02262
u603356762
1464872680
Python
Python3
py
Runtime Error
0
0
377
N = int(input()) a = [int(x) for x in input().split()] cnt = 0 def insertionSort(A,n,g): global 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 A def shellSort(A,n): m = 3 G = [4,3,1] for x in G: A=insertionSort(A,n,x) p...
Traceback (most recent call last): File "/tmp/tmpnhtwj9f1/tmpzejkzzah.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s406578243
p02262
u603356762
1464873155
Python
Python3
py
Runtime Error
0
0
390
N = int(input()) a = [int(x) for x in input().split()] cnt = 0 def insertionSort(A,n,g): global 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 A def shellSort(A,n): m = 3 G = [4,3,1] for x in G: A=insertionSort(A,n,x) p...
Traceback (most recent call last): File "/tmp/tmpxyq1ff28/tmp9uzs1ehy.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s270295337
p02262
u603356762
1464873371
Python
Python3
py
Runtime Error
0
0
388
N = int(input()) a = [int(x) for x in input().split()] cnt = 0 def insertionSort(A,n,g): global 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 A def shellSort(A,n): m = 2 G = [4,1] for x in G: A=insertionSort(A,n,x) pri...
Traceback (most recent call last): File "/tmp/tmpm0im7o5f/tmpavmvxac0.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s766841792
p02262
u496045719
1470301086
Python
Python3
py
Runtime Error
0
0
935
swap_count = 0 def main(): num = int(input()) elements = [int(x) for x in input().split()] # Get max interval intervals = [] for i in range(0, num): interval = int_f(i) if num <= interval: break intervals.append(interval) for interval in intervals: insertion_sort(elements, num, int...
Traceback (most recent call last): File "/tmp/tmpxwxq8yms/tmp75rhmoo9.py", line 47, in <module> main() File "/tmp/tmpxwxq8yms/tmp75rhmoo9.py", line 5, in main num = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s542610658
p02262
u496045719
1470303785
Python
Python3
py
Runtime Error
0
0
925
swap_count = 0 def main(): num = int(input()) elements = [] for i in range(0, num): elements.append(int(input())) # Get intervals interval = 1 intervals = [interval] while True: interval = int_f(interval) if interval > num: break intervals.insert(0, interval) for interval in in...
Traceback (most recent call last): File "/tmp/tmpi_84m4by/tmph3zregu5.py", line 50, in <module> main() File "/tmp/tmpi_84m4by/tmph3zregu5.py", line 5, in main num = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s716129733
p02262
u092047183
1471654376
Python
Python3
py
Runtime Error
0
0
555
# coding: utf-8 import math import sys def insertionSort(a, n, g): ct = 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 ct += 1 a[j+g] = v return ct n = int(input()) a = list(map(int, sys...
Traceback (most recent call last): File "/tmp/tmpr592mnkp/tmp6y0hetgx.py", line 18, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s927291260
p02262
u390995924
1472577791
Python
Python3
py
Runtime Error
0
0
600
n = int(input()) A = [int(input()) for _ in range(n)] def isort(n, g): global A global 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 -= g cnt += 1 A[j + g] = v def ssort(n): global cnt g...
Traceback (most recent call last): File "/tmp/tmp9ps_hrx5/tmp6h0ltmku.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s099344903
p02262
u890722286
1474035320
Python
Python3
py
Runtime Error
0
0
561
import sys n = int(input()) A = list(map(int, sys.stdin)) cnt = 0 def insertion_sort(L, n, g): global cnt for i in range(g, n): v = L[i] j = i - g while 0 <= j and v < L[j]: L[j+g] = L[j] j -= g cnt += 1 L[j+g] = v def shell_sort(L, n): ...
Traceback (most recent call last): File "/tmp/tmp55e871wf/tmp893wbl4e.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s940024150
p02262
u890722286
1474035524
Python
Python3
py
Runtime Error
0
0
683
import sys n = int(input()) A = list(map(int, sys.stdin)) cnt = 0 def insertion_sort(L, n, g): global cnt for i in range(g, n): v = L[i] j = i - g while 0 <= j and v < L[j]: L[j+g] = L[j] j -= g cnt += 1 L[j+g] = v def shell_sort(L, n): ...
Traceback (most recent call last): File "/tmp/tmp_xr_9srv/tmpuj4ftjtt.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s552826873
p02262
u908984540
1474841100
Python
Python3
py
Runtime Error
0
0
698
# -*- coding:utf-8 -*- cnt = 0 def insection_sort(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 -= g cnt += 1 a[j+g] = v def shell_sort(a): g = list(1) temp = 4 while te...
Traceback (most recent call last): File "/tmp/tmpjhwy2in5/tmpxaf8lm6t.py", line 30, in <module> inp_num = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s236822698
p02262
u500396695
1477009105
Python
Python3
py
Runtime Error
0
0
791
import math def insertionsort(A, n, g): 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): G = [] ##??§????°???¨?????????????????°?...
Traceback (most recent call last): File "/tmp/tmpghkwfshh/tmpgq9nfcqh.py", line 32, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s754001482
p02262
u922871577
1478938272
Python
Python
py
Runtime Error
10
6408
529
cnt = 0 def insSort(A, n, g): global cnt for i in xrange(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): G = range(n-1, 0, -3) if G[-1] != 1: G.append(1) m ...
File "/tmp/tmpbqbt720n/tmp4i8b1b5l.py", line 19 print m ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s677846266
p02262
u922871577
1478939940
Python
Python
py
Runtime Error
0
0
575
cnt = 0 def insSort(A, n, g): global cnt for i in xrange(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): G = reversed([i*i for i in xrange(1, n) if i*i < n]) if len(G) ...
File "/tmp/tmpmw6lsfp5/tmp16jq_m3x.py", line 19 print m ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s226666477
p02262
u908984540
1482770429
Python
Python3
py
Runtime Error
30
7824
1018
# -*- coding:utf-8 -*- import math def insertion_sort(num_list, length, interval): cnt = 0 for i in range(interval, length): v = num_list[i] j = i - interval while j >= 0 and num_list[j] > v: num_list[j+interval] = num_list[j] j = j - interval cnt = ...
Traceback (most recent call last): File "/tmp/tmpzo8b5dlb/tmp8wt_565w.py", line 37, in <module> input_num = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s326998040
p02262
u089830331
1483486068
Python
Python3
py
Runtime Error
30
7708
514
def insertion_sort(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 shell_sort(A, n): cnt = 0 m = 5 G = [5,4,3,2,1] for i in range(m): cnt = insertion_sort(A, n, G[i], cnt)...
Traceback (most recent call last): File "/tmp/tmpgggv_045/tmpwjs68slk.py", line 21, in <module> for i in range(int(input())): ^^^^^^^ EOFError: EOF when reading a line
s099675804
p02262
u918276501
1489058846
Python
Python3
py
Runtime Error
0
0
795
def insertion_sort(a, n, g): ct = 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 -= g ct += 1 a[j+g] = v return ct def interval_list(n): m = 0 gi= 1 g = [] while b <= n: m += 1 ...
Traceback (most recent call last): File "/tmp/tmpg16jirk6/tmp9pok8jg8.py", line 26, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s164504441
p02262
u918276501
1489058878
Python
Python3
py
Runtime Error
0
0
656
def insertion_sort(a, n, g): ct = 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 -= g ct += 1 a[j+g] = v return ct def interval_list(n): m = 0 gi= 1 g = [] while b <= n: m += 1 ...
Traceback (most recent call last): File "/tmp/tmpipriqhv_/tmpf7z7h9ys.py", line 24, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s077528309
p02262
u130834228
1490100412
Python
Python3
py
Runtime Error
0
0
1290
def InsertionSort(A, N, g): global cnt 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 = j-gdef InsertionSort(A, N, g): global cnt for i in range(g, N): key = A[i] j = i-g while j >= 0 and A[j] ...
File "/tmp/tmpo8oqct98/tmp4uzq33p7.py", line 8 j = j-gdef InsertionSort(A, N, g): ^^^^^^^^^^^^^ SyntaxError: invalid syntax
s209064322
p02262
u796784914
1493448718
Python
Python
py
Runtime Error
0
0
699
n = input() A = [input() for i in range(n)] 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 -= g cnt += 1 A[j+g] = v return cnt def shellSort(A,n): cnt = 0 m = ...
File "/tmp/tmpaf8ujtzy/tmpe2mpf4za.py", line 35 print m ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s712969226
p02262
u091533407
1497751538
Python
Python3
py
Runtime Error
30
7868
745
# -*- coding: utf-8 -*- """ Created on Sun Jun 18 10:42:00 2017 @author: syaga """ import math 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 ret...
Traceback (most recent call last): File "/tmp/tmpt932jgqe/tmpn_lcsroc.py", line 32, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s892677012
p02262
u264972437
1500305389
Python
Python3
py
Runtime Error
0
0
644
import math 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 A,cnt def shellSort(A,n): cnt = 0 #m = n//2 + 1 #G = [2*i + 1*(i==0) for i in range(m)[::-1]] m = int(math.log(n,2)) + 1 G = [2**i for...
Traceback (most recent call last): File "/tmp/tmpwxal4qga/tmpft8iyn9d.py", line 26, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s971999646
p02262
u914146430
1500789489
Python
Python3
py
Runtime Error
0
0
486
def insertionSort(a,n,g): 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 global cnt cnt+=1 a[j+g]=v def shellsort(a,n): # global cnt cnt=0 g=[(3**i-1)//2 for i in range(n,0,-1) if (3**i-1)//2<n] ...
Traceback (most recent call last): File "/tmp/tmp3sarqomw/tmplfe0q0eu.py", line 22, in <module> a,m,g=shellsort(a,n) ^ NameError: name 'a' is not defined
s139266627
p02262
u539803218
1501633736
Python
Python3
py
Runtime Error
0
0
534
import math def insertionSort(a, n, g): ct = 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 -= g ct += 1 a[j+g] = v return ct n = int(input()) a = list(map(int, input().split())) cnt = 0 m = 0 ...
Traceback (most recent call last): File "/tmp/tmpn19kk6f_/tmpl3cccer4.py", line 15, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s884283877
p02262
u539803218
1501633755
Python
Python3
py
Runtime Error
0
0
534
import math def insertionSort(a, n, g): ct = 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 -= g ct += 1 a[j+g] = v return ct n = int(input()) a = list(map(int, input().split())) cnt = 0 m = 0 ...
Traceback (most recent call last): File "/tmp/tmp27zwp_sj/tmp0agmt5n6.py", line 15, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s602155059
p02262
u539803218
1501633766
Python
Python3
py
Runtime Error
0
0
534
import math def insertionSort(a, n, g): ct = 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 -= g ct += 1 a[j+g] = v return ct n = int(input()) a = list(map(int, input().split())) cnt = 0 m = 0 ...
Traceback (most recent call last): File "/tmp/tmplqoc0d1w/tmpriqt7k5n.py", line 15, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s138912733
p02262
u539803218
1501633792
Python
Python3
py
Runtime Error
0
0
548
#coding:utf-8 import math def insertionSort(a, n, g): ct = 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 -= g ct += 1 a[j+g] = v return ct n = int(input()) a = list(map(int, input().split())) ...
Traceback (most recent call last): File "/tmp/tmprao11zph/tmps8dgcrnz.py", line 16, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s580835863
p02262
u491916705
1502095043
Python
Python
py
Runtime Error
0
0
579
n = int(raw_input()) a = [] for i in range(n): a.append(int(raw_input())) cnt = 0 num = 1 G = [1] while 1: if num*3+1 > n: break G.insert(0, num*3+1) num = num*3 + 1 m = num def insertionSort(A, n, g, cnt): for i in range(g, n): v = A[i] j = i - g while j >= 0 and A...
File "/tmp/tmp1vx_3_6c/tmp7g3monc6.py", line 27 print m ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s002006265
p02262
u508732591
1502781361
Python
Python3
py
Runtime Error
0
0
546
import sys import math ct= 0 def insertion_sort(a, n, g): for j in range(0,n-g): v = a[j+g] while j >= 0 and a[j] > v: a[j+g] = a[j] j = j-g ct += 1 a[j+g] = v n = int(input()) a = list(map(int, sys.stdin.readlines())) b = 701 g = [x for x in [1,4,10,23,...
Traceback (most recent call last): File "/tmp/tmpx1wbrbg4/tmpuspk80x8.py", line 14, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s775880498
p02262
u659034691
1503264572
Python
Python3
py
Runtime Error
150
8228
593
#shellSort(A, n) n=int(input()) A=[int(input()) for i in range(n)] cnt = 0 G=[1] S=str(G[0]) #if 5<n<13: t=n//2 #elif n<3000: # t=n//9 #else: # t=n//17 Gt=[4, 9, 20, 46, 103, 233, 525, 1182,2660, 5985, 13467] i=0 while Gt[i]<t: G.insert(0,Gt[i]) # print (i) S=str(G[0])+" "+S i+=1 m=len(G) print (m)...
Traceback (most recent call last): File "/tmp/tmpmb8uyqfz/tmptnrq9er5.py", line 2, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s281115840
p02262
u024715419
1507624326
Python
Python3
py
Runtime Error
0
0
449
def insertionSort(a,n,g): 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 n = int(input()) a = [int(input()) for i in range(n)] cnt = 0 i = 0 g = [1] while 3*g[i]+1 < n: g.appen...
File "/tmp/tmp92f5vuec/tmp09t_ewzf.py", line 2 for i in range(g,n) ^ SyntaxError: expected ':'
s980335946
p02262
u024715419
1507624579
Python
Python3
py
Runtime Error
0
0
461
def insertionSort(a,n,g): 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 global cnt += 1 a[j + g] = v cnt = 0 n = int(input()) a = [int(input()) for i in range(n)] i = 0 g = [1] while 3*g[i]+1 < n: ...
File "/tmp/tmpnht34a_e/tmpd33xy0jk.py", line 8 global cnt += 1 ^^ SyntaxError: invalid syntax
s236149012
p02262
u928329738
1511971443
Python
Python3
py
Runtime Error
0
0
630
g_m=0 g_G=[] g_cnt=0 A=[] n = int(input()) for i in range(n): A.append(int(input())) def insertionSort(A,n,g): global 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 g_cnt += 1 A[j+g]=v ...
Traceback (most recent call last): File "/tmp/tmp0en12_rz/tmp8dk3sce0.py", line 5, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s346040315
p02262
u928329738
1511971681
Python
Python3
py
Runtime Error
0
0
660
g_m=0 g_G=[] g_cnt=0 A=[] n = int(input()) for i in range(n): A.append(int(input())) def insertionSort(A,n,g): global 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 g_cnt += 1 A[j+g]=v ...
Traceback (most recent call last): File "/tmp/tmp1bnupcul/tmpl09kiqwi.py", line 5, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s026267485
p02262
u928329738
1511973843
Python
Python3
py
Runtime Error
100
6212
661
g_m=0 g_G=[] g_cnt=0 A=[] n = int(input()) for i in range(n): A.append(int(input())) def insertionSort(A,n,g): global 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 g_cnt += 1 A[j+g]=v de...
Traceback (most recent call last): File "/tmp/tmpy2i2hgfy/tmp2mzjl73i.py", line 5, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s086091686
p02262
u928329738
1511973975
Python
Python3
py
Runtime Error
1290
10636
662
g_m=0 g_G=[] g_cnt=0 A=[] n = int(input()) for i in range(n): A.append(int(input())) def insertionSort(A,n,g): global 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 g_cnt += 1 A[j+g]=v de...
Traceback (most recent call last): File "/tmp/tmpepdclgae/tmpgjjr_coo.py", line 5, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s792716712
p02262
u409571842
1514443760
Python
Python3
py
Runtime Error
350
6896
835
#coding: UTF-8 import copy class Algo: cnt = 0 @staticmethod def insertionSort(a, n, g): 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 -= g Algo.cnt += 1 a[j+g] = v def shellSort(a, n): if n > 40: G = [40, 13, 4...
Traceback (most recent call last): File "/tmp/tmpdo2w8m4d/tmpmnzbb22j.py", line 41, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s109786133
p02262
u409571842
1514444333
Python
Python3
py
Runtime Error
1720
11412
752
#coding: UTF-8 import copy class Algo: cnt = 0 @staticmethod def insertionSort(a, n, g): 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 -= g Algo.cnt += 1 a[j+g] = v def shellSort(a, n): h = 1 G = [] while h <=...
Traceback (most recent call last): File "/tmp/tmpk35d4a57/tmp5set3ibf.py", line 38, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s201695706
p02262
u662418022
1516274323
Python
Python3
py
Runtime Error
1320
9852
885
# -*- coding: utf-8 -*- def insertionSort(A, n, g): global 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 -= g cnt += 1 A[j+g] = v def shellSort(A, n): def func(m): if m == 0: ...
Traceback (most recent call last): File "/tmp/tmpw35txoy5/tmpa778an1f.py", line 43, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s954985992
p02262
u662418022
1516275262
Python
Python3
py
Runtime Error
0
0
708
# -*- coding: utf-8 -*- def insertionSort(A, n, g): global 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 -= g cnt += 1 A[j+g] = v def shellSort(A, n): G = [] i = 0 g = 1 while g...
Traceback (most recent call last): File "/tmp/tmpk1s964_k/tmpzgnkk2aj.py", line 34, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s723370130
p02262
u426534722
1516290332
Python
Python3
py
Runtime Error
0
0
583
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 -= g cnt += 1 A[j + g] = v return cnt def shellSort(A, n): cnt = 0 h = 1 G = [] while h < n: G += [h]...
Traceback (most recent call last): File "/tmp/tmpihd8l2p9/tmp09qar_9z.py", line 25, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s801603518
p02262
u152639966
1516303670
Python
Python3
py
Runtime Error
1900
12176
458
n=int(input()) A=[] G=[] for i in range(n): A.append(input()) cnt=0 flag=1 h=1 while flag: G.append(str(h)) h=3*h+1 if h>n: flag=0 m=len(G) G.reverse() def Insertion_Sort(A,n,g,cnt): for i in range(g,n): v=int(A[i]) j=i-g while j>=0 and int(A[j])>v: A[j+g]=A[j] j=j-g cnt+=1 A[j+g]=v return(c...
Traceback (most recent call last): File "/tmp/tmpvxziyxph/tmpkjrewssk.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s219155712
p02262
u839008951
1516432424
Python
Python3
py
Runtime Error
4830
10620
608
import copy cnt = 0 def insSort(A, n, g): global 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 shellSort(A, n): G = [] i = 1 while True: G.appe...
Traceback (most recent call last): File "/tmp/tmps0rj7bbk/tmpcf23l__j.py", line 37, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line