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
s575468813
p02250
u215151081
1494226453
Python
Python3
py
Runtime Error
0
0
223
T = input() n = int(input()) P = input() for a in range(n): for i in range(len(T)-len(P)+1): if T[i:i+len(P)] == P: print(1) return else: print(0) return:
File "/tmp/tmpapeoygs3/tmp3ay9kedv.py", line 12 return: ^ SyntaxError: invalid syntax
s863908366
p02250
u215151081
1494226522
Python
Python3
py
Runtime Error
0
0
235
T = input() n = int(input()) P = input() for a in range(n): for i in range(len(T)-len(P)+1): if T[i:i+len(P)] == P: print(1) return else: print(0) return
File "/tmp/tmpk7ythqe1/tmp1lsvnk9i.py", line 9 return ^^^^^^ SyntaxError: 'return' outside function
s868436407
p02250
u859725751
1516590377
Python
Python3
py
Runtime Error
20
5592
538
x = input() n = int(input()) def check(string,word): search_state = 0 l = len(string) i = 0 while (i < l): # print(string[i]) if string[i+search_state] == word[search_state]: search_state += 1 if search_state == len(word): return 1 else: i += max(search_state,1) search_state = 0 return 0 # print(check(x,'baa')) for i in range(n): y = input() print(check(x,y))
Traceback (most recent call last): File "/tmp/tmpglf4cfqf/tmps5meg63b.py", line 1, in <module> x = input() ^^^^^^^ EOFError: EOF when reading a line
s542086509
p02250
u138546245
1527299120
Python
Python3
py
Runtime Error
30
6004
1602
from collections import defaultdict class IndexMatch: shift = 40 size = 33554393 def __init__(self, text): self.text = text self.index = self._create_index() def _create_index(self): index = defaultdict(list) index[self.text[0]].append(0) for i in range(1, len(self.text)): index[self.text[i-1:i+1]].append(i-1) index[self.text[i]].append(i) return index def match(self, search_text): def _match(text): ls = len(text) if ls <= 2: return [(i, i+ls-1) for i in self.index[text]] mid = ls // 2 pre = _match(text[:mid]) post = _match(text[mid:]) if len(pre) == 0 or len(post) == 0: return [] indices = [] for (s1, e1) in pre: (s2, e2) = self._find(post, e1+1) if s2 > 0: indices.append(s1, e2) return indices return len(_match(search_text)) > 0 def _find(self, ts, i): if len(ts) == 0: return (-1, -1) mid = len(ts) // 2 s, e = ts[mid] if s > i: return self._find(ts[mid+1:], i) elif s < i: return self._find(ts[:mid], i) else: return (s, e) def run(): s1 = input() n = int(input()) matcher = IndexMatch(s1) for _ in range(n): s2 = input() if matcher.match(s2): print(1) else: print(0) if __name__ == '__main__': run()
Traceback (most recent call last): File "/tmp/tmpnwd3q6qo/tmpu9e396hp.py", line 72, in <module> run() File "/tmp/tmpnwd3q6qo/tmpu9e396hp.py", line 59, in run s1 = input() ^^^^^^^ EOFError: EOF when reading a line
s948761143
p02250
u138546245
1527377299
Python
Python3
py
Runtime Error
1610
130896
2059
from collections import defaultdict, Counter from math import floor, log class NoMatch(Exception): pass class IndexMatch: MAX_KEYLEN = 20 def __init__(self, text): self.text = text self.keylen = self._select_keylen() self._create_index() def _select_keylen(self): chars = Counter(list(self.text)) return min(floor(log(len(self.text), len(chars))), self.MAX_KEYLEN) def _create_index(self): index = defaultdict(set) particles = set() for i in range(len(self.text)+1): for j in range(max(i-self.keylen, 0), i): if i - j < self.keylen // 2: particles.add(self.text[j:i]) else: index[self.text[j:i]].add(j) self.index = index self.particles = particles def match(self, search_text): def _match(lo, hi): text = search_text[lo:hi] if hi-lo <= self.keylen: return self.index[text] mid = (lo + hi) // 2 pre = _match(lo, mid) post = _match(mid, hi) if len(pre) == 0 or len(post) == 0: raise NoMatch() indices = set(i for i in pre if i+mid-lo in post) return indices if len(search_text) < self.keylen // 2: return search_text in self.particles try: match = _match(0, len(search_text)) return len(match) > 0 except NoMatch: return False def run(): s1 = input() n = int(input()) ss = [] for _ in range(n): ss.append(input()) i = 0 maxsize = 100000 results = [False] * n while i < n: matcher = IndexMatch(s1[i:i+maxsize]) for j, s2 in enumerate(ss): if not results[j]: results[j] = matcher.match(s2) i = i + maxsize - 1000 for result in results: if result: print(1) else: print(0) if __name__ == '__main__': run()
Traceback (most recent call last): File "/tmp/tmpaprld6_n/tmpmytoxu8x.py", line 86, in <module> run() File "/tmp/tmpaprld6_n/tmpmytoxu8x.py", line 60, in run s1 = input() ^^^^^^^ EOFError: EOF when reading a line
s379695372
p02255
u302561071
1531822013
Python
Python
py
Runtime Error
0
0
572
def main() n = int(input(),10) sort_list = list() for i in range(0,n): sort_list.append(int(input(),10)) for i in range(1,n): for j in range(0,n): print(sort_list[j]) if j is not n - 1: print(" ") else: print("\n") tmp = sort_list[i] int j = i - 1 while j >= 0 and sort_list[i] > v: sort_list[j+1] = sort_list[j] j-- sort_list[j+1] = v if __name__ == '__main__': main()
File "/tmp/tmpzyvn6p93/tmppwz2xwdi.py", line 1 def main() ^ SyntaxError: expected ':'
s682675913
p02255
u302561071
1531822087
Python
Python
py
Runtime Error
0
0
428
n = int(input(),10) sort_list = list() for i in range(0,n): sort_list.append(int(input(),10)) for i in range(1,n): for j in range(0,n): print(sort_list[j]) if j is not n - 1: print(" ") else: print("\n") tmp = sort_list[i] int j = i - 1 while j >= 0 and sort_list[i] > v: sort_list[j+1] = sort_list[j] j-- sort_list[j+1] = v
File "/tmp/tmp_b_8bj3f/tmpih9zgwz4.py", line 18 int j = i - 1 ^ SyntaxError: invalid syntax
s807313626
p02255
u302561071
1531822104
Python
Python
py
Runtime Error
0
0
424
n = int(input(),10) sort_list = list() for i in range(0,n): sort_list.append(int(input(),10)) for i in range(1,n): for j in range(0,n): print(sort_list[j]) if j is not n - 1: print(" ") else: print("\n") tmp = sort_list[i] j = i - 1 while j >= 0 and sort_list[i] > v: sort_list[j+1] = sort_list[j] j-- sort_list[j+1] = v
File "/tmp/tmp8361o4xp/tmpm79by3ne.py", line 21 j-- ^ SyntaxError: invalid syntax
s573171737
p02255
u302561071
1531822112
Python
Python
py
Runtime Error
0
0
430
n = int(input(),10) sort_list = list() for i in range(0,n): sort_list.append(int(input(),10)) for i in range(1,n): for j in range(0,n): print(sort_list[j]) if j is not n - 1: print(" ") else: print("\n") tmp = sort_list[i] j = i - 1 while j >= 0 and sort_list[i] > v: sort_list[j+1] = sort_list[j] j = j - 1 sort_list[j+1] = v
Traceback (most recent call last): File "/tmp/tmpmxbbk8an/tmpcchl4nle.py", line 2, in <module> n = int(input(),10) ^^^^^^^ EOFError: EOF when reading a line
s314220832
p02255
u302561071
1531822135
Python
Python
py
Runtime Error
0
0
422
n = input() sort_list = list() for i in range(0,n): sort_list.append(int(input(),10)) for i in range(1,n): for j in range(0,n): print(sort_list[j]) if j is not n - 1: print(" ") else: print("\n") tmp = sort_list[i] j = i - 1 while j >= 0 and sort_list[i] > v: sort_list[j+1] = sort_list[j] j = j - 1 sort_list[j+1] = v
Traceback (most recent call last): File "/tmp/tmpbxpale1d/tmp2t42p5qy.py", line 2, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s896860089
p02255
u302561071
1531822154
Python
Python
py
Runtime Error
0
0
414
n = input() sort_list = list() for i in range(0,n): sort_list.append(input()) for i in range(1,n): for j in range(0,n): print(sort_list[j]) if j is not n - 1: print(" ") else: print("\n") tmp = sort_list[i] j = i - 1 while j >= 0 and sort_list[i] > v: sort_list[j+1] = sort_list[j] j = j - 1 sort_list[j+1] = v
Traceback (most recent call last): File "/tmp/tmphqljymxm/tmp3t39z9sb.py", line 2, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s354536579
p02255
u302561071
1531822261
Python
Python
py
Runtime Error
0
0
393
n = input() sort_list = list() map(int, raw_input().split()) for i in range(1,n): for j in range(0,n): print(sort_list[j]) if j is not n - 1: print(" ") else: print("\n") tmp = sort_list[i] j = i - 1 while j >= 0 and sort_list[i] > v: sort_list[j+1] = sort_list[j] j = j - 1 sort_list[j+1] = v
Traceback (most recent call last): File "/tmp/tmp93l523dt/tmpziicseoc.py", line 2, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s229291565
p02255
u302561071
1531822288
Python
Python
py
Runtime Error
0
0
405
n = input() sort_list = list() sort_list = map(int, raw_input().split()) for i in range(1,n): for j in range(0,n): print(sort_list[j]) if j is not n - 1: print(" ") else: print("\n") tmp = sort_list[i] j = i - 1 while j >= 0 and sort_list[i] > v: sort_list[j+1] = sort_list[j] j = j - 1 sort_list[j+1] = v
Traceback (most recent call last): File "/tmp/tmpndumih0w/tmp2ge6p4rh.py", line 2, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s317371367
p02255
u302561071
1531822320
Python
Python
py
Runtime Error
0
0
405
n = input() sort_list = list() sort_list = map(int, raw_input().split()) for i in range(1,n): for j in range(0,n): print(sort_list[j]) if j is not n - 1: print(" ") else: print("\n") tmp = sort_list[i] j = i - 1 while j >= 0 and sort_list[j] > v: sort_list[j+1] = sort_list[j] j = j - 1 sort_list[j+1] = v
Traceback (most recent call last): File "/tmp/tmprbk7l7bo/tmp7z85u61p.py", line 2, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s630877028
p02255
u726631692
1532041678
Python
Python3
py
Runtime Error
0
0
221
dum = input() data = [ int(i) for i in input().split(" ")] for i in range(1,len(data)): v = data[i] j = i-1 while j>=0 and data[j] > v: data[j+1]=data[j] j-=1 else: data[j+1]=v print(' '.join(data))
Traceback (most recent call last): File "/tmp/tmp0oyzm9xp/tmprs6iie3k.py", line 1, in <module> dum = input() ^^^^^^^ EOFError: EOF when reading a line
s815024946
p02255
u525366883
1535086548
Python
Python
py
Runtime Error
0
0
197
n = int(raw_input()) a = map(int, raw_input().split()) for i in range(1, n-1): v = a[i] j = i -1 while j >= 0 and a[j] > v: a[j+1] = a[j] j-- a[j+1] = v print a
File "/tmp/tmpa50wqe7m/tmp96pvggl2.py", line 8 j-- ^ SyntaxError: invalid syntax
s361558174
p02255
u525366883
1535087270
Python
Python
py
Runtime Error
0
0
243
n = int(raw_input()) a = map(int, raw_input().split()) print " ".join(map(str, a)) for i in range(1, n): v = a[i] j = i -1 while j >= 0 and a[j] > v: a[j+1] = a[j] j-- a[j+1] = v print " ".join(map(str, a))
File "/tmp/tmpvqceo75c/tmp5t81y4ga.py", line 3 print " ".join(map(str, a)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s493321042
p02255
u260169299
1535147824
Python
Python3
py
Runtime Error
0
0
1025
* * Created by heads on 8/24/2018. */ import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); // Get numbers int n = input.nextInt(); int[] nums = new int[n]; // fill array for(int i = 0; i < n; i++){ nums[i] = input.nextInt(); } insertSort(n, nums); } public static void insertSort(int n, int[] nums){ for(int i = 1; i<= nums.length-1; i++){ printHelp(nums); int key = nums[i]; // insert A[i] into the sorted sequence A[0,...,j-1] int j = i - 1; while(j >= 0 && nums[j] > key){ nums[j+1] = nums[j]; j--; } nums[j+1] = key; } printHelp(nums); } private static void printHelp(int[] nums){ for(int i : nums){ System.out.print(i + " "); } System.out.print("\n"); } }
File "/tmp/tmpficdape_/tmppqm2dp9t.py", line 1 * ^ SyntaxError: invalid syntax
s008604035
p02255
u260169299
1535147857
Python
Python3
py
Runtime Error
0
0
985
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); // Get numbers int n = input.nextInt(); int[] nums = new int[n]; // fill array for(int i = 0; i < n; i++){ nums[i] = input.nextInt(); } insertSort(n, nums); } public static void insertSort(int n, int[] nums){ for(int i = 1; i<= nums.length-1; i++){ printHelp(nums); int key = nums[i]; // insert A[i] into the sorted sequence A[0,...,j-1] int j = i - 1; while(j >= 0 && nums[j] > key){ nums[j+1] = nums[j]; j--; } nums[j+1] = key; } printHelp(nums); } private static void printHelp(int[] nums){ for(int i : nums){ System.out.print(i + " "); } System.out.print("\n"); } }
File "/tmp/tmpi9b5fhu3/tmps6yo3aps.py", line 3 public class Main { ^^^^^ SyntaxError: invalid syntax
s941051714
p02255
u427752990
1535343171
Python
Python3
py
Runtime Error
0
0
380
# inputList = list(map(int, '''6 # 5 2 4 6 1 3'''.split())) inputList = list(map(int, input.split())) def insertionSort(A, N): for i in range(1, N): v = A[i] j = i - 1 while j >= 0 and A[j] > v: A[j+1] = A[j] j-=1 A[j+1] = v print(A) N = int(inputList.pop(0)) print(inputList) insertionSort(inputList, N)
Traceback (most recent call last): File "/tmp/tmpvp0xgeff/tmpelykmh_i.py", line 4, in <module> inputList = list(map(int, input.split())) ^^^^^^^^^^^ AttributeError: 'builtin_function_or_method' object has no attribute 'split'
s169721031
p02255
u427752990
1535343205
Python
Python3
py
Runtime Error
0
0
380
# inputList = list(map(int, '''6 # 5 2 4 6 1 3'''.split())) inputList = list(map(int, input.split())) def insertionSort(A, N): for i in range(1, N): v = A[i] j = i - 1 while j >= 0 and A[j] > v: A[j+1] = A[j] j-=1 A[j+1] = v print(A) N = int(inputList.pop(0)) print(inputList) insertionSort(inputList, N)
Traceback (most recent call last): File "/tmp/tmpta1nz927/tmpjpwqdyzv.py", line 4, in <module> inputList = list(map(int, input.split())) ^^^^^^^^^^^ AttributeError: 'builtin_function_or_method' object has no attribute 'split'
s393843058
p02255
u427752990
1535344002
Python
Python3
py
Runtime Error
0
0
560
# inputList = list(map(int, '''6 # 5 2 4 6 1 3'''.split())) # N = inputList.pop(0) N = input() inputList = list(map(int, input.split())) def formatting(nums): for i in range(len(nums)): if i != len(nums) - 1: print(nums[i],end=' ') else: print(nums[i]) def insertionSort(A, N): for i in range(1, N): v = A[i] j = i - 1 while j >= 0 and A[j] > v: A[j+1] = A[j] j-=1 A[j+1] = v formatting(A) formatting(inputList) insertionSort(inputList, N)
Traceback (most recent call last): File "/tmp/tmpev3wdqiu/tmp79lnlqlb.py", line 5, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s602559565
p02255
u418996726
1535418747
Python
Python3
py
Runtime Error
0
0
310
input() myarr = list(map(int, split(input()))) for i in range(1, len(myarr)): for j in range(i, 0,-1): if myarr[j] < myarr[j-1]: t = myarr[j] myarr[j] = myarr[j-1] myarr[j-1] = t else: break print(" ".join(map(str, myarr)))
Traceback (most recent call last): File "/tmp/tmp0h6_1dbe/tmpul5zoiz4.py", line 1, in <module> input() EOFError: EOF when reading a line
s335246537
p02255
u418996726
1535418945
Python
Python3
py
Runtime Error
0
0
310
input() myarr = list(map(int, input().split()) for i in range(1, len(myarr)): for j in range(i, 0,-1): if myarr[j] < myarr[j-1]: t = myarr[j] myarr[j] = myarr[j-1] myarr[j-1] = t else: break print(" ".join(map(str, myarr)))
File "/tmp/tmpcr1wyz8f/tmpz6owyuwz.py", line 2 myarr = list(map(int, input().split()) ^ SyntaxError: '(' was never closed
s027514916
p02255
u418996726
1540715929
Python
Python3
py
Runtime Error
0
0
279
def insertion_sort(arr): for i in range(1,len(arr)): j = i while arr[j] < arr[j-1] and j > 0: arr[j-1], arr[j] = arr[j], arr[j-1] j -= 1 print(" ".join(arr)) input() arr = list(map(int, input().split())) insertion_sort(arr)
Traceback (most recent call last): File "/tmp/tmpfujc5oo5/tmpcaq6rr17.py", line 9, in <module> input() EOFError: EOF when reading a line
s572626713
p02255
u698762975
1555656818
Python
Python3
py
Runtime Error
0
0
230
def inserrtionsort(l,n): for i in range(1,n): v=l[i] j=i-1 while v<l[j] and j>=0: l[j+1]=l[j] j-=1 l[j+1]=v print(""join(l)) print("".join(l)) n=list(input()) m=int(input()) inserrtionsort(m,n)
File "/tmp/tmpm4w51jfw/tmp1a4nl2t4.py", line 9 print(""join(l)) ^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma?
s314032586
p02255
u698762975
1555657151
Python
Python3
py
Runtime Error
0
0
250
def inserrtionsort(l,n): for i in range(1,n): print(" ".join(l)) v=l[i] j=i-1 while v<l[j] and j>=0: l[j+1]=l[j] j-=1 l[j+1]=v print(" ".join(l)) m=int(input()) n=list(map(int,input().split())) inserrtionsort(n,m)
Traceback (most recent call last): File "/tmp/tmpep5wvv1j/tmp25gh659f.py", line 11, in <module> m=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s297640242
p02255
u088264506
1556617914
Python
Python3
py
Runtime Error
0
0
395
n = int(input()) l = list(map(int, input())) def insertionSort(a, n):#配列aを挿入ソートで並び替える(昇順) for i in range(1,n-1): v = a[i] j = i - 1 while >= 0 and a[j] > v: a[j+1] = a[j]#a[i]の位置に詰めていく処理 j -= 1 print(" ".join(a))#1行ごとに出力 a[j+1] = v insertionSort(l,n)
File "/tmp/tmpp6him7x3/tmpsv67l1pp.py", line 7 while >= 0 and a[j] > v: ^^ SyntaxError: invalid syntax
s671572640
p02255
u852112234
1558937382
Python
Python3
py
Runtime Error
0
0
183
N = int(input()) A = list(map(int,input.split())) for i in range(1,N): v = A[i] j = i-1 while(j >= 0 and A[j] > v): A[j+1] == A[j] j -= j A[j+1] = v
Traceback (most recent call last): File "/tmp/tmphn74ugwt/tmp2kyplckm.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s310251254
p02255
u662822413
1559052739
Python
Python3
py
Runtime Error
0
0
362
def show(nums): for i in range(len(nums)): if i !=len(nums)-1: print(nums[i],end='') else: print(nums[i]) n=int(input()) nums=list(map(int,input().split())) show(nums) for i in range(1,n): v=nums[i] j=i-1 while (j>=0 and nus[j]>v): nums[j+1]=nums[j] j-- nums[j+1] = v shows(nums)
File "/tmp/tmpzwvq4nlz/tmpn8b483y0.py", line 16 j-- ^ SyntaxError: invalid syntax
s421864092
p02255
u662822413
1559052793
Python
Python3
py
Runtime Error
0
0
365
def show(nums): for i in range(len(nums)): if i !=len(nums)-1: print(nums[i],end='') else: print(nums[i]) n=int(input()) nums=list(map(int,input().split())) show(nums) for i in range(1,n): v=nums[i] j=i-1 while (j>=0 and nus[j]>v): nums[j+1]=nums[j] j -= 1 nums[j+1] = v shows(nums)
Traceback (most recent call last): File "/tmp/tmp8hur2p2r/tmp8r4uh4th.py", line 8, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s539141601
p02255
u662822413
1559052813
Python
Python3
py
Runtime Error
0
0
366
def show(nums): for i in range(len(nums)): if i !=len(nums)-1: print(nums[i],end=' ') else: print(nums[i]) n=int(input()) nums=list(map(int,input().split())) show(nums) for i in range(1,n): v=nums[i] j=i-1 while (j>=0 and nus[j]>v): nums[j+1]=nums[j] j -= 1 nums[j+1] = v shows(nums)
Traceback (most recent call last): File "/tmp/tmp_yi5rxav/tmpddz3hckw.py", line 8, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s762667944
p02255
u662822413
1559052896
Python
Python3
py
Runtime Error
0
0
367
def show(nums): for i in range(len(nums)): if i !=len(nums)-1: print(nums[i],end=' ') else: print(nums[i]) n=int(input()) nums=list(map(int,input().split())) show(nums) for i in range(1,n): v=nums[i] j=i-1 while (j>=0 and nums[j]>v): nums[j+1]=nums[j] j -= 1 nums[j+1] = v shows(nums)
Traceback (most recent call last): File "/tmp/tmpo2is3xzr/tmpesrbh9wi.py", line 8, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s553639926
p02255
u193025715
1408608117
Python
Python3
py
Runtime Error
40
6724
253
n = int(input()) nums = list(map(int, input().split(' '))) for i in range(len(nums)): key = nums[i] j = i - 1 while j >= 0 and nums[j] > key: nums[j+1] = nums[j] j -= 1 nums[j+1] = key print(' '.join(map(str, nums)))
Traceback (most recent call last): File "/tmp/tmptvf1xrv5/tmpq7zf1r_o.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s804771828
p02255
u802705119
1436760677
Python
Python3
py
Runtime Error
0
0
374
# coding: utf-8 def insertSort(array): for i in array[1:]: [print(array[i]) for i in array] v = array[i] j = i - 1 while j >= 0 and array[j] > v: array[j+1] = array[j] j -= 1 array[j+1] = v if __name__ == '__main__': n = input() index = [int for i in input().split()] insertSort(index)
Traceback (most recent call last): File "/tmp/tmpuati41px/tmpwx_4nryg.py", line 13, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s685464623
p02255
u881590806
1439571120
Python
Python
py
Runtime Error
10
4224
284
n = int(raw_input()) arr = map(int, raw_input().split(' ')) p = 1 print ' '.join(map(str, arr)) while True: for j in range(0,p): if arr[p] < arr[j]: arr[p],arr[j] = arr[j],arr[p] p += 1 print ' '.join(map(str, arr)) if p >= len(arr): break
File "/tmp/tmpfv2eszbz/tmpvcmen7t8.py", line 5 print ' '.join(map(str, arr)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s288885247
p02255
u722558010
1440668642
Python
Python3
py
Runtime Error
0
0
206
n=int(input()) A=list(map(int,input().split())) for i in range(1,n): print(" ".join(map(int,A))) j=i-1 while A[j]<A[j-1] and j>0: (A[j],A[j-1])=(A[j-1],A[j]) j=j-1 else: print(" ".join(map(int,A)))
Traceback (most recent call last): File "/tmp/tmpk8cz__zs/tmpeuc0475o.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s848788152
p02255
u632424921
1442209873
Python
Python
py
Runtime Error
0
0
354
num = raw_input() num_list = raw_input() num_list = num_list.split() print "???".join(num_list) for i in range(1, len(num_list)): temp = num_list[i] j = i - 1 while (j >= 0 and num_list[j] > temp): num_list[j+1] = num_list[j] j -= 1 num_list[j+1] = temp print "???".join(num_list)
File "/tmp/tmpdytho4v2/tmp_7gwkl5t.py", line 4 print "???".join(num_list) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s477543828
p02255
u197445199
1442211109
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/tmp__zdazzt/tmpd2g5djkl.py", line 5 print " ".join(A_str) ^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s307222969
p02255
u197445199
1442211128
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/tmp4_0uw0o6/tmph2ciqn07.py", line 5 print " ".join(A_str) ^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s266580006
p02255
u885889402
1442217064
Python
Python3
py
Runtime Error
0
0
500
a=[] n=int(input()) s=input() a=list(map(int,s.split())) insertionSort(a,n) def insertionSort(a,n): for i in range(n): print(a[i],end="") if(i!=n-1): print(" ",end="") print("") for i in range(1,n): v=a[i] j=i-1 while(j>=0 and a[j]>v): a[j+1] = a[j] j-=1 a[j+1] = v for i in range(n): print(a[i],end="") if(i!=n-1): print(" ",end="") print("")
Traceback (most recent call last): File "/tmp/tmptd3nbmux/tmpu961ql8p.py", line 2, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s524338349
p02255
u894381890
1442283935
Python
Python
py
Runtime Error
0
0
235
import sys y = sys.stdin.readline() y = int(y) x = sys.stdin.readline() x_list = int(x.split(" ")) for i in range(1, y): if i > 0: j = i - 1 if list(i) < list(j): list(i), list(j) = list(j), list(i) i = i - 2
File "/tmp/tmpzr1kvs8k/tmp6jx62644.py", line 14 list(i), list(j) = list(j), list(i) ^^^^^^^ SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?
s737324659
p02255
u894381890
1442284518
Python
Python
py
Runtime Error
0
0
316
import sys y = sys.stdin.readline() y = int(y) x = sys.stdin.readline() x_list = int(x.split(" ")) for i in range(1, y + 1): if list(i) < list(i - 1): for j range(i - 1, 0): if list(j) < list(i): list(i), list(j+1) = list(j+1), list(i) break for k in range(0, y): print list(j)
File "/tmp/tmpq0tnz60n/tmpqcwhykgr.py", line 12 for j range(i - 1, 0): ^^^^^ SyntaxError: invalid syntax
s419665918
p02255
u894381890
1442284558
Python
Python
py
Runtime Error
0
0
316
import sys y = sys.stdin.readline() y = int(y) x = sys.stdin.readline() x_list = int(x.split(" ")) for i in range(1, y + 1): if list(i) < list(i - 1): for j range(i - 1, 0): if list(j) < list(i): list(i), list(j+1) = list(j+1), list(i) break for k in range(0, y): print list(k)
File "/tmp/tmptlcmxkl4/tmp0lopaud8.py", line 12 for j range(i - 1, 0): ^^^^^ SyntaxError: invalid syntax
s362377404
p02255
u894381890
1442284606
Python
Python
py
Runtime Error
0
0
316
import sys y = sys.stdin.readline() y = int(y) x = sys.stdin.readline() x_list = int(x.split(" ")) for i in range(1, y + 1): if list(i) < list(i - 1): for j range(i - 1, 0): if list(j) < list(i): list(i), list(j+1) = list(j+1), list(i) break for k in range(0, y): print list(k)
File "/tmp/tmp2506a4yd/tmpqwf4poqx.py", line 12 for j range(i - 1, 0): ^^^^^ SyntaxError: invalid syntax
s341573905
p02255
u894381890
1442284682
Python
Python
py
Runtime Error
0
0
313
import sys y = sys.stdin.readline() y = int(y) x = sys.stdin.readline() x_list = int(x.split(" ")) for i in range(1, y): if list(i) < list(i - 1): for j range(i - 1, -1): if list(j) < list(i): list(i), list(j+1) = list(j+1), list(i) break for k in range(0, y): print list(k)
File "/tmp/tmp8igaexxd/tmpr3tvf4fb.py", line 12 for j range(i - 1, -1): ^^^^^ SyntaxError: invalid syntax
s317799003
p02255
u894381890
1442284913
Python
Python
py
Runtime Error
0
0
331
import sys y = sys.stdin.readline() y = int(y) x = sys.stdin.readline() x_list = int(x.split(" ")) for i in range(1, y): if x_list[i] < x_list[i - 1]: for j range(i - 1, -1): if x_list[j] < x_list[i]: x_list[i], x_list[j+1] = x_list[j+1], x_list[i] break for k in range(0, y): print x_list[k]
File "/tmp/tmp1pqcqk42/tmpm8r2oa7f.py", line 12 for j range(i - 1, -1): ^^^^^ SyntaxError: invalid syntax
s553409458
p02255
u894381890
1442290991
Python
Python
py
Runtime Error
0
0
628
import sys y = sys.stdin.readline() y = int(y) x = sys.stdin.readline() x_list = x.split(" ") for i in range(y): x_list[i] = int(x_list[i]) for i in range(1, y): if x_list[i] < x_list[i - 1]: for j in range(0, i - 1): if x_list[j] > x_list[i]: temp = x_list[i] for p in range(0, i): q = i - p x_list[q] = x_list[q - 1] x_list[j+1] = temp elif x_list[0] > x_list[i] for p in range(0, i): q = i - p temp = x_list[i] x_list[q] = x_list[q - 1] x_list[0] = temp for k in range(0, y): print x_list[k], print " "
File "/tmp/tmpufx9_ugc/tmp8g52qy6e.py", line 22 elif x_list[0] > x_list[i] ^ SyntaxError: expected ':'
s677880311
p02255
u894381890
1442291003
Python
Python
py
Runtime Error
0
0
628
import sys y = sys.stdin.readline() y = int(y) x = sys.stdin.readline() x_list = x.split(" ") for i in range(y): x_list[i] = int(x_list[i]) for i in range(1, y): if x_list[i] < x_list[i - 1]: for j in range(0, i - 1): if x_list[j] > x_list[i]: temp = x_list[i] for p in range(0, i): q = i - p x_list[q] = x_list[q - 1] x_list[j+1] = temp elif x_list[0] > x_list[i] for p in range(0, i): q = i - p temp = x_list[i] x_list[q] = x_list[q - 1] x_list[0] = temp for k in range(0, y): print x_list[k], print " "
File "/tmp/tmpe3exqdiv/tmp9c_visjw.py", line 22 elif x_list[0] > x_list[i] ^ SyntaxError: expected ':'
s285012434
p02255
u894381890
1442291061
Python
Python
py
Runtime Error
0
0
635
import sys y = sys.stdin.readline() y = int(y) x = sys.stdin.readline() x_list = x.split(" ") for i in range(y): x_list[i] = int(x_list[i]) for i in range(1, y): if x_list[i] < x_list[i - 1]: for j in range(0, i - 1): if x_list[0] > x_list[i] for p in range(0, i): q = i - p temp = x_list[i] x_list[q] = x_list[q - 1] x_list[0] = temp elif x_list[j] > x_list[i]: temp = x_list[i] for p in range(0, i): q = i - p x_list[q] = x_list[q - 1] x_list[j+1] = temp for k in range(0, y): print x_list[k], print " "
File "/tmp/tmpsffws_zx/tmps4kigfy0.py", line 17 if x_list[0] > x_list[i] ^ SyntaxError: expected ':'
s376143582
p02255
u894381890
1442291927
Python
Python
py
Runtime Error
0
0
412
import sys def inserttionSort(x_list,y): for i in range(1, y): v = x_list[i] j = i - 1 while j >= 0 and x_list[j] > v: x_list[j + 1] = x_list[j] j-- x_list[j+1] = v for k in range(0, y): print x_list[k], print " " y = sys.stdin.readline() y = int(y) x = sys.stdin.readline() x_list = x.split(" ") for i in range(y): x_list[i] = int(x_list[i]) for i in range(1, y):
File "/tmp/tmpz6wt1axt/tmperkpdmk4.py", line 9 j-- ^ SyntaxError: invalid syntax
s484090213
p02255
u894381890
1442291981
Python
Python
py
Runtime Error
0
0
414
import sys def insertionSort(x_list,y): for i in range(1, y): v = x_list[i] j = i - 1 while j >= 0 and x_list[j] > v: x_list[j + 1] = x_list[j] j-- x_list[j+1] = v for k in range(0, y): print x_list[k], print " " y = sys.stdin.readline() y = int(y) x = sys.stdin.readline() x_list = x.split(" ") for i in range(y): x_list[i] = int(x_list[i]) insertionSort(x_list, y)
File "/tmp/tmpjxkxgdh8/tmpcg1kr936.py", line 9 j-- ^ SyntaxError: invalid syntax
s791209817
p02255
u854228079
1442314985
Python
Python
py
Runtime Error
0
0
284
n = raw_input() num = raw_input() array = [] array = num.strip().split(" ") for i in range(1, int(n)): print " ".join(array) v = array[i] j = i - 1 while j >= 0 and array[j] > v: array[j + 1] = array[j] j -= 1 array[j + 1] = v print " ".join(array
File "/tmp/tmp9w41zrc5/tmpsofi7aw0.py", line 7 print " ".join(array) ^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s618984167
p02255
u630746844
1446700195
Python
Python3
py
Runtime Error
0
0
508
import sys def insertionSort(A, N): for n in range(N-1): print (A[n], end=" ") print(A[N-1]) for i in range(1, N): v = A[i] j = i - 1 while j >= 0 and A[j] > v: A[j + 1] = A[j] j = j - 1 A[j + 1] = v for n in range(N-1): print (A[n], end=" ") print(A[N-1]) return A N = int(input()) A = input() A = A.split(" ") for i in range(N): A[i] = int(A[i]) val = insertionSort(stdin_A, stdin_N)
Traceback (most recent call last): File "/tmp/tmpus0qw5js/tmp9crmzr0f.py", line 20, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s345897267
p02255
u341533698
1454339205
Python
Python
py
Runtime Error
0
0
318
def main(): N = input() a = map(int, raw_input().split()) print ' '.join(map(str,a)) for i in xrange(1,len(a)-1): v = a[i] j = i - 1 while j >= 0 && a[j] > v: a[j+1] = a[j] j -= 1 a[j+1] = v print ' '.join(map(str,a)) return 0 main()
File "/tmp/tmpyjpyl3wc/tmpk2fvwfsw.py", line 4 print ' '.join(map(str,a)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s200353822
p02255
u994049982
1458607280
Python
Python
py
Runtime Error
0
0
143
q=input() a=map(int,rar_input().split()) for i in range(q): k=a[i] j=i-1 while j>=0 and a[j]>key: a[j+1]=a[j] j-=1 a[j+1]=key print(a)
Traceback (most recent call last): File "/tmp/tmpnpkhvv7m/tmpph3e3y80.py", line 1, in <module> q=input() ^^^^^^^ EOFError: EOF when reading a line
s248633635
p02255
u994049982
1458607288
Python
Python
py
Runtime Error
0
0
143
q=input() a=map(int,raw_input().split()) for i in range(q): k=a[i] j=i-1 while j>=0 and a[j]>key: a[j+1]=a[j] j-=1 a[j+1]=key print(a)
Traceback (most recent call last): File "/tmp/tmpc62r_cy6/tmph65tp43z.py", line 1, in <module> q=input() ^^^^^^^ EOFError: EOF when reading a line
s085638144
p02255
u994049982
1458607591
Python
Python
py
Runtime Error
0
0
182
q=input() a=map(int,raw_input().split()) for i in range(q): k=a[i] j=i-1 while j>=0 and a[j]>k: a[j+1]=a[j] j-=1 a[j+1]=k text="" for I in a: text=text+' '+I print(text)
Traceback (most recent call last): File "/tmp/tmpyga5rt03/tmpv3hc_qh2.py", line 1, in <module> q=input() ^^^^^^^ EOFError: EOF when reading a line
s519501159
p02255
u994049982
1458608226
Python
Python3
py
Runtime Error
0
0
190
q=input() a=map(int,raw_input().split()) for i in range(q): k=a[i] j=i-1 while j>=0 and a[j]>k: a[j+1]=a[j] j-=1 a[j+1]=k text=str() for I in a: text=text+' '+str(I) print(text)
Traceback (most recent call last): File "/tmp/tmpj1z8kesa/tmpas43u9h7.py", line 1, in <module> q=input() ^^^^^^^ EOFError: EOF when reading a line
s794208282
p02255
u670498238
1463702007
Python
Python3
py
Runtime Error
0
0
205
n = int(input()) l = [int(x) for x in input().split()] for i in range(n): a = l[i] j = i - 1 while j >= 0 and l[j] > a: l[j+1] = l[j] j = j - 1 l[j + 1] = a print(*1)
Traceback (most recent call last): File "/tmp/tmp81qwjxks/tmp4k107web.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s835004271
p02255
u603356762
1464697403
Python
Python3
py
Runtime Error
0
0
189
N = input() a=map(int,raw_input().split()) print(a) for i in range(1,N): v = a[i] j = i-1 while j >= 0 and a[j] > v: a[j+1] = a[j] j-=1 a[j+1]=v print(a)
Traceback (most recent call last): File "/tmp/tmp1a0xcqgd/tmppkoc8a5y.py", line 1, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s318079442
p02255
u603356762
1464697455
Python
Python3
py
Runtime Error
0
0
189
N = input() a=map(int,raw_input().split()) print(a) for i in range(1,N): v = a[i] j = i-1 while j >= 0 and a[j] > v: a[j+1] = a[j] j-=1 a[j+1]=v print(a)
Traceback (most recent call last): File "/tmp/tmprrsspnmz/tmpebjkelbw.py", line 1, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s681422752
p02255
u603356762
1464697791
Python
Python3
py
Runtime Error
0
0
196
N = input() a=map(int,raw_input().split()) print(a) for i in range(1,N): v = a[i] j = i-1 while j >= 0 and a[j] > v: a[j+1] = a[j] j-=1 a[j+1]=v print(a) return
File "/tmp/tmp_jtrucpp/tmpnubl_92b.py", line 12 return ^^^^^^ SyntaxError: 'return' outside function
s096083785
p02255
u603356762
1464698046
Python
Python3
py
Runtime Error
0
0
195
N = input() a=list(map(int,raw_input().split())) print(a) for i in range(1,N): v = a[i] j = i-1 while j >= 0 and a[j] > v: a[j+1] = a[j] j-=1 a[j+1]=v print(a)
Traceback (most recent call last): File "/tmp/tmpbml0nrxr/tmp5pyga82c.py", line 1, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s532161268
p02255
u603356762
1464698172
Python
Python3
py
Runtime Error
0
0
191
N = input() a=list(map(int,input().split())) print(a) for i in range(1,N): v = a[i] j = i-1 while j >= 0 and a[j] > v: a[j+1] = a[j] j-=1 a[j+1]=v print(a)
Traceback (most recent call last): File "/tmp/tmpupiubp3k/tmp3z1tn4on.py", line 1, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s893782985
p02255
u603356762
1464698556
Python
Python3
py
Runtime Error
0
0
187
N = input() a=list(map(int,raw_input().split())) for i in range(1,N): v = a[i] j = i-1 while j >= 0 and a[j] > v: a[j+1] = a[j] j-=1 a[j+1]=v print(*a)
Traceback (most recent call last): File "/tmp/tmpq79s5pr2/tmppis0xq29.py", line 1, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s109475638
p02255
u600065151
1466596131
Python
Python
py
Runtime Error
0
0
224
#????????? N = input() A = map(int, raw_input().split()) for i in range(len(A)): v = A[i] j = i - 1 while (j >= 0) & (A[j] > v): A[j+1] = A[j] j -= 1 A[j+1] = v print ' '.join(map(str, A))
File "/tmp/tmpl85kyb02/tmpwgsq3ny_.py", line 11 print ' '.join(map(str, A)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s136391075
p02255
u496045719
1469352272
Python
Python3
py
Runtime Error
0
0
655
#!/usr/bin/python import sys def main(): length, elements = sys.argv[1].split('\n') length = int(length) elements = elements.split() print(" ".join(elements)) elements = [str(i) for i in elements] sorted_list = [elements[0]] for i in range(1, length): element = elements[i] for j in range(0, len(sorted_list) + 1): if j == len(sorted_list): sorted_list.append(element) break elif element < sorted_list[j]: sorted_list.insert(j, element) break output_list = sorted_list[0:i+1] + elements[i+1:] print(" ".join([str(i) for i in output_list])) if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmp60j7o3fq/tmpurb5a_i6.py", line 28, in <module> main() File "/tmp/tmp60j7o3fq/tmpurb5a_i6.py", line 7, in main length, elements = sys.argv[1].split('\n') ~~~~~~~~^^^ IndexError: list index out of range
s968625746
p02255
u496045719
1469352350
Python
Python3
py
Runtime Error
0
0
668
#!/usr/bin/python import sys def main(): length, elements = sys.argv[1].split('\n') length = int(length) elements = elements.split() print(" ".join(elements)) elements = [str(i) for i in elements] sorted_list = [elements[0]] for i in range(1, length): element = elements[i] for j in range(0, len(sorted_list) + 1): if j == len(sorted_list): sorted_list.append(element) break elif element < sorted_list[j]: sorted_list.insert(j, element) break output_list = sorted_list[0:i+1] + elements[i+1:] print(" ".join([str(i) for i in output_list])) return 0 if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmp5vo04q07/tmpqxaz9_in.py", line 29, in <module> main() File "/tmp/tmp5vo04q07/tmpqxaz9_in.py", line 7, in main length, elements = sys.argv[1].split('\n') ~~~~~~~~^^^ IndexError: list index out of range
s024940080
p02255
u496045719
1469352715
Python
Python3
py
Runtime Error
0
0
635
#!/usr/bin/python import sys def main(): args = input() length = args[0] elements = args[1].split() print(" ".join(elements)) elements = [str(i) for i in elements] sorted_list = [elements[0]] for i in range(1, length): element = elements[i] for j in range(0, len(sorted_list) + 1): if j == len(sorted_list): sorted_list.append(element) break elif element < sorted_list[j]: sorted_list.insert(j, element) break output_list = sorted_list[0:i+1] + elements[i+1:] print(" ".join([str(i) for i in output_list])) return 0 if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmpwz0_uesd/tmpenl3aioy.py", line 29, in <module> main() File "/tmp/tmpwz0_uesd/tmpenl3aioy.py", line 7, in main args = input() ^^^^^^^ EOFError: EOF when reading a line
s579841184
p02255
u496045719
1469352982
Python
Python3
py
Runtime Error
0
0
646
#!/usr/bin/python import sys def main(): args = input() print(args) length = 6 elements = [5, 2, 4, 6, 1, 3] print(" ".join(elements)) elements = [str(i) for i in elements] sorted_list = [elements[0]] for i in range(1, length): element = elements[i] for j in range(0, len(sorted_list) + 1): if j == len(sorted_list): sorted_list.append(element) break elif element < sorted_list[j]: sorted_list.insert(j, element) break output_list = sorted_list[0:i+1] + elements[i+1:] print(" ".join([str(i) for i in output_list])) return 0 if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmpby9c2s9g/tmp7cq2o7g5.py", line 30, in <module> main() File "/tmp/tmpby9c2s9g/tmp7cq2o7g5.py", line 7, in main args = input() ^^^^^^^ EOFError: EOF when reading a line
s639618838
p02255
u496045719
1469353153
Python
Python3
py
Runtime Error
0
0
667
#!/usr/bin/python import sys def main(): args = input() a = [] for arg in args: a.append(arg) length = a[0] elements = a[1] print(" ".join(elements)) elements = [str(i) for i in elements] sorted_list = [elements[0]] for i in range(1, length): element = elements[i] for j in range(0, len(sorted_list) + 1): if j == len(sorted_list): sorted_list.append(element) break elif element < sorted_list[j]: sorted_list.insert(j, element) break output_list = sorted_list[0:i+1] + elements[i+1:] print(" ".join([str(i) for i in output_list])) return 0 if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmputa72uxo/tmpkde76jc4.py", line 32, in <module> main() File "/tmp/tmputa72uxo/tmpkde76jc4.py", line 7, in main args = input() ^^^^^^^ EOFError: EOF when reading a line
s360580123
p02255
u496045719
1469353759
Python
Python3
py
Runtime Error
0
0
617
#!/usr/bin/python import sys def main(): length = int(raw_input()) elements = map(int, raw_input().split()) print(" ".join(str(i) for i in elements)) sorted_list = [elements[0]] for i in range(1, length): element = elements[i] for j in range(0, len(sorted_list) + 1): if j == len(sorted_list): sorted_list.append(element) break elif element < sorted_list[j]: sorted_list.insert(j, element) break output_list = sorted_list[0:i+1] + elements[i+1:] print(" ".join([str(i) for i in output_list])) return 0 if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmpv1dadq7r/tmp_n4ju_fh.py", line 27, in <module> main() File "/tmp/tmpv1dadq7r/tmp_n4ju_fh.py", line 7, in main length = int(raw_input()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s481205888
p02255
u496045719
1469353870
Python
Python3
py
Runtime Error
0
0
623
#!/usr/bin/python import sys def main(): length = int(raw_input()) elements = list(map(int, raw_input().split())) print(" ".join(str(i) for i in elements)) sorted_list = [elements[0]] for i in range(1, length): element = elements[i] for j in range(0, len(sorted_list) + 1): if j == len(sorted_list): sorted_list.append(element) break elif element < sorted_list[j]: sorted_list.insert(j, element) break output_list = sorted_list[0:i+1] + elements[i+1:] print(" ".join([str(i) for i in output_list])) return 0 if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmps63xnauj/tmp53ewkh4z.py", line 27, in <module> main() File "/tmp/tmps63xnauj/tmp53ewkh4z.py", line 7, in main length = int(raw_input()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s849955425
p02255
u612243550
1469357431
Python
Python3
py
Runtime Error
0
0
197
n = int(input()) A = input().split(' ') for i in range(1, n-1): v = A[i] j = i - 1 while j >= 0 && A[j] > v: A[j+1] = A[j] j-- A[j+1] = v print(" ".join(A))
File "/tmp/tmppyfg4ivy/tmprdcuoezg.py", line 7 while j >= 0 && A[j] > v: ^ SyntaxError: invalid syntax
s691930346
p02255
u754727064
1471270896
Python
Python
py
Runtime Error
0
0
386
# -*- coding: utf-8 -*- def insertion_sort(n, A): for i in xrange(1, len(A)): key = A[i] j = i - 1 while j >= 0 and A[j] > key: A[j + 1] = A[j] j -= 1 A[j + 1] = key if __name__ == "__main__": n = int(raw_input()) A = raw_input().split(" ") A = map(int, A) insertion_sort(n, A) print " ".join(A).strip()
File "/tmp/tmpmjkgfl9e/tmpfv1qb446.py", line 18 print " ".join(A).strip() ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s947536176
p02255
u231136358
1471767359
Python
Python
py
Runtime Error
0
0
288
A = input().split() N = A.pop() # print(N) # print(A) # A = [5, 2, 4, 6, 1, 3] print(' '.join(map(str, A))) for i in range(1, len(A)): key = A[i] j = i - 1 while j >= 0 and A[j] > key: A[j+1] = A[j] j = j - 1 A[j+1] = key print(' '.join(map(str, A)))
Traceback (most recent call last): File "/tmp/tmpltcjo5e1/tmpkm80u_lz.py", line 1, in <module> A = input().split() ^^^^^^^ EOFError: EOF when reading a line
s345275620
p02255
u231136358
1471768701
Python
Python3
py
Runtime Error
0
0
221
print(' '.join([str(item) for item in A]) for i in range(1, len(A)): key = A[i] j = i - 1 while j >= 0 and A[j] > key: A[j+1] = A[j] j = j - 1 A[j+1] = key print(' '.join(map(str, A)))
File "/tmp/tmpzmr0n0cf/tmplqpxn_u6.py", line 1 print(' '.join([str(item) for item in A]) ^ SyntaxError: '(' was never closed
s388984300
p02255
u231136358
1471770512
Python
Python3
py
Runtime Error
0
0
287
A = [int(item) for item in input().split()] N = A.pop() print(' '.join([str(item) for item in A])) for i in range(1, N): key = A[i] j = i - 1 while j >= 0 and A[j] > key: A[j+1] = A[j] j = j - 1 A[j+1] = key print(' '.join([str(item) for item in A]))
Traceback (most recent call last): File "/tmp/tmpwfe1ffq7/tmpm9fmckq7.py", line 1, in <module> A = [int(item) for item in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s270990757
p02255
u231136358
1471770607
Python
Python3
py
Runtime Error
0
0
288
A = [int(item) for item in input().split()] N = A.pop(0) print(' '.join([str(item) for item in A])) for i in range(1, N): key = A[i] j = i - 1 while j >= 0 and A[j] > key: A[j+1] = A[j] j = j - 1 A[j+1] = key print(' '.join([str(item) for item in A]))
Traceback (most recent call last): File "/tmp/tmpuv777lzj/tmp1kqgx9wm.py", line 1, in <module> A = [int(item) for item in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s519544227
p02255
u231136358
1471770666
Python
Python3
py
Runtime Error
0
0
288
A = [int(item) for item in input().split()] N = A.pop(0) print(' '.join([str(item) for item in A])) for i in range(1, N): key = A[i] j = i - 1 while j >= 0 and A[j] > key: A[j+1] = A[j] j = j - 1 A[j+1] = key print(' '.join([str(item) for item in A]))
Traceback (most recent call last): File "/tmp/tmp8_204ssz/tmp31cebyml.py", line 1, in <module> A = [int(item) for item in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s932765805
p02255
u231136358
1471770856
Python
Python3
py
Runtime Error
0
0
302
input = input().split() A = [int(item) for item in input] N = A.pop(0) print(' '.join([str(item) for item in A])) for i in range(1, N): key = A[i] j = i - 1 while j >= 0 and A[j] > key: A[j+1] = A[j] j = j - 1 A[j+1] = key print(' '.join([str(item) for item in A]))
Traceback (most recent call last): File "/tmp/tmp06j46aqd/tmpw8wndm6c.py", line 1, in <module> input = input().split() ^^^^^^^ EOFError: EOF when reading a line
s515428144
p02255
u231136358
1471770883
Python
Python3
py
Runtime Error
0
0
294
x = input().split() A = [int(item) for item in x] N = A.pop(0) print(' '.join([str(item) for item in A])) for i in range(1, N): key = A[i] j = i - 1 while j >= 0 and A[j] > key: A[j+1] = A[j] j = j - 1 A[j+1] = key print(' '.join([str(item) for item in A]))
Traceback (most recent call last): File "/tmp/tmpv_b00x4k/tmpkc8zshtp.py", line 1, in <module> x = input().split() ^^^^^^^ EOFError: EOF when reading a line
s536587079
p02255
u231136358
1471772323
Python
Python3
py
Runtime Error
0
0
254
A = [5, 2, 4, 6, 1, 3] print(' '.join([str(item) for item in A])) for i in range(1, N): key = A[i] j = i - 1 while j >= 0 and A[j] > key: A[j+1] = A[j] j = j - 1 A[j+1] = key print(' '.join([str(item) for item in A]))
Traceback (most recent call last): File "/tmp/tmpdsty_s8q/tmp8540gl1l.py", line 4, in <module> for i in range(1, N): ^ NameError: name 'N' is not defined
5 2 4 6 1 3
s672237250
p02255
u390995924
1472557257
Python
Python3
py
Runtime Error
0
0
200
_ = input() A = [int(i) for i in input().split(" ")] for i in range(1, len(A)): print(" ".join(A)) key = A[i] j = i - 1 while j >= 0 and A[j] > key: A[j + 1] = A[j] j -= 1 A[j] = key
Traceback (most recent call last): File "/tmp/tmp3t9xnn16/tmpxpayfqjr.py", line 1, in <module> _ = input() ^^^^^^^ EOFError: EOF when reading a line
s289406158
p02255
u390995924
1472557627
Python
Python3
py
Runtime Error
0
0
204
_ = input() A = [int(i) for i in input().split(" ")] for i in range(1, len(A)): print(" ".join(A)) key = A[i] j = i - 1 while j >= 0 and A[j] > key: A[j + 1] = A[j] j -= 1 A[j + 1] = key
Traceback (most recent call last): File "/tmp/tmpeiuv2gwt/tmpc3wvty3q.py", line 1, in <module> _ = input() ^^^^^^^ EOFError: EOF when reading a line
s072262288
p02255
u756595712
1474770170
Python
Python3
py
Runtime Error
0
0
452
def insertionSort(_list, _length): for i in range(1, _length): ll = [str(_l) for _l in _list] print(' '.join(ll)) val = _list[i] j = i - 1 while j >= 0 and _list[j] > val: _list[j+1] = _list[j] j -= 1 _list[j+1] = val ll = [str(_l) for _l in _list] print(' '.join(ll)) import sys length = input() eles = map(int, sys.stdin.readlines()) insertionSort(eles, length)
Traceback (most recent call last): File "/tmp/tmpysh6jvj_/tmpwt5jx50p.py", line 17, in <module> length = input() ^^^^^^^ EOFError: EOF when reading a line
s078974950
p02255
u756595712
1474770282
Python
Python3
py
Runtime Error
0
0
472
def insertionSort(_list, _length): for i in range(1, _length): ll = [str(_l) for _l in _list] print(' '.join(ll)) val = _list[i] j = i - 1 while j >= 0 and _list[j] > val: _list[j+1] = _list[j] j -= 1 _list[j+1] = val ll = [str(_l) for _l in _list] print(' '.join(ll)) import sys length = input() eles = map(int, sys.stdin.readlines().rstrip().split(' ')) insertionSort(eles, length)
Traceback (most recent call last): File "/tmp/tmpnko2iul1/tmp3jvv8zn0.py", line 17, in <module> length = input() ^^^^^^^ EOFError: EOF when reading a line
s311156647
p02255
u756595712
1474770322
Python
Python3
py
Runtime Error
0
0
101
import sys length = input() eles = map(int, sys.stdin.readlines().rstrip().split(' ')) print(eles)
Traceback (most recent call last): File "/tmp/tmpclph6hon/tmp8jw20kf8.py", line 3, in <module> length = input() ^^^^^^^ EOFError: EOF when reading a line
s073517895
p02255
u756595712
1474770455
Python
Python3
py
Runtime Error
0
0
451
def insertionSort(_list, _length): for i in range(1, _length): ll = [str(_l) for _l in _list] print(' '.join(ll)) val = _list[i] j = i - 1 while j >= 0 and _list[j] > val: _list[j+1] = _list[j] j -= 1 _list[j+1] = val ll = [str(_l) for _l in _list] print(' '.join(ll)) length = input() eles = [ele for ele in input().rstrip().split(' ')] insertionSort(eles, length)
Traceback (most recent call last): File "/tmp/tmptftne6t3/tmptni7l0b2.py", line 14, in <module> length = input() ^^^^^^^ EOFError: EOF when reading a line
s122585702
p02255
u756595712
1474771048
Python
Python3
py
Runtime Error
0
0
240
length = int(input()) eles = list(map(int, input().split())) for i in range(_length): val = _list[i] j = i - 1 while j >= 0 and _list[j] > val: _list[j+1] = _list[j] j -= 1 _list[j+1] = val print(*_list)
Traceback (most recent call last): File "/tmp/tmp8a3xa_05/tmpdh06v1rf.py", line 1, in <module> length = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s108964903
p02255
u743390845
1477582192
Python
Python3
py
Runtime Error
0
0
296
n= int(input()) l= list(map(int,input().split())) s= '' for k in l: s+=' '+str(k) print(s) for m in range(n-1): j=m+1 if(l[j-1]>l[j]): i=j while(not i==0): if(not(l[i-1]<l[i])): l[i-1],l[i]= l[i],l[i-1] i-=1 else: break s= '' for k in l: s+=' '+str(k) print(s)
File "/tmp/tmp8_x5utsw/tmp44wtkd3e.py", line 5 for k in l: IndentationError: unexpected indent
s422961992
p02255
u831244171
1477667526
Python
Python
py
Runtime Error
0
0
198
N = input() n = list(map(int,input().split())) for i in range(1,int(N)): v = n[i] j = i - 1 while j >= 0 and v < n[j]: n[j+1] = n[j] j = j - 1 n[j+1] = v print(n)
Traceback (most recent call last): File "/tmp/tmpb58osp08/tmphmj74xk5.py", line 1, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s251123174
p02255
u831244171
1477667644
Python
Python
py
Runtime Error
0
0
252
N = input() n = list(map(int,raw_input().split())) for i in range(1,int(N)): v = n[i] j = i - 1 while j >= 0 and v < n[j]: n[j+1] = n[j] j = j - 1 n[j+1] = v print(n.replace("[","").replace(",","").replace("]","")))
File "/tmp/tmp4tx62_dj/tmpxy4p82dh.py", line 11 print(n.replace("[","").replace(",","").replace("]",""))) ^ SyntaxError: unmatched ')'
s811841124
p02255
u831244171
1477667678
Python
Python
py
Runtime Error
0
0
251
N = input() n = list(map(int,raw_input().split())) for i in range(1,int(N)): v = n[i] j = i - 1 while j >= 0 and v < n[j]: n[j+1] = n[j] j = j - 1 n[j+1] = v print(n.replace("[","").replace(",","").replace("]",""))
Traceback (most recent call last): File "/tmp/tmpytevwx47/tmp6ertr0gk.py", line 1, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s724771706
p02255
u022407960
1477842139
Python
Python
py
Runtime Error
0
0
768
#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function class Solution: """ @param prices: Given an integer array @return: Maximum profit """ @staticmethod def insertion_sort(): # write your code here array_length = raw_input() unsorted_array = list(map(int, raw_input().split())) for i in range(1, array_length): v = unsorted_array[i] j = i - 1 while j >= 0 and unsorted_array[j] > v: unsorted_array[j + 1] = unsorted_array[j] j -= 1 unsorted_array[j + 1] = v print(" ".join(str(i) for i in unsorted_array)) if __name__ == '__main__': solution = Solution() solution.insertion_sort()
Traceback (most recent call last): File "/tmp/tmpxzow5o88/tmp9s51wbdu.py", line 31, in <module> solution.insertion_sort() File "/tmp/tmpxzow5o88/tmp9s51wbdu.py", line 16, in insertion_sort array_length = raw_input() ^^^^^^^^^ NameError: name 'raw_input' is not defined
s540388617
p02255
u022407960
1477842233
Python
Python3
py
Runtime Error
0
0
768
#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function class Solution: """ @param prices: Given an integer array @return: Maximum profit """ @staticmethod def insertion_sort(): # write your code here array_length = raw_input() unsorted_array = list(map(int, raw_input().split())) for i in range(1, array_length): v = unsorted_array[i] j = i - 1 while j >= 0 and unsorted_array[j] > v: unsorted_array[j + 1] = unsorted_array[j] j -= 1 unsorted_array[j + 1] = v print(" ".join(str(i) for i in unsorted_array)) if __name__ == '__main__': solution = Solution() solution.insertion_sort()
Traceback (most recent call last): File "/tmp/tmpon5noa6a/tmp9g63jt33.py", line 31, in <module> solution.insertion_sort() File "/tmp/tmpon5noa6a/tmp9g63jt33.py", line 16, in insertion_sort array_length = raw_input() ^^^^^^^^^ NameError: name 'raw_input' is not defined
s868336867
p02255
u022407960
1477842427
Python
Python
py
Runtime Error
0
0
344
array_length = raw_input() unsorted_array = list(map(int, raw_input().split())) for i in range(1, array_length): v = unsorted_array[i] j = i - 1 while j >= 0 and unsorted_array[j] > v: unsorted_array[j + 1] = unsorted_array[j] j -= 1 unsorted_array[j + 1] = v print(" ".join(str(i) for i in unsorted_array))
Traceback (most recent call last): File "/tmp/tmpravjlnmv/tmp37ue3zne.py", line 1, in <module> array_length = raw_input() ^^^^^^^^^ NameError: name 'raw_input' is not defined
s325355342
p02255
u022407960
1477842549
Python
Python
py
Runtime Error
0
0
341
array_length = raw_input() unsorted_array = list(map(int, raw_input().split())) for i in range(array_length): v = unsorted_array[i] j = i - 1 while j >= 0 and unsorted_array[j] > v: unsorted_array[j + 1] = unsorted_array[j] j -= 1 unsorted_array[j + 1] = v print(" ".join(str(i) for i in unsorted_array))
Traceback (most recent call last): File "/tmp/tmpdokwilzj/tmpjf5x1d10.py", line 1, in <module> array_length = raw_input() ^^^^^^^^^ NameError: name 'raw_input' is not defined
s988306976
p02255
u022407960
1477842599
Python
Python
py
Runtime Error
0
0
344
array_length = raw_input() unsorted_array = list(map(int, raw_input().split())) for i in range(1, array_length): v = unsorted_array[i] j = i - 1 while j >= 0 and unsorted_array[j] > v: unsorted_array[j + 1] = unsorted_array[j] j -= 1 unsorted_array[j + 1] = v print(" ".join(str(i) for i in unsorted_array))
Traceback (most recent call last): File "/tmp/tmpl4wyx_9o/tmp12js0amo.py", line 1, in <module> array_length = raw_input() ^^^^^^^^^ NameError: name 'raw_input' is not defined