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
s151803835
p02258
u826549974
1524564811
Python
Python3
py
Runtime Error
0
0
236
n = int(input()) A = [int(input()) for i in range(n)] max = A[1]-A[0] min = A[0] for i in range(1,n-1): if(min > A[i]): for j in range(j,n-1): if(max < A[j+1]-A[i]): max = A[j+1]-A[i] print(max)
Traceback (most recent call last): File "/tmp/tmp9844sojq/tmpiz4pan3n.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s891250256
p02258
u574649773
1525182896
Python
Python3
py
Runtime Error
20
5608
335
# -*- coding=utf-8 -*- price = [int(input()) for p in range(int(input()))] # Nのコード → いけるぞ! # まずは最小値を調査 min_ = price[0] index_ = 0 for i in range(1, len(price)): if price[i] < min_: min_ = price[i] index_ = i # 次は最大値を調査 print(max(price[index_ + 1:]) - min_)
Traceback (most recent call last): File "/tmp/tmpnzfra9td/tmpxsndipu3.py", line 2, in <module> price = [int(input()) for p in range(int(input()))] ^^^^^^^ EOFError: EOF when reading a line
s217117243
p02258
u689848537
1527385816
Python
Python3
py
Runtime Error
0
0
88
n = int(input()) a = [input() for i in range(n)] margin = max(a) - min(a) print(margin)
Traceback (most recent call last): File "/tmp/tmpw8aga0a7/tmpm1wttcn6.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s148201493
p02258
u689848537
1527385972
Python
Python3
py
Runtime Error
0
0
89
n = int(input()) a = [input() for i in range(n)] margin = max(a) - min(a) print(min(a))
Traceback (most recent call last): File "/tmp/tmp93z5x6sr/tmpoj_09lu8.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s211797806
p02258
u689848537
1527389476
Python
Python3
py
Runtime Error
0
0
189
n = int(input()) a = [input() for i in range(n)] min_value = -200000 for a in range(a) max_mergin = max(max_mergin,a - min_value) min_value = min(min_value,a) print(max_mergin)
File "/tmp/tmpwv6pw5nw/tmplqcllf1x.py", line 6 for a in range(a) ^ SyntaxError: expected ':'
s976490768
p02258
u689848537
1527389667
Python
Python3
py
Runtime Error
0
0
195
n = int(input()) a = [input() for i in range(n)] min_value = -200000 for a in range(a) max_value = max(max_value,a - min_value) min_value = min(min_value,a) print(max_value-min_value)
File "/tmp/tmp98x6rocq/tmpwxaw0p67.py", line 6 for a in range(a) ^ SyntaxError: expected ':'
s313167691
p02258
u689848537
1527389712
Python
Python3
py
Runtime Error
0
0
185
n = int(input()) a = [input() for i in range(n)] min_value = -200000 for a in range(a) max_value = max(max_value,a - min_value) min_value = min(min_value,a) print(max_value)
File "/tmp/tmpx81k15j0/tmpp7qpop4z.py", line 6 for a in range(a) ^ SyntaxError: expected ':'
s024695105
p02258
u689848537
1527390000
Python
Python3
py
Runtime Error
0
0
217
n = int(input()) a = [input() for i in range(n)] max_mergin = -200000 min_value = a[0] for abc in range(a): max_mergin = max(max_mergin,abc - min_value) min_value = min(min_value,abc) print(max_mergin)
Traceback (most recent call last): File "/tmp/tmpty6y59y1/tmppknxp1wu.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s655112079
p02258
u007270338
1527479783
Python
Python3
py
Runtime Error
0
0
200
#coding:utf-8 n = int(input()) minv = pri_list[0] maxv = -10000000000 for i in range(1,n-1): price = int(input()) maxv = max([maxv, price - minv]) minv = min([minv, price]) print(maxv)
Traceback (most recent call last): File "/tmp/tmpa8w1hifx/tmpj075onwa.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s531129934
p02258
u689848537
1527561209
Python
Python3
py
Runtime Error
0
0
237
n = int(input()) a = [int(input()) for i in range(n)] max_mergin = -20000000000 min_value = a[0] for abc in range(1,a): max_mergin = max(max_mergin, a[abc] - min_value) min_value = min(min_value, a[abc]) print(max_mergin)
Traceback (most recent call last): File "/tmp/tmpitdb7dof/tmpxsk35art.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s049094745
p02258
u689848537
1527561324
Python
Python3
py
Runtime Error
0
0
205
n = int(input()) a = [int(input()) for i in range(n)] minv = R[0] maxv = R[1] - R[0] for j in range(1, n): if (maxv < R[j] - minv): maxv = R[j] - minv if (R[j] < minv): minv = R[j] print(maxv)
Traceback (most recent call last): File "/tmp/tmplhru9dah/tmpfxvyxzmx.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s717778174
p02258
u318430977
1527609858
Python
Python3
py
Runtime Error
0
0
324
import numpy as np def maximum_profit(rs): ans = rs[1] - rs[0] for i in range(n): for j in range(i + 1, n): if ans < rs[j] - rs[i]: ans = rs[j] - rs[i] return ans n = int(input()) rs = [] for _ in range(n): r = int(input()) rs.append(r) print(maximum_profit(rs))
Traceback (most recent call last): File "/tmp/tmp69agto9i/tmp9iszh0w_.py", line 13, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s331259206
p02258
u559106458
1528639681
Python
Python3
py
Runtime Error
0
0
245
n = input() n = int(n) maxv = -20000000 list = [] i = 1 while(i<n): x = input() x = int(x) list = list.append(x) i = i + 1 minv = list[0] i = 1 while(i<n): maxv = max(maxv, list[i]-minv) minv = min(minv, list[i]) i = i + 1 print(maxv)
Traceback (most recent call last): File "/tmp/tmp24r28nl6/tmplf9i02fl.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s457423054
p02258
u559106458
1528639748
Python
Python3
py
Runtime Error
0
0
245
n = input() n = int(n) maxv = -20000000 list = [] i = 1 while(i<n): x = input() x = int(x) list = list.append(x) i = i + 1 minv = list[0] i = 1 while(i<n): maxv = max(maxv, list[i]-minv) minv = min(minv, list[i]) i = i + 1 print(maxv)
Traceback (most recent call last): File "/tmp/tmpma2v95xv/tmphz54yn0g.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s520299380
p02258
u559106458
1528639855
Python
Python3
py
Runtime Error
0
0
245
n = input() n = int(n) maxv = -20000000 list = [] i = 0 while(i<n): x = input() x = int(x) list = list.append(x) i = i + 1 minv = list[0] i = 1 while(i<n): maxv = max(maxv, list[i]-minv) minv = min(minv, list[i]) i = i + 1 print(maxv)
Traceback (most recent call last): File "/tmp/tmp_qvrf4ci/tmpi46egbjw.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s581013245
p02258
u559106458
1528639938
Python
Python3
py
Runtime Error
0
0
222
n = input() maxv = -20000000 list = [] i = 0 while(i<n): x = input() list = list.append(x) i = i + 1 minv = list[0] i = 1 while(i<n): maxv = max(maxv, list[i]-minv) minv = min(minv, list[i]) i = i + 1 print(maxv)
Traceback (most recent call last): File "/tmp/tmp3icn6ij9/tmpjxgbwg9w.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s761730972
p02258
u559106458
1528640022
Python
Python3
py
Runtime Error
0
0
223
n = input() n = int(n) list = [] i = 0 while(i<n): x = input() list[i] = x i = i + 1 maxv = -20000000 minv = list[0] i = 1 while(i<n): maxv = max(maxv, list[i]-minv) minv = min(minv, list[i]) i = i + 1 print(maxv)
Traceback (most recent call last): File "/tmp/tmpy3rxb404/tmp6edxnpuu.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s993248993
p02258
u559106458
1528640224
Python
Python3
py
Runtime Error
0
0
308
n = input() n = int(n) list = [] i = 0 while(i<n): x = input() x = int(x) list[i] = x i = i + 1 maxv = -20000000 minv = list[0] i = 1 while(i<n): if(maxv >= list[i]-minv): maxv = maxv else: maxv = list[i]-minv if(minv <= list[i]): minv = minv else: minv = list[i] i = i + 1 print(maxv)
Traceback (most recent call last): File "/tmp/tmp0l0ez3qa/tmpmwvsohu9.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s214877831
p02258
u559106458
1528640799
Python
Python3
py
Runtime Error
0
0
309
n = input() n = int(n) list = [] i = 0 while(i<n): x = input() x = int(x) list[i] = x i = i + 1 maxv = -20000000 minv = list[0] i = 1 while(i<n): if(maxv >= list[i]-minv): maxv = maxv else: maxv = list[i]-minv if(minv <= list[i]): minv = minv else: minv = list[i] i = i + 1 print(maxv)
Traceback (most recent call last): File "/tmp/tmpgy4o4oo4/tmpxz3ugp6t.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s814228050
p02258
u148477094
1529072230
Python
Python3
py
Runtime Error
0
0
142
n=int(input()) tmp=0 s=int(input()) for int i in range(n-1): t=int(input()) if t<s && t-s<tmp: tmp=t-s s=t print(tmp)
File "/tmp/tmp7ldy6kib/tmp_gphvqrs.py", line 4 for int i in range(n-1): ^ SyntaxError: invalid syntax
s401835610
p02258
u148477094
1529072481
Python
Python3
py
Runtime Error
0
0
154
n=int(input()) tmp=0 s=int(input()) for int i in range(n-1): t=int(input()) if t>s && t-s>tmp: tmp=t-s if t<s: s=t print(tmp)
File "/tmp/tmpcg1ljdpy/tmpiwbv8brp.py", line 4 for int i in range(n-1): ^ SyntaxError: invalid syntax
s925866705
p02258
u148477094
1529072725
Python
Python3
py
Runtime Error
0
0
154
n=int(input()) tmp=0 s=int(input()) for int i in range(n-1): t=int(input()) if t>s && t-s>tmp: tmp=t-s if t<s: s=t print(tmp)
File "/tmp/tmp8kbnyaq8/tmp7xq8bfv_.py", line 4 for int i in range(n-1): ^ SyntaxError: invalid syntax
s903194636
p02258
u148477094
1529072740
Python
Python3
py
Runtime Error
0
0
154
n=int(input()) tmp=0 s=int(input()) for int i in range(n-1): t=int(input()) if t>s && t-s>tmp: tmp=t-s if t<s: s=t print(tmp)
File "/tmp/tmpah85nb32/tmp9eu7b3hc.py", line 4 for int i in range(n-1): ^ SyntaxError: invalid syntax
s349090810
p02258
u148477094
1529072960
Python
Python3
py
Runtime Error
0
0
154
n=int(input()) tmp=0 s=int(input()) for int i in range(n-1): t=int(input()) if t>s && t-s>tmp: tmp=t-s if t<s: s=t print(tmp)
File "/tmp/tmpiag2el0t/tmpyudeq7zc.py", line 4 for int i in range(n-1): ^ SyntaxError: invalid syntax
s442359426
p02258
u148477094
1529073033
Python
Python3
py
Runtime Error
0
0
156
n=int(input()) tmp=0 s=int(input()) for int i in range(n-1): t=int(input()) if t>s && t-s>tmp: tmp=t-s elif t<s: s=t print(tmp)
File "/tmp/tmpw9f2sdwr/tmpy693t05p.py", line 4 for int i in range(n-1): ^ SyntaxError: invalid syntax
s829838582
p02258
u148477094
1529073076
Python
Python3
py
Runtime Error
0
0
152
n=int(input()) tmp=0 s=int(input()) for int i in range(n-1): t=int(input()) if t>s && t-s>tmp: tmp=t-s else: s=t print(tmp)
File "/tmp/tmp9crk2pc0/tmpg3kev8cd.py", line 4 for int i in range(n-1): ^ SyntaxError: invalid syntax
s837539668
p02258
u148477094
1529073467
Python
Python3
py
Runtime Error
0
0
131
n=int(input()) tmp=0 s=int(input()) for int i in range(n-1): t=int(input()) if t>s && t-s>tmp: tmp=t-s else: s=t print(tmp)
File "/tmp/tmpvtv7886b/tmpr3sqxkgb.py", line 4 for int i in range(n-1): ^ SyntaxError: invalid syntax
s380475074
p02258
u148477094
1529073644
Python
Python3
py
Runtime Error
0
0
135
n=int(input()) tmp=0 s=int(input()) for int i in range(n-1): t=int(input()) if t>s && t-s>tmp: tmp=t-s elif t<s: s=t print(tmp)
File "/tmp/tmpqexbf2_0/tmpfyaoddwn.py", line 4 for int i in range(n-1): ^ SyntaxError: invalid syntax
s256462887
p02258
u148477094
1529073950
Python
Python3
py
Runtime Error
0
0
131
n=int(input()) tmp=0 s=int(input()) for i in range(n-1): t=int(input()) if t>s && t-s>tmp: tmp=t-s elif t<s: s=t print(tmp)
File "/tmp/tmpyr7m63h3/tmppxuhhn_b.py", line 6 if t>s && t-s>tmp: ^ SyntaxError: invalid syntax
s533069541
p02258
u269568674
1529383741
Python
Python3
py
Runtime Error
0
0
196
N = input() N = int(N) l = [input() for i in range(N)] ma = -100 for i in range(0,len(l)-1): for j in range(i+1,len(l)): if(l[j] - l[i] > ma): ma = l[j] - l[i] print(ma)
Traceback (most recent call last): File "/tmp/tmp6dlgkib0/tmpx2yt_zff.py", line 1, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s304350709
p02258
u269568674
1529384574
Python
Python3
py
Runtime Error
0
0
226
N = input() N = int(N) l = [int(input()) for i in range(N)] flg = 1 for i in range(0,len(l)-1): for j in range(i+1,len(l)): if(ma < l[j]-l[i] or flg ==1): ma = l[j] - l[i] flg = 0 print(ma)
Traceback (most recent call last): File "/tmp/tmp_rb9tskz/tmpwgglyziz.py", line 1, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s796945514
p02258
u316584871
1530152192
Python
Python3
py
Runtime Error
0
0
202
n = int(input()) rlist = [] for i in range(n): r = int(input()) rlist.append(r) mlist = [] for i in range(n): m = rlist[i] - min(rlist[:i]) mlist.append(m) mlist.sort() print(mlist[-1])
Traceback (most recent call last): File "/tmp/tmpqaep16mv/tmpyayj0u8a.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s819112836
p02258
u646764397
1530287647
Python
Python3
py
Runtime Error
0
0
195
import sys a = [] for line in sys.stdin: a.append(int(line)) del a[0] del a[len(a)-1] b = [] for line in sys.stdin: b.append(int(line)) del b[0] del b[0] print(max(b)-min(a))
Traceback (most recent call last): File "/tmp/tmp9fh3kee7/tmpddzhw7ih.py", line 7, in <module> del a[0] ~^^^ IndexError: list assignment index out of range
s578156148
p02258
u646764397
1530288054
Python
Python3
py
Runtime Error
0
0
195
import sys a = [] for line in sys.stdin: a.append(int(line)) del a[0] del a[len(a)-1] b = [] for line in sys.stdin: b.append(int(line)) del b[0] del b[0] print(max(b)-min(a))
Traceback (most recent call last): File "/tmp/tmppir1os5i/tmpgrwquo2g.py", line 7, in <module> del a[0] ~^^^ IndexError: list assignment index out of range
s136677359
p02258
u646764397
1530288087
Python
Python3
py
Runtime Error
0
0
196
import sys a = [] for line in sys.stdin: a.append(int(line)) del a[0] del a[len(a)-1] b = [] for line in sys.stdin: b.append(int(line)) del b[0] del b[0] print(max(b)-min(a))
Traceback (most recent call last): File "/tmp/tmpxslh04js/tmpptxfpl45.py", line 7, in <module> del a[0] ~^^^ IndexError: list assignment index out of range
s215260327
p02258
u646764397
1530290393
Python
Python3
py
Runtime Error
0
0
306
import sys a = [] b = [] for line in sys.stdin: a.append(int(line)) b.append(int(line)) del a[0] del a[len(a)-1] del b[0] del b[0] sub - -100000000 for i in range(len(a)): for j in range(len(b)): if j >= i: if sub <= b[j]-a[i]: sub = b[j]-a[i] print(sub)
Traceback (most recent call last): File "/tmp/tmpxc5dlwu7/tmp3p1y4a7u.py", line 9, in <module> del a[0] ~^^^ IndexError: list assignment index out of range
s158290081
p02258
u646764397
1530292765
Python
Python3
py
Runtime Error
0
0
266
import sys a = [] b = [] for line in sys.stdin: a.append(int(line)) b.append(int(line)) del a[0] del a[len(a)-1] del b[0] del b[0] maxv = -100000000 minv = a[0] for i in range(len(a)): maxv = max(sub,b[i]-minv) minv = min(minv,b[i]) print(sub)
Traceback (most recent call last): File "/tmp/tmph6512c1g/tmpp1rt7l5j.py", line 9, in <module> del a[0] ~^^^ IndexError: list assignment index out of range
s671308577
p02258
u140201022
1399042612
Python
Python
py
Runtime Error
10
4208
126
n=input() l=[input() for _ in range(n)] mi=l.index(min(l)) ma=l.index(max(l)) print max(max(l)-min(l[:ma]),max(l[mi:])-min(l))
File "/tmp/tmpc749uxlh/tmp92iwz9ys.py", line 5 print max(max(l)-min(l[:ma]),max(l[mi:])-min(l)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s064752798
p02258
u436634575
1400790869
Python
Python3
py
Runtime Error
40
6724
128
a = [] n = int(input()) for i in range(n): a.append(int(input())) print(max(max(a[i:])-min(a[:i]) for i in range(1, n - 1)))
Traceback (most recent call last): File "/tmp/tmpleoqnn3f/tmpa7pthr2l.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s369694243
p02259
u635209856
1540989601
Python
Python3
py
Runtime Error
0
0
421
from enum import Enum import sys import math BIG_NUM = 2000000000 MOD = 1000000007 EPS = 0.000000001 N=int(input()) table=list(map(int,input().split())) swap_count=0 for i in range(0,len(table-1)): for k in range(len(table)-1,i-1): if table[k-1]>table[k]: table[k-1],table[k]=table[k],table[k-1] swap_count+=1 print(' '.join(map(str,table))) print("%d"%(swap_count))
Traceback (most recent call last): File "/tmp/tmpertpyk1_/tmp2mg3ubgd.py", line 9, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s485162121
p02259
u065504661
1545549351
Python
Python3
py
Runtime Error
0
0
396
if __name__ == '__main__' N = input() N = int(N) array = list(map(int, input().split())) cnt = 0 for i in range(N): # print(' '.join(map(str, array))) for j in range(N-1, i, -1): if array[j] < array[j-1]: array[j], array[j-1] = array[j-1], array[j] cnt += 1 print(' '.join(map(str, array))) print("%d" % (cnt))
File "/tmp/tmpkuosk07t/tmpi5yuk25k.py", line 1 if __name__ == '__main__' ^ SyntaxError: expected ':'
s888312309
p02259
u135880652
1559364192
Python
Python3
py
Runtime Error
0
0
297
N = int(input()) A = list(map(int, input().split())) count = 0 flag = True while flag: flag = False for j in range(N-1, 0, -1): if A[j] < A[j-1]: A[j-1], A[j] = A[j], A[j-1] flag = True count += 1 print(' '.join(map(str,A))) print(count)
File "/tmp/tmpcckawxmp/tmpxh1xzn9g.py", line 1 N = int(input()) IndentationError: unexpected indent
s295737193
p02259
u535719732
1559403749
Python
Python3
py
Runtime Error
0
0
236
n = int(input()) a = map(int,input().split()) c = 0 while flag: flag = False for j in range(n-1,1,-1): if(a[j] < a[j-1]): a[j],a[j-1] = a[j-1],a[j] flag = 1 c += 1 print(*a) print(c)
Traceback (most recent call last): File "/tmp/tmps_ci2j0u/tmp_7e03tan.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s127089862
p02259
u535719732
1559403785
Python
Python3
py
Runtime Error
20
5596
247
n = int(input()) a = map(int,input().split()) flag = True c = 0 while flag: flag = False for j in range(n-1,1,-1): if(a[j] < a[j-1]): a[j],a[j-1] = a[j-1],a[j] flag = 1 c += 1 print(*a) print(c)
Traceback (most recent call last): File "/tmp/tmp1yes_w0m/tmp1nz7xbvv.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s556622874
p02259
u379499530
1415153075
Python
Python
py
Runtime Error
0
0
211
c = 0 n = input() a = map(int, input_raw().split()) for i in range(n): for j in range(n -1, i + 1, -1): if a[j] < a[j - 1]: a[j], a[j - 1] = a[j], a[j - 1] c += 1 print(" ".join(map(str, a))) print(c)
Traceback (most recent call last): File "/tmp/tmphlpu0v7_/tmp0n03b6ew.py", line 2, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s932800323
p02259
u379499530
1415153131
Python
Python
py
Runtime Error
0
0
241
def main(): c = 0 n = input() a = map(int, input_raw().split()) for i in range(n): for j in range(n -1, i + 1, -1): if a[j] < a[j - 1]: a[j], a[j - 1] = a[j], a[j - 1] c += 1 print(" ".join(map(str, a))) print(c) main()
Traceback (most recent call last): File "/tmp/tmpkxd0o6qw/tmpuko4iffc.py", line 15, in <module> main() File "/tmp/tmpkxd0o6qw/tmpuko4iffc.py", line 3, in main n = input() ^^^^^^^ EOFError: EOF when reading a line
s887644511
p02259
u128811851
1430487953
Python
Python3
py
Runtime Error
30
6724
461
def bubble_sort(A): cnt = 0 for i in range(len(A) - 1): for j in reversed(range(i+1, len(A))): if A[j] < A[j - 1]: cnt += 1 tmp = A[j] A[j] = A[j - 1] A[j - 1] = tmp return cnt cnt = 0 amount = int(input()) nl = list(int(input()) for i in range(amount)) cnt = bubble_sort(nl) for i in range(amount - 1): print(nl[i], end=" ") print(nl[amount - 1]) print(cnt)
Traceback (most recent call last): File "/tmp/tmpy7buox68/tmpa9e7aay9.py", line 13, in <module> amount = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s152338086
p02259
u571345655
1436060041
Python
Python
py
Runtime Error
0
0
372
def bubbleSort(list_, n): list_ = list_[:] count = 0 for i in xrange(n): for j in xrange(n-1, i, -1): if list_[j] < list_[j - 1]: list_[j], list_[j - 1] = list_[j - 1], list_[j] count += 1 return list_ n = input() nums = raw_input().split() sorted_, count = bubbleSort(nums, n) print sorted print count
File "/tmp/tmphdub1pik/tmpyjseo8sa.py", line 15 print sorted ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s395924007
p02259
u571345655
1436060081
Python
Python
py
Runtime Error
0
0
382
def bubbleSort(list_, n): list_ = list_[:] count = 0 for i in xrange(n): for j in xrange(n-1, i, -1): if list_[j] < list_[j - 1]: list_[j], list_[j - 1] = list_[j - 1], list_[j] count += 1 return list_ n = input() nums = map(int, raw_input().split()) sorted_, count = bubbleSort(nums, n) print sorted print count
File "/tmp/tmpwacrb3kl/tmp6_a2n0kz.py", line 15 print sorted ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s035078908
p02259
u197445199
1442211050
Python
Python
py
Runtime Error
0
0
365
num = int(raw_input()) line = raw_input() A_str = line.strip().split(" ") print " ".join(A_str) A = map(int, item_str) for i in range(1, num): v = A[i] j = i - 1 for j in range(j, -1, -1): if A[j] > v: A[j+1] = A[j] j -= 1 else: break A[j+1] = v A_str = map(str, A) print " ".join(A_str)
File "/tmp/tmpwan8vgo7/tmp0taz448f.py", line 5 print " ".join(A_str) ^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s850791263
p02259
u253463900
1442284552
Python
Python3
py
Runtime Error
0
0
363
n = int(input()) s = input() A = list(map(int,s.split())) flag = 1 cnt = 0 while(flag == 1): flag = 0 for j in range(n-1,0,-1): if A[j] < A[j-1]: tmp = A[j] A[j] = A[j-1] A[j-1] = tmp flag = 1 cnt += 1 for k in range(0,len(A)-1): print(A[k],end=" ") print(A[len(A)-1]) print (cnt))
File "/tmp/tmp_6o6biz_/tmpcvip2vvx.py", line 20 print (cnt)) ^ SyntaxError: unmatched ')'
s487748705
p02259
u313994256
1442285062
Python
Python
py
Runtime Error
10
6232
348
N = int(raw_input()) num_list = map(int, raw_input().split()) c = 0 flag = 1 while flag: flag =0 for j in range(N-1,0,-1): if num_list[j] < num_list[j-1]: a = num_list[j] num_list[j] = numlist[j-1] num_list[j-1] = a c += 1 flag =1 print " ".join(map(str,num_list)) print c
File "/tmp/tmp60de2odj/tmpnu5w7491.py", line 14 print " ".join(map(str,num_list)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s685082801
p02259
u313994256
1442285087
Python
Python
py
Runtime Error
10
6300
350
N = int(raw_input()) num_list = map(int, raw_input().split()) c = 0 flag = 1 while flag: flag =0 for j in range(N-1,0,-1): if num_list[j] < num_list[j-1]: a = num_list[j] num_list[j] = numlist[j-1] num_list[j-1] = a c += 1 flag =1 print " ".join(map(str,num_list)) print c
File "/tmp/tmpuul2tg7k/tmpst62gj5g.py", line 16 print " ".join(map(str,num_list)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s959242448
p02259
u313994256
1442285236
Python
Python
py
Runtime Error
10
6300
352
N = int(raw_input()) num_list = map(int, raw_input().split()) c = 0 flag = 1 while flag==1: flag =0 for j in range(N-1,0,-1): if num_list[j] < num_list[j-1]: a = num_list[j] num_list[j] = numlist[j-1] num_list[j-1] = a c += 1 flag =1 print " ".join(map(str,num_list)) print c
File "/tmp/tmp6b_y_qh9/tmpbdxg3svj.py", line 15 print " ".join(map(str,num_list)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s557652394
p02259
u313994256
1442285486
Python
Python
py
Runtime Error
10
6300
353
N = int(raw_input()) num_list = map(int, raw_input().split()) c = 0 flag = 1 while flag==1: flag =0 for j in range(N-1,0,-1): if num_list[j] < num_list[j-1]: a = num_list[j] num_list[j] = numlist[j-1] num_list[j-1] = a c += 1 flag =1 print " ".join(map(str,num_list)) print c
File "/tmp/tmpu6t11nld/tmpal4uvzan.py", line 16 print " ".join(map(str,num_list)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s018791415
p02259
u963402991
1447833582
Python
Python3
py
Runtime Error
30
7600
363
def BubbleSort(A,n): count = 0 for i in range(n): for j in range(n-1,i,-1): if A[j] < A[j-1]: A[j], A[j-1] = A[j-1], A[j] count += 1 return A, count n = int(input()) A = [int(input()) for i in range(n)] ans, count = (BubbleSort(A,n)) ans = list(map(str,ans)) print (" ".join(ans)) print (count)
Traceback (most recent call last): File "/tmp/tmppzqm0371/tmpedsw5fdt.py", line 10, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s868964097
p02259
u963402991
1447833791
Python
Python3
py
Runtime Error
20
7572
362
n = int(input()) A = [int(input()) for i in range(n)] def BubbleSort(A,n): count = 0 for i in range(n): for j in range(n-1,i,-1): if A[j] < A[j-1]: A[j], A[j-1] = A[j-1], A[j] count += 1 return A, count ans, count = (BubbleSort(A,n)) ans = list(map(str,ans)) print (" ".join(ans)) print (count)
Traceback (most recent call last): File "/tmp/tmpecvpjsi0/tmpxm_u841h.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s312194877
p02259
u963402991
1447834134
Python
Python3
py
Runtime Error
20
7668
415
def BubbleSort1(A,n): flag = 1 count = 0 while flag: flag = 0 for j in range(n-1, 0, -1): if A[j] < A[j-1]: A[j], A[j-1] = A[j-1], A[j] flag = 1 count += 1 return A, count n = int(input()) A = [int(input()) for i in range(n)] ans, count = (BubbleSort1(A,n)) ans = list(map(str,ans)) print (" ".join(ans)) print (count)
Traceback (most recent call last): File "/tmp/tmph3uqrxw7/tmpf2s7xp23.py", line 13, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s456384702
p02259
u963402991
1447834701
Python
Python3
py
Runtime Error
0
0
380
def BubbleSort1(A,n): flag = 0 count = 0 while flag: for j in range(n-1, 0, -1): if A[j] < A[j-1]: A[j], A[j-1] = A[j-1], A[j] flag = 1 count += 1 n = int(input()) s = input() A = list(map(int,s.split())) ans, count = (BubbleSort(A,n)) ans = list(map(str,ans)) print (" ".join(ans)) print (count)
Traceback (most recent call last): File "/tmp/tmpoehxj1d6/tmp07350rpg.py", line 11, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s503110348
p02259
u963402991
1447834818
Python
Python3
py
Runtime Error
0
0
377
def BubbleSort1(A,n): flag = 0 count = 0 while flag: for j in range(n-1, -1, -1): if A[j] < A[j-1]: A[j], A[j-1] = A[j-1], A[j] flag = 1 count += 1 n = int(input()) A = [int(input()) for i in range(n)] ans, count = (BubbleSort(A,n)) ans = list(map(str,ans)) print (" ".join(ans)) print (count)
Traceback (most recent call last): File "/tmp/tmp9jlerc5o/tmpj9odbdt1.py", line 11, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s506270602
p02259
u963402991
1447978701
Python
Python3
py
Runtime Error
20
7764
399
def BubbleSort(A,n): count = 0 for i in range(n): for j in range(n-1,i,-1): if A[j] < A[j-1]: A[j], A[j-1] = A[j-1], A[j] print (A[j], A[j-1]) count += 1 return A, count n = int(input()) A = [int(input()) for i in range(n)] ans, count = (BubbleSort(A,n)) ans = list(map(str,ans)) print (" ".join(ans)) print (count)
Traceback (most recent call last): File "/tmp/tmpvccdfvk4/tmpsko79dj3.py", line 11, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s475384606
p02259
u963402991
1447978816
Python
Python3
py
Runtime Error
20
7704
417
def BubbleSort(A,n): count = 0 for i in range(n): for j in range(n-1,i,-1): if A[j] < A[j-1]: A[j], A[j-1] = A[j-1], A[j] print (A[j], A[j-1]) count += 1 return A, count n = int(input()) A = [int(input()) for i in range(n)] count = 0 ans = 0 ans, count = (BubbleSort(A,n)) ans = list(map(str,ans)) print (" ".join(ans)) print (count)
Traceback (most recent call last): File "/tmp/tmp6sulka_0/tmp4tn1xzib.py", line 12, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s593556115
p02259
u963402991
1447979497
Python
Python3
py
Runtime Error
20
7680
425
def BubbleSort(A,n): count = 0 for i in range(n): for j in range(n-1,i,-1): if A[j] < A[j-1]: A[j], A[j-1] = A[j-1], A[j] print (A[j], A[j-1]) count += 1 return A, count n = int(input()) A = [int(input().strip()) for i in range(n)] count = 0 ans = 0 ans, count = (BubbleSort(A,n)) ans = list(map(str,ans)) print (" ".join(ans)) print (count)
Traceback (most recent call last): File "/tmp/tmpjz3zan4g/tmpt17ikv5v.py", line 12, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s884136554
p02259
u963402991
1447979577
Python
Python3
py
Runtime Error
20
7672
429
def BubbleSort(A,n): count = 0 for i in range(n): for j in range(n-1,i,-1): if A[j] < A[j-1]: A[j], A[j-1] = A[j-1], A[j] print (A[j], A[j-1]) count += 1 return A, count n = int(input()) A = [int(input().rstrip(" ")) for i in range(n)] count = 0 ans = 0 ans, count = (BubbleSort(A,n)) ans = list(map(str,ans)) print (" ".join(ans)) print (count)
Traceback (most recent call last): File "/tmp/tmpac5_6lrm/tmp47529juw.py", line 12, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s603331463
p02259
u811773570
1465947755
Python
Python3
py
Runtime Error
0
0
369
count = 0 a = int(input()) a, b, c, d, e = map(int, input(). split()) list1 = [a ,b, c, d, e] for i in range(len(list1)): for n in range(len(list1) - i - 1): if(list1[n] > list1[n + 1]): tmp = list1[n] list1[n] = list1[n + 1] list1[n + 1] = tmp count += 1 for i in range(len(list1)): print(list1[i], end = " ") print("\n%d" % (count))
Traceback (most recent call last): File "/tmp/tmpajdg204q/tmp1hg0kxif.py", line 3, in <module> a = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s275446319
p02259
u611490888
1468179026
Python
Python
py
Runtime Error
0
0
516
# -*- coding: utf-8 -*- def bubble_sort(a, N): change = 0 for i in xrange(N - 1): for j in xrange(N - 1, i, -1): if a[j - 1] < a[j]: temp = a[j - 1] a[j - 1] = a[j] a[j] = temp change += 1 return (a, change) if __name__ == "__main__": N = input() a = map(int, raw_input().split()) # a = [5, 2, 4, 6, 1, 3] result, change = bubble_sort(a, N) print print ','.join(map(str, result)) print change
File "/tmp/tmp948focvw/tmpnoru80a_.py", line 21 print print ','.join(map(str, result)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s374434515
p02259
u831244171
1477828400
Python
Python3
py
Runtime Error
0
0
258
n = int(input()) A = list(map(int,input().split())) f = 1 c = 0 while f == 1: f = 0 for j in range(n-1,0,-1): if A[j] < A[j-1]: inc = A[j] A[j] = A[j-1] A[j-1] = inc f = 1 c += 1 print(" ".join(map(str,A))) print(c)
File "/tmp/tmpia7c_0w2/tmp2vp74d26.py", line 8 if A[j] < A[j-1]: TabError: inconsistent use of tabs and spaces in indentation
s672332013
p02259
u831244171
1477828435
Python
Python3
py
Runtime Error
0
0
273
n = int(input()) A = list(map(int,input().split())) f = 1 c = 0 while f == 1: f = 0 for j in range(n-1,0,-1): if A[j] < A[j-1]: inc = A[j] A[j] = A[j-1] A[j-1] = inc f = 1 c += 1 print(" ".join(map(str,A))) print(c)
File "/tmp/tmpnu0em_u6/tmpwk5s4ja5.py", line 9 inc = A[j] ^ IndentationError: expected an indented block after 'if' statement on line 8
s530849500
p02259
u022407960
1477847788
Python
Python3
py
Runtime Error
0
0
876
#!/usr/bin/env python # encoding: utf-8 class Solution: """ @param prices: Given an integer array @return: Maximum profit """ @staticmethod def swap(a, b): a, b = b, a return a, b @staticmethod def bubble_sort(self): # write your code here array_length = int(input()) unsorted_array = [int(x) for x in input().split()] flag = 1 count = 0 while flag: flag = 0 for j in range(array_length - 1, 0, -1): if unsorted_array[j] < unsorted_array[j - 1]: self.swap(unsorted_array[j], unsorted_array[j - 1]) flag = 1 count += 1 print(" ".join(map(str, unsorted_array))) print(str(count)) if __name__ == '__main__': solution = Solution() solution.bubble_sort()
Traceback (most recent call last): File "/tmp/tmp0fczt50h/tmpze_f0ou2.py", line 37, in <module> solution.bubble_sort() TypeError: Solution.bubble_sort() missing 1 required positional argument: 'self'
s516138355
p02259
u611490888
1480592067
Python
Python3
py
Runtime Error
0
0
667
#! /usr/bin/env python #-*- coding: utf-8 -*- ''' ?????????????????? ''' # ?¨???????O(n^2) def bubble_sort(A, N): swap_num = 0 # ?????????????????° for i in range(N - 1): for j in range(N - 1, i, -1): if A[j] < A[j - 1]: # swap temp = A[j] A[j] = A[j - 1] A[j - 1] = temp swap_num += 1 return (A, swap_num) if __name__ == "__main__": N = input() A = map(int, raw_input().split()) # A = [5, 2, 4, 6, 1, 3] # N = len(A) array_sorted, swap_num = bubble_sort(A, N) print(' '.join(map(str, array_sorted))) print(swap_num)
Traceback (most recent call last): File "/tmp/tmpu_nc_49i/tmpno4zx9le.py", line 25, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s994705513
p02259
u611490888
1480592121
Python
Python3
py
Runtime Error
0
0
667
#! /usr/bin/env python #-*- coding: utf-8 -*- ''' ?????????????????? ''' # ?¨???????O(n^2) def bubble_sort(A, N): swap_num = 0 # ?????????????????° for i in range(N - 1): for j in range(N - 1, i, -1): if A[j] < A[j - 1]: # swap temp = A[j] A[j] = A[j - 1] A[j - 1] = temp swap_num += 1 return (A, swap_num) if __name__ == "__main__": N = input() A = map(int, raw_input().split()) # A = [5, 2, 4, 6, 1, 3] # N = len(A) array_sorted, swap_num = bubble_sort(A, N) print(' '.join(map(str, array_sorted))) print(swap_num)
Traceback (most recent call last): File "/tmp/tmpqqt4vyb8/tmpyekbzu69.py", line 25, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s156660470
p02259
u611490888
1480592227
Python
Python3
py
Runtime Error
0
0
660
#! /usr/bin/env python #-*- coding: utf-8 -*- ''' bubble sort ''' # O(n^2) def bubble_sort(A, N): swap_num = 0 # the number of swap operations for i in range(N - 1): for j in range(N - 1, i, -1): if A[j] < A[j - 1]: # swap temp = A[j] A[j] = A[j - 1] A[j - 1] = temp swap_num += 1 return (A, swap_num) if __name__ == "__main__": N = input() A = map(int, raw_input().split()) # A = [5, 2, 4, 6, 1, 3] # N = len(A) array_sorted, swap_num = bubble_sort(A, N) print(' '.join(map(str, array_sorted))) print(swap_num)
Traceback (most recent call last): File "/tmp/tmpn0x2dr5x/tmpzfio_85t.py", line 25, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s052288086
p02259
u611490888
1480592528
Python
Python3
py
Runtime Error
0
0
659
#! /usr/bin/env python #-*- coding: utf-8 -*- ''' ?????????????????? ''' # O(n^2) def bubble_sort(A, N): swap_num = 0 # ?????????????????° for i in range(N - 1): for j in range(N - 1, i, -1): if A[j] < A[j - 1]: # swap temp = A[j] A[j] = A[j - 1] A[j - 1] = temp swap_num += 1 return (A, swap_num) if __name__ == "__main__": N = input() A = list(map(int, input().split())) # A = [5, 2, 4, 6, 1, 3] # N = len(A) array_sorted, swap_num = bubble_sort(A, N) print(' '.join(map(str, array_sorted))) print(swap_num)
Traceback (most recent call last): File "/tmp/tmp_dcaogic/tmp41m8m8pq.py", line 25, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s784822246
p02259
u852745524
1483953269
Python
Python3
py
Runtime Error
0
0
343
# coding:utf-8 def bubble_sort(list): n = len(list)-1 ; count=0 for i in range(0,n): for j in range(n, i, -1): if list[j-1]>list[j]: temp=list[j] ; list[j]=list[j-1] ; list[j-1]=temp ; count+=1 print(list) ; print(count) num = int(input()) list = list(map(int,input().split())) bubble_sort(list)
File "/tmp/tmpcsdmz_an/tmpb0ikj4wr.py", line 9 print(list) ; print(count) IndentationError: unexpected indent
s417186480
p02259
u852745524
1483953852
Python
Python3
py
Runtime Error
0
0
341
# coding:utf-8 def bubble_sort(list): n = len(list)-1 ; count=0 for i in range(0,n): for j in range(n, i, -1): if list[j-1]>list[j]: temp=list[j] ; list[j]=list[j-1] ; list[j-1]=temp ; count+=1 print(" ".join(list)) ; print(count) num = int(input()) list = list(map(int,input().split())) bubble_sort(list)
Traceback (most recent call last): File "/tmp/tmpg3l7q66t/tmpmnq1h845.py", line 12, in <module> num = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s311115511
p02259
u895660619
1487470324
Python
Python3
py
Runtime Error
20
7656
320
N = int(input()) A = (int(n) for n in input().split()) flag = 1 num_c = 0 while(flag): flag = 0 for j in range(1, N): if A[j] < A[j-1]: v = A[j] A[j] = A[j-1] A[j-1] = v num_c += 1 flag = 1 print((" ").join((str(a) for a in A))) print(num_c)
Traceback (most recent call last): File "/tmp/tmppy59njam/tmphh1w5fxk.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s047813543
p02259
u004192101
1489072400
Python
Python3
py
Runtime Error
0
0
496
n = input() A = [int(i) for i in input().split(' ')] def trace(A): for index, v in enumerate(A): print(v, end='') if index != len(A) - 1: print(' ', end='') print() def bubble_sort(A, n): i = n - 1 counter = 0 while i >= 0: j = i - 1 while j >= 0: if A[i] < A[j]: A[i], A[j] = A[j], A[i] counter += 1 j -= 1 i -= 1 trace(A) print(counter) bubble_sort(A, 20)
Traceback (most recent call last): File "/tmp/tmp651420kr/tmp5mst_72n.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s013393459
p02259
u004192101
1489072538
Python
Python3
py
Runtime Error
0
0
495
n = input() A = [int(i) for i in input().split(' ')] def trace(A): for index, v in enumerate(A): print(v, end='') if index != len(A) - 1: print(' ', end='') print() def bubble_sort(A, n): i = n - 1 counter = 0 while i >= 0: j = i - 1 while j >= 0: if A[i] < A[j]: A[i], A[j] = A[j], A[i] counter += 1 j -= 1 i -= 1 trace(A) print(counter) bubble_sort(A, n)
Traceback (most recent call last): File "/tmp/tmpbvs2z05m/tmponlcnkd2.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s709669768
p02259
u004192101
1489072551
Python
Python3
py
Runtime Error
0
0
495
n = input() A = [int(i) for i in input().split(' ')] def trace(A): for index, v in enumerate(A): print(v, end='') if index != len(A) - 1: print(' ', end='') print() def bubble_sort(A, n): i = n - 1 counter = 0 while i >= 1: j = i - 1 while j >= 0: if A[i] < A[j]: A[i], A[j] = A[j], A[i] counter += 1 j -= 1 i -= 1 trace(A) print(counter) bubble_sort(A, n)
Traceback (most recent call last): File "/tmp/tmpouz18con/tmpfi05gm2j.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s446909880
p02259
u000317780
1493559769
Python
Python3
py
Runtime Error
0
0
416
# coding: utf-8 def bubblesort(ls): count = 0 for i in range(1, len(ls)): for j in reversed(range(i, len(ls))): if ls[j] < ls[j-1]: ls[j], ls[j-1] = ls[j-1], ls[j] count += 1 return count def main(): trash = input() ls = list(map(int, input)) i = bubblesort(ls) print(ls) print(i) if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmpeoy1ii63/tmpl450s5li.py", line 23, in <module> main() File "/tmp/tmpeoy1ii63/tmpl450s5li.py", line 14, in main trash = input() ^^^^^^^ EOFError: EOF when reading a line
s113304965
p02259
u924810243
1494218669
Python
Python
py
Runtime Error
0
0
327
#inclide<stdio.h> int main(void) { int i, j, temp; scanf("5d) for (i = 0; i < (array_size - 1); i++) { for (j = (array_size - 1); j > i; j--) { if (numbers[j-1] > numbers[j]) { temp = numbers[j-1]; numbers[j-1] = numbers[j]; numbers[j] = temp; printf("%d" ,temp); } } } return 0; }
File "/tmp/tmpschsa87x/tmp92ewfonr.py", line 5 scanf("5d) ^ SyntaxError: unterminated string literal (detected at line 5)
s052836315
p02259
u213265973
1494498005
Python
Python3
py
Runtime Error
0
0
397
A = int(input()) N = list(map(int,input().split(" "))) def bubble(A, N): count = 0 flag = True while flag == True: for j in range(N-1, 0, -1): flag = False if A[j] < A[j - 1]: A[j -1],A[j] = A[j], A[j - 1] count += 1 flag = True print(" ".join(map(str, A))) print(count) bubble(A, N)
Traceback (most recent call last): File "/tmp/tmpircxu7a7/tmpabgochj4.py", line 1, in <module> A = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s365550002
p02259
u213265973
1494498315
Python
Python3
py
Runtime Error
0
0
404
N = int(input()) A = [int(i) for i in input().split(" ")] def bubble(A, N): count = 0 flag = True while flag == True: flag = False for j in range(N-1, 0, -1): if A[j] < A[j - 1]: A[j -1],A[j] = A[j], A[j - 1] count += 1 flag = True print(" ".join(map(str, A))) print(count) print(bubble(A,N))
File "/tmp/tmppocceawk/tmp4mcx_7fd.py", line 1 N = int(input()) IndentationError: unexpected indent
s651888808
p02259
u213265973
1494498423
Python
Python3
py
Runtime Error
0
0
406
N = int(input()) A = [int(i) for i in input().split(" ")] def bubble(A, N): count = 0 flag = True while flag == True: flag = False for j in range(N-1, 0, -1): if A[j] < A[j - 1]: A[j -1],A[j] = A[j], A[j - 1] count += 1 flag = True print(" ".join(map(str, A))) print(count) print(bubble(A, N))
File "/tmp/tmpc3nya75q/tmpqp19yp8i.py", line 1 N = int(input()) IndentationError: unexpected indent
s712549510
p02259
u213265973
1494498497
Python
Python3
py
Runtime Error
0
0
414
N = int(input()) A = [int(i) for i in input().split(" ")] def bubble(A, N): count = 0 flag = True while flag == True: flag = False for j in range(N-1, 0, -1): if A[j] < A[j - 1]: A[j -1],A[j] = A[j], A[j - 1] count += 1 flag = True print(" ".join(map(str, A))) print(count) print(bubble(A, N))
File "/tmp/tmpz9of3u47/tmpix3lpyfm.py", line 1 N = int(input()) IndentationError: unexpected indent
s562302254
p02259
u213265973
1494498540
Python
Python3
py
Runtime Error
0
0
399
N = int(input()) A = [int(i) for i in input().split(" ")] def bubble(A, N): count = 0 flag = True while flag == True: flag = False for j in range(N-1, 0, -1): if A[j] < A[j - 1]: A[j -1],A[j] = A[j], A[j - 1] count += 1 flag = True print(" ".join(map(str, A))) print(count) bubble(A, N)
File "/tmp/tmp56baqpvz/tmpv5ttcwap.py", line 1 N = int(input()) IndentationError: unexpected indent
s713901874
p02259
u213265973
1494498545
Python
Python3
py
Runtime Error
0
0
399
N = int(input()) A = [int(i) for i in input().split(" ")] def bubble(A, N): count = 0 flag = True while flag == True: flag = False for j in range(N-1, 0, -1): if A[j] < A[j - 1]: A[j -1],A[j] = A[j], A[j - 1] count += 1 flag = True print(" ".join(map(str, A))) print(count) bubble(A, N)
File "/tmp/tmpi_4_dhhl/tmpzcmzj41i.py", line 1 N = int(input()) IndentationError: unexpected indent
s253873819
p02259
u352522848
1494732710
Python
Python
py
Runtime Error
0
0
244
_n = raw_input() _a = [int(x) in x for raw_input.split()] _flg = 1 while _flg: _flg = 0 for i in reversed(range(1, _n)): if _a[i] < _a[i-1]: _a[i], _a[i-1] = _a[i-1], _a[i] _flg = 1 print(" ".join(_a))
File "/tmp/tmpd4lddojm/tmpcxfr3br5.py", line 2 _a = [int(x) in x for raw_input.split()] ^^^^^^^^^^^^^^^^^ SyntaxError: cannot assign to function call
s405368105
p02259
u352522848
1494732784
Python
Python
py
Runtime Error
0
0
289
_n = int(raw_input()) _a = [int(x) in x for raw_input.split()] _flg = 1 cnt = 0 while _flg: _flg = 0 for i in reversed(range(1, _n)): if _a[i] < _a[i-1]: _a[i], _a[i-1] = _a[i-1], _a[i] cnt += 1 _flg = 1 print(" ".join(_a)) print(cnt)
File "/tmp/tmp_102mra8/tmpa6m1nwq3.py", line 2 _a = [int(x) in x for raw_input.split()] ^^^^^^^^^^^^^^^^^ SyntaxError: cannot assign to function call
s915313142
p02259
u352522848
1494732799
Python
Python
py
Runtime Error
0
0
291
_n = int(raw_input()) _a = [int(x) in x for raw_input().split()] _flg = 1 cnt = 0 while _flg: _flg = 0 for i in reversed(range(1, _n)): if _a[i] < _a[i-1]: _a[i], _a[i-1] = _a[i-1], _a[i] cnt += 1 _flg = 1 print(" ".join(_a)) print(cnt)
File "/tmp/tmplxvtosmy/tmppilbyr9d.py", line 2 _a = [int(x) in x for raw_input().split()] ^^^^^^^^^^^^^^^^^^^ SyntaxError: cannot assign to function call
s396415570
p02259
u650790815
1495690909
Python
Python3
py
Runtime Error
30
7656
251
n = int(input()) lst = list(map(int,input().split())) cnt = 0 for i in range(n): for j in range(n-1,i,-1): if lst[j] < lst[j-1]: count += 1 lst[j],lst[j-1] = lst[j-1],lst[j] print(' '.join(map(str,lst))) print(cnt)
Traceback (most recent call last): File "/tmp/tmpy3w12xgo/tmpiutpm8be.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s657971692
p02259
u650790815
1495703992
Python
Python3
py
Runtime Error
0
0
236
n = int(input()) a = list(map(int,input().split()) count =0 for i in range(n): for j in range(n-1,i,-1): if a[j] < a[j-1]: a[j],a[j-1] = a[j-1],a[j] count += 1 print(' '.join(map(str,a))) print(count)
File "/tmp/tmpc2rklfqs/tmpf7qs2766.py", line 2 a = list(map(int,input().split()) ^ SyntaxError: '(' was never closed
s065424714
p02259
u625806423
1495869738
Python
Python3
py
Runtime Error
20
7628
260
n = int(input()) a = [input() for i in range(n)] a_swap = 0 flag = 1 while flag: flag = 0 for j in range(n-1,0,-1): if int(a[j]) < int(a[j-1]): a[j],a[j-1] = a[j-1],a[j] flag = 1 a_swap += 1 print(" ".join(a)) print(a_swap)
Traceback (most recent call last): File "/tmp/tmp4zyfmt2c/tmpoy_9ov9p.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s813205778
p02259
u625806423
1495869803
Python
Python3
py
Runtime Error
30
7620
260
n = int(input()) a = [input() for i in range(n)] a_swap = 0 flag = 1 while flag: flag = 0 for j in range(n-1,0,-1): if int(a[j]) < int(a[j-1]): a[j],a[j-1] = a[j-1],a[j] flag = 1 a_swap += 1 print(" ".join(a)) print(a_swap)
Traceback (most recent call last): File "/tmp/tmpp78_34b8/tmpujs36s0_.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s279844046
p02259
u625806423
1495870109
Python
Python3
py
Runtime Error
20
7600
260
n = int(input()) a = [input() for i in range(n)] a_swap = 0 flag = 1 while flag: flag = 0 for j in range(n-1,0,-1): if int(a[j]) < int(a[j-1]): a[j],a[j-1] = a[j-1],a[j] flag = 1 a_swap += 1 print(" ".join(a)) print(a_swap)
Traceback (most recent call last): File "/tmp/tmpda05s0qg/tmpyky2ifpk.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s645852262
p02259
u625806423
1495870349
Python
Python3
py
Runtime Error
20
7696
270
n = int(input()) a = [input() for i in range(n)] a_swap = 0 flag = True while flag: flag = False for j in range(n-1,0,-1): if int(a[j]) < int(a[j-1]): a[j],a[j-1] = a[j-1],a[j] flag = True a_swap += 1 print(" ".join(a)) print(a_swap)
Traceback (most recent call last): File "/tmp/tmp_190p8fx/tmp_ajiezu_.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s468813971
p02259
u625806423
1495870505
Python
Python3
py
Runtime Error
20
7680
270
n = int(input()) a = [input() for i in range(n)] a_swap = 0 flag = True while flag: flag = False for j in range(n-1,0,-1): if int(a[j]) < int(a[j-1]): a[j],a[j-1] = a[j-1],a[j] flag = True a_swap += 1 print(" ".join(a)) print(a_swap)
Traceback (most recent call last): File "/tmp/tmpj8v5c9m7/tmpver_b9es.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s867807068
p02259
u650790815
1496027475
Python
Python3
py
Runtime Error
0
0
246
n = int(input()) a = list(map(int,input().strip().split()) count = 0 for i in range(n): for j in range(n-1,i,-1): if a[j] < a[j-1]: count += 1 a[j],a[j-1] = a[j-1],a[j] print(' '.join(map(str,a))) print(count)
File "/tmp/tmpkn_a1gw7/tmp9h_teip7.py", line 2 a = list(map(int,input().strip().split()) ^ SyntaxError: '(' was never closed
s850218467
p02259
u650790815
1496027873
Python
Python3
py
Runtime Error
0
0
245
n = int(input()) a = list(map(int,input().strip().split()) count = 0 for i in range(n): for j in range(n-1,i,-1): if a[j] < a[j-1]: a[j],a[j-1] = a[j-1],a[j] count += 1 print(' '.join(map(str,a))) print(count)
File "/tmp/tmpf2b95s1f/tmp8rbjpksb.py", line 2 a = list(map(int,input().strip().split()) ^ SyntaxError: '(' was never closed
s757789211
p02259
u630546605
1497162951
Python
Python
py
Runtime Error
0
0
457
# # coding: utf-8 def bubbleSort(arr, n): flag = True swap_num = 0 while flag: flag = False for j in xrange(n-1, 0, -1): if arr[j] < arr[j-1]: arr[j], arr[j-1] = arr[j-1], arr[j] swap_num += 1 flag = True pass return swap_num n = int(raw_input()) arr = map(int, raw_input().split()) num = bubbleSort(arr, n) print " ".join(map(str, test_arr)),"\n",num
File "/tmp/tmpizs61ebg/tmpt0wxvc94.py", line 24 print " ".join(map(str, test_arr)),"\n",num ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?