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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s090841183 | p02265 | u777299405 | 1437125951 | Python | Python3 | py | Runtime Error | 30 | 6732 | 360 | from collections import deque
n = int(input())
que = deque()
for i in range(n):
command = input()
if command == "deleteFirst":
que.popleft()
elif command == "deleteLast":
que.pop()
else:
a, b = command.split()
if a == "insert":
que.appendleft(b)
else... | Traceback (most recent call last):
File "/tmp/tmpe3nz1lft/tmp_qdmvh56.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s614072716 | p02265 | u669284080 | 1438152447 | Python | Python | py | Runtime Error | 0 | 0 | 346 | n = int(raw_input())
R = []
for i in xrange(n):
L = raw_input().split()
order = L[0]
value = int(L[1])
if order == 'insert':
R.insert(0, value)
if order == 'delete':
R.remove(value)
if order == 'deleteFirst':
R.pop()
if order == 'deleteLast':
R.pop(len(R)-1)
p... | File "/tmp/tmpjf4fpi92/tmpveumhc6r.py", line 15
print ' '.join(map(str, R))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s937386570 | p02265 | u669284080 | 1438152750 | Python | Python | py | Runtime Error | 20 | 4224 | 376 | n = int(raw_input())
R = []
for i in xrange(n):
L = raw_input().split()
order = L[0]
value = 0
if len(L) > 1:
value = int(L[1])
if order == 'insert':
R.insert(0, value)
if order == 'delete':
R.remove(value)
if order == 'deleteFirst':
R.pop(0)
if order == '... | File "/tmp/tmpgehvc3qp/tmp9hlxg6oa.py", line 17
print ' '.join(map(str, R))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s195309854 | p02265 | u669360983 | 1438665706 | Python | Python | py | Runtime Error | 0 | 0 | 246 | list=[]
n=int(raw_input())
for i in range(n):
inst,value=raw_input().split()
if inst=='insert':
list.insert(0,int(value))
elif inst=='delete':
list.remove(int(value))
elif inst=='deleteFirst':
del list[0]
else :list.pop()
print list
| File "/tmp/tmp0kckdjl0/tmpz035115p.py", line 12
print list
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s672823429 | p02265 | u669360983 | 1438665740 | Python | Python | py | Runtime Error | 0 | 0 | 243 | list=[]
n=int(raw_input())
for i in range(n):
inst,value=raw_input().split()
if inst=='insert':
list.insert(0,int(value))
elif inst=='delete':
list.remove(int(value))
elif inst=='deleteFirst':
del list[0]
else :list.pop()
print list | File "/tmp/tmpj_tbtkss/tmp7_nhb0kn.py", line 12
print list
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s105573423 | p02265 | u669360983 | 1438666443 | Python | Python | py | Runtime Error | 10 | 4220 | 267 | list=[]
n=int(raw_input())
for i in range(n):
inst=raw_input().split()
if inst[0]=='insert':
list.insert(0,int(inst[1]))
elif inst[0]=='delete':
list.remove(int(inst[1]))
elif inst[0]=='deleteFirst':
del list[0]
else :list.pop()
for i in list:
print i, | File "/tmp/tmpgd326hvq/tmpq0mvfyiv.py", line 15
print i,
^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s509585812 | p02265 | u237991875 | 1442301291 | Python | Python | py | Runtime Error | 10 | 6336 | 283 | A = []
n = int(raw_input())
stack = []
for i in range(n):
A.append(raw_input())
for i in A:
if "insert" in i:
stack.insert(0, i[7:])
elif "delete " in i:
stack.remove(i[7:])
elif "deleteFirst" in i:
stack.pop(0)
elif "deleteLast" in i:
stack.pop()
print " ".join(stack) | File "/tmp/tmpcm6t6e9w/tmpmr5p_xvb.py", line 16
print " ".join(stack)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s018231946 | p02265 | u237991875 | 1442301474 | Python | Python | py | Runtime Error | 10 | 6264 | 283 | A = []
n = int(raw_input())
stack = []
for i in range(n):
A.append(raw_input())
for i in A:
if "insert" in i:
stack.insert(0, i[7:])
elif "delete " in i:
stack.remove(i[7:])
elif "deleteFirst" in i:
stack.pop(0)
elif "deleteLast" in i:
stack.pop()
print " ".join(stack) | File "/tmp/tmpj019iltu/tmpm8nbf4_e.py", line 16
print " ".join(stack)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s155979215 | p02265 | u237991875 | 1442301624 | Python | Python | py | Runtime Error | 10 | 6312 | 340 | A = []
n = int(raw_input())
stack = []
for i in range(n):
A.append(raw_input())
for i in A:
if "insert" in i:
stack.insert(0, i[7:])
elif "delete " in i and len(stack) > 0:
stack.remove(i[7:])
elif "deleteFirst" in i and len(stack) > 0:
stack.pop(0)
elif "deleteLast" in i and len(stack) > 0:
stack.pop()
p... | File "/tmp/tmpv3pc1t0u/tmparvrszle.py", line 16
print " ".join(stack)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s421260658 | p02265 | u237991875 | 1442302616 | Python | Python | py | Runtime Error | 10 | 6256 | 363 | A = []
n = int(raw_input())
stack = []
for i in range(n):
A.append(raw_input())
for i in A:
if "insert" in i:
stack.insert(0, i[7:])
elif "delete " in i and len(stack) > 0:
stack.remove(i[7:])
elif "deleteFirst" in i and len(stack) > 0:
stack.pop(0)
elif "deleteLast" in i and len(stack) > 0:
stack.pop()
i... | File "/tmp/tmp02613a4d/tmp58cehrof.py", line 17
print " ".join(stack)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s761782350 | p02265 | u237991875 | 1442302718 | Python | Python | py | Runtime Error | 10 | 6276 | 383 | A = []
n = int(raw_input())
stack = []
for i in range(n):
A.append(raw_input())
for i in A:
if "insert" in i:
stack.insert(0, int(i[7:]))
elif "delete " in i and len(stack) > 0:
stack.remove(int(i[7:]))
elif "deleteFirst" in i and len(stack) > 0:
stack.pop(0)
elif "deleteLast" in i and len(stack) > 0:
sta... | File "/tmp/tmpn2d7_yij/tmp9lwxit5_.py", line 17
print " ".join(map(str, stack))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s640146720 | p02265 | u237991875 | 1442304103 | Python | Python | py | Runtime Error | 0 | 0 | 342 | from collections import deque
n = int(raw_input())
stack = deque()
for i in range(n):
i = raw_input()
if "insert" in i:
stack.insert(0, int(i[7:]))
elif "delete " in i:
if int(i[7:]) in stack:
stack.remove(int(i[7:]))
elif "deleteFirst" in i:
stack.pop(0)
elif "deleteLast" in i:
stack.pop()
print " "... | File "/tmp/tmps5a793xk/tmpojwwgm6z.py", line 15
print " ".join(map(str, stack))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s238376346 | p02265 | u237991875 | 1442304278 | Python | Python | py | Runtime Error | 0 | 0 | 341 | from collections import deque
n = int(raw_input())
stack = []
for i in range(n):
i = raw_input()
if "insert" in i:
stack.appendleft(int(i[7:]))
elif "delete " in i:
if int(i[7:]) in stack:
stack.remove(int(i[7:]))
elif "deleteFirst" in i:
stack.popleft()
elif "deleteLast" in i:
stack.pop()
print " ".... | File "/tmp/tmphyogiyu5/tmpif8rvq9i.py", line 15
print " ".join(map(str, stack))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s583845226 | p02265 | u408701661 | 1442331475 | Python | Python | py | Runtime Error | 10 | 6352 | 2595 | #!/usr/bin/python
# -*- coding:utf-8 -*-
class Node(object):
def __init__(self, data, prev_node, next_node):
self.data = data
self.prev_node = prev_node
self.next_node = next_node
class DoubleList(object):
head = None
tail = None
def insert(self, data):
new_node = Node... | File "/tmp/tmp9tkl3qol/tmp1al0paia.py", line 59
print data[:-1]
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s228632935 | p02265 | u408701661 | 1442331507 | Python | Python | py | Runtime Error | 10 | 6336 | 2595 | #!/usr/bin/python
# -*- coding:utf-8 -*-
class Node(object):
def __init__(self, data, prev_node, next_node):
self.data = data
self.prev_node = prev_node
self.next_node = next_node
class DoubleList(object):
head = None
tail = None
def insert(self, data):
new_node = Node... | File "/tmp/tmp6xjzrhd5/tmpsqs1zhq2.py", line 59
print data[:-1]
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s996228869 | p02265 | u408701661 | 1442332532 | Python | Python | py | Runtime Error | 10 | 6404 | 2595 | #!/usr/bin/python
# -*- coding:utf-8 -*-
class Node(object):
def __init__(self, data, prev_node, next_node):
self.data = data
self.prev_node = prev_node
self.next_node = next_node
class DoubleList(object):
head = None
tail = None
def insert(self, data):
new_node = Node... | File "/tmp/tmpxbc19vlu/tmpgppjdu29.py", line 59
print data[:-1]
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s771988927 | p02265 | u408701661 | 1442332764 | Python | Python | py | Runtime Error | 10 | 6404 | 2621 | #!/usr/bin/python
# -*- coding:utf-8 -*-
class Node(object):
def __init__(self, data, prev_node, next_node):
self.data = data
self.prev_node = prev_node
self.next_node = next_node
class DoubleList(object):
head = None
tail = None
def insert(self, data):
new_node = Node... | File "/tmp/tmp3z6nzkn3/tmpigxv5b5d.py", line 60
print data[:-1]
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s112560289 | p02265 | u019737947 | 1442369532 | Python | Python | py | Runtime Error | 10 | 6292 | 302 | n = int(raw_input())
L = list()
for i in range(n):
S = raw_input().split(" ")
if S[0] == "insert":
L.insert(0, S[1])
elif S[0] == "delete":
L.remove(S[1])
elif S[0] == "deleteFirst":
L.pop(0)
elif S[0] == "deleteLast":
L.pop()
print " ".join(L) | File "/tmp/tmpaauvxwfa/tmpdfv_dca4.py", line 18
print " ".join(L)
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s447017680 | p02265 | u386372280 | 1442369744 | Python | Python | py | Runtime Error | 10 | 6356 | 721 | import sys
DLL = []
def insert(x):
DLL.insert(0, x)
def delete(x):
DLL.remove(x)
def deleteFirst():
DLL.pop(0)
def deleteLast():
DLL.pop(-1)
def main(commands):
for command in commands:
vals = command.strip().split(" ")
com = vals[0]
if len(vals) == 2:
num... | File "/tmp/tmploaykev6/tmprp6xuc95.py", line 41
print " ".join(DLL)
^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s975948879 | p02265 | u019737947 | 1442369764 | Python | Python | py | Runtime Error | 10 | 6340 | 304 | n = int(raw_input())
L = list()
for i in range(n):
S = raw_input().split(" ")
if S[0] == "insert":
L.insert(0, S[1])
elif S[0] == "delete":
L.remove(S[1])
elif S[0] == "deleteFirst":
L.pop(0)
elif S[0] == "deleteLast":
L.pop(-1)
print " ".join(L) | File "/tmp/tmp9_2sm0rf/tmp34ci4lti.py", line 18
print " ".join(L)
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s284185455 | p02265 | u386372280 | 1442369914 | Python | Python | py | Runtime Error | 10 | 6364 | 796 | import sys
DLL = []
def insert(x):
DLL.insert(0, x)
def delete(x):
if len(DLL) > 0:
DLL.remove(x)
def deleteFirst():
if len(DLL) > 0:
DLL.pop(0)
def deleteLast():
if len(DLL) > 0:
DLL.pop(-1)
def main(commands):
for command in commands:
vals = command.strip().... | File "/tmp/tmp1jzzoak4/tmprsp1u3uo.py", line 44
print " ".join(DLL)
^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s768227448 | p02265 | u197445199 | 1442370707 | Python | Python | py | Runtime Error | 0 | 0 | 748 | N = int(raw_input())
A = []
B = []
def insert(B, x):
B.insert(0, x)
return B
def delete(B, x):
i = 0
for num in B:
if num == x:
B.pop(i)
break
i += 1
return B
def deleteFirst(B):
B.pop(0)
return B
def deleteLast(B):
B.pop()
return B
operation ... | File "/tmp/tmppl1c378j/tmp22wu_0uy.py", line 40
print ' '.join(B)
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s602064016 | p02265 | u894381890 | 1442370950 | Python | Python | py | Runtime Error | 10 | 6364 | 489 | import sys
def isEmpty(S):
if len(S) == 0:
return True
def isFull(S):
if len(S) >= 100000:
return True
n = sys.stdin.readline()
n = int(n)
a = 0
S = []
for i in range(n):
text = raw_input()
x_list = text.split()
if x_list[0] == 'insert':
S.insert(0, x_list[1])
a += 1
elif x_list[0] ==... | File "/tmp/tmp9djfdsys/tmp65mjrd1_.py", line 36
print S[i],
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s828628790 | p02265 | u894381890 | 1442371357 | Python | Python | py | Runtime Error | 10 | 6328 | 489 | import sys
def isEmpty(S):
if len(S) == 0:
return True
def isFull(S):
if len(S) >= 100000:
return True
n = sys.stdin.readline()
n = int(n)
a = 0
S = []
for i in range(n):
text = raw_input()
x_list = text.split()
if x_list[0] == 'insert':
S.insert(0, x_list[1])
a += 1
elif x_list[0] ==... | File "/tmp/tmp2u75sqzu/tmpsqraqmci.py", line 36
print S[i],
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s124201203 | p02265 | u894381890 | 1442371853 | Python | Python | py | Runtime Error | 10 | 6300 | 408 | import sys
n = sys.stdin.readline()
n = int(n)
a = 0
S = []
for i in range(n):
text = raw_input()
x_list = text.split()
if x_list[0] == 'insert':
S.insert(0, x_list[1])
a += 1
elif x_list[0] == 'delete':
S.remove(x_list[1])
a -= 1
elif x_list[0] == 'deleteFirst':
S.pop(0)
a -= 1
e... | File "/tmp/tmpw1s39p9h/tmpb04f_h04.py", line 25
print " ".join(S)
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s444423935 | p02265 | u197445199 | 1442371905 | Python | Python | py | Runtime Error | 10 | 6372 | 685 | N = int(raw_input())
A = []
B = []
def insert(B, x):
B.insert(0, x)
return B
def delete(B, x):
B.remove(x)
return B
def deleteFirst(B):
B.pop(0)
return B
def deleteLast(B):
B.pop()
return B
operation = {'insert':insert, 'delete':delete, 'deleteFirst':deleteFirst, 'deleteLast':deleteLast... | File "/tmp/tmp9rh2c2o7/tmpgo4_rlu5.py", line 36
print ' '.join(B_str)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s807402039 | p02265 | u949338836 | 1444460309 | Python | Python3 | py | Runtime Error | 40 | 7920 | 369 | #coding:utf-8
#1_3_C
from collections import deque
n = int(input())
ary = deque()
for i in range(n):
cmd = input().split()
if cmd[0] == "insert":
ary.appendleft(cmd[1])
elif cmd[0] == "delete":
ary.remove(cmd[1])
elif cmd[0] == "deleteFirst":
ary.popleft()
elif cmd[0] == "del... | Traceback (most recent call last):
File "/tmp/tmpgughcbcp/tmpyqqxqk5t.py", line 4, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s427344908 | p02265 | u224288634 | 1445609832 | Python | Python | py | Runtime Error | 10 | 6348 | 288 | n=input()
List=[]
for i in range(n):
command=raw_input().split()
if command[0]=="insert":
ll=[]
ll.append(command[1])
List=ll+List
elif command[0]=="delete":
List.remove(command[1])
elif command[0]=="deleteFirst":
List=List[1:]
else :
List=List[:-1]
print(" ".join(List)) | Traceback (most recent call last):
File "/tmp/tmp5bdf8r7k/tmppzui4it8.py", line 1, in <module>
n=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s683960488 | p02265 | u224288634 | 1445610027 | Python | Python | py | Runtime Error | 10 | 6368 | 307 | n=input()
List=[]
for i in range(n):
command=raw_input().split()
if command[0]=="insert":
ll=[]
ll.append(int(command[1]))
List=ll+List
elif command[0]=="delete":
List.remove(int(command[1]))
elif command[0]=="deleteFirst":
List=List[1:]
else :
List=List[:-1]
print(" ".join(map(str,List))) | Traceback (most recent call last):
File "/tmp/tmpeei_zv_8/tmpwiivr45t.py", line 1, in <module>
n=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s574175745 | p02265 | u224288634 | 1445610180 | Python | Python | py | Runtime Error | 10 | 6320 | 307 | n=input()
List=[]
for i in range(n):
command=raw_input().split()
if command[0]=="insert":
ll=[]
ll.append(int(command[1]))
List=ll+List
elif command[0]=="delete":
List.remove(int(command[1]))
elif command[0]=="deleteFirst":
List=List[1:]
else :
List=List[:-1]
print(" ".join(map(str,List))) | Traceback (most recent call last):
File "/tmp/tmpoufv0f_v/tmpv70h903w.py", line 1, in <module>
n=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s397175708 | p02265 | u766163292 | 1446536359 | Python | Python3 | py | Runtime Error | 30 | 8060 | 562 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import collections
def process(commands):
queue = collections.deque()
for c in commands:
if "insert" in c:
queue.appendleft(int(c[7:]))
elif "deleteFirst" in c:
_ = queue.popleft()
elif "deleteLast" in c:
... | Traceback (most recent call last):
File "/tmp/tmp9xbnv6bf/tmpkgiu60am.py", line 27, in <module>
main()
File "/tmp/tmp9xbnv6bf/tmpkgiu60am.py", line 22, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s054574291 | p02265 | u960191521 | 1447558246 | Python | Python | py | Runtime Error | 0 | 0 | 354 | # -*- coding: utf-8 -*-
n = input()
list = []
for i in xrange(n):
command, key = raw_input().split()
if command == "insert":
list.insert(0, key)
elif command == "delete":
list.remove(key)
elif command == "deleteFirst":
list.pop(0)
elif command == "deleteLast":
list.p... | File "/tmp/tmpiyjg78sh/tmp7hi_q9m4.py", line 16
print " ".join(list)
^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s507804468 | p02265 | u960191521 | 1447558519 | Python | Python | py | Runtime Error | 10 | 6352 | 375 | # -*- coding: utf-8 -*-
n = input()
list = []
for i in xrange(n):
command = raw_input().split()
if command[0] == "insert":
list.insert(0, command[1])
elif command[0] == "delete":
list.remove(command[1])
elif command[0] == "deleteFirst":
list.pop(0)
elif command[0] == "delete... | File "/tmp/tmp6tn9xycy/tmpc41__lvd.py", line 16
print " ".join(list)
^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s121206803 | p02265 | u960191521 | 1447561576 | Python | Python | py | Runtime Error | 0 | 0 | 585 | # -*- coding: utf-8 -*-
import numpy as np
n = input()
list = np.array([], dtype=long)
for i in xrange(n):
command = raw_input().split()
if command[0] == "insert":
list = np.append(int(command[1]), list)
elif command[0] == "delete":
key = int(command[1])
for i in xrange(len(list)):... | File "/tmp/tmpzb6ultoa/tmpq2zfvmlz.py", line 21
print " ".join(map(str,list))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s250217355 | p02265 | u960191521 | 1447569077 | Python | Python | py | Runtime Error | 0 | 0 | 347 | # -*- coding: utf-8 -*-
n = input()
l = []
tail = 0
for i in xrange(n):
cmd = raw_input().split()
if cmd[0] == "insert":
l.append(cmd[1])
elif cmd[0] == "delete":
l.pop(l.lindex(cmd[1]))
elif cmd[0] == "deleteFirst":
l.pop()
elif cmd[0] == "deleteLast":
tail += 1
pri... | File "/tmp/tmppfzwozgp/tmpcyuqx7en.py", line 16
print " ".join(l[tail:][::-1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s223621999 | p02265 | u960191521 | 1447569441 | Python | Python | py | Runtime Error | 10 | 6328 | 364 | # -*- coding: utf-8 -*-
n = input()
l = []
tail = 0
for i in xrange(n):
cmd = raw_input().split()
if cmd[0] == "insert":
l.append(cmd[1])
elif cmd[0] == "delete":
l.pop(len(l) - l[::-1].index(cmd[1]) -1)
elif cmd[0] == "deleteFirst":
l.pop()
elif cmd[0] == "deleteLast":
... | File "/tmp/tmpl8s8q4n9/tmpzu2i4xgv.py", line 16
print " ".join(l[tail:][::-1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s808964232 | p02265 | u881590806 | 1447582787 | Python | Python | py | Runtime Error | 10 | 6384 | 1939 | class Node:
def __init__(self,v):
self.next = None
self.prev = None
self.data = v
class DoublyLinkedList:
def __init__(self):
self.head = None
self.tail = None
def __str__(self):
ret = ''
n = self.head
while True:
if n == None:
... | File "/tmp/tmpx6jiceo_/tmpvcij6gdy.py", line 86
print l
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s655604227 | p02265 | u963402991 | 1448596431 | Python | Python3 | py | Runtime Error | 20 | 7708 | 366 | # -*- coding:utf-8 -*-
n = int(input())
command = [input().split() for i in range(n)]
ans = []
for i in range(n):
if command[i][0] == "insert":
ans.insert(0, command[i][1])
elif command[i][0] == "delete":
ans.remove(command[i][1])
elif command[i][0] == "deleteFirst":
ans.pop(0)
... | Traceback (most recent call last):
File "/tmp/tmp_gth590g/tmp6q7a_qpm.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s870811994 | p02265 | u963402991 | 1448596999 | Python | Python3 | py | Runtime Error | 20 | 7684 | 342 | n = int(input())
command = [input().split() for i in range(n)]
ans = []
for i in range(n):
if command[i][0] == "insert":
ans.insert(0, command[i][1])
elif command[i][0] == "delete":
ans.remove(command[i][1])
elif command[i][0] == "deleteFirst":
ans.pop(0)
else:
ans.pop()
... | Traceback (most recent call last):
File "/tmp/tmpz1nhfn3k/tmpwg28cv5h.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s266562824 | p02265 | u963402991 | 1448597498 | Python | Python3 | py | Runtime Error | 0 | 0 | 395 | # -*- coding:utf-8 -*-
import sys
n = int(sys.stdin.readline())
command = [sys.stdin.readline() for i in range(n)]
ans = []
for i in range(n):
if command[i][0] == "insert":
ans.insert(0, command[i][1])
elif command[i][0] == "delete":
ans.remove(command[i][1])
elif command[i][0] == "deleteFi... | Traceback (most recent call last):
File "/tmp/tmpkyhvw7jq/tmp6iqgp4f8.py", line 4, in <module>
n = int(sys.stdin.readline())
^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s115991133 | p02265 | u963402991 | 1448611272 | Python | Python3 | py | Runtime Error | 20 | 7752 | 392 | # -*- coding:utf-8 -*-
import sys
n = int(input())
command = []
command = [ input().split() for i in range(n)]
ans = []
for i in range(n):
if command[i][0] == "insert":
ans.insert(0, command[i][1])
elif command[i][0] == "delete":
ans.remove(command[i][1])
elif command[i][0] == "deleteFirst... | Traceback (most recent call last):
File "/tmp/tmpdiekopdh/tmp7e822g2i.py", line 4, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s381656702 | p02265 | u963402991 | 1448612038 | Python | Python3 | py | Runtime Error | 20 | 7668 | 336 | # -*- coding:utf-8 -*-
n = int(input())
ans = []
for i in range(n):
command = input().split()
if command[0] == "insert":
ans.insert(0, command[1])
elif command[0] == "delete":
ans.remove(command[1])
elif command[0] == "deleteFirst":
ans.pop(0)
else:
ans.pop()
print... | Traceback (most recent call last):
File "/tmp/tmpwhr6g9k6/tmprftexju9.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s586923866 | p02265 | u317901693 | 1450407868 | Python | Python3 | py | Runtime Error | 30 | 8000 | 555 | from collections import deque
def insert(x, dll):
dll.appendleft(x)
def delete(x, dll):
dll.remove(x)
def deleteFirst(dll):
dll.popleft()
def deleteLast(dll):
dll.pop()
n = int(input())
command1 = {"insert": insert, "delete": delete}
command2 = {"deleteFirst": deleteFirst, "deleteLast": deleteLast}... | Traceback (most recent call last):
File "/tmp/tmpqb5q0k1l/tmpme5ygnq_.py", line 15, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s849691043 | p02265 | u317901693 | 1450409034 | Python | Python3 | py | Runtime Error | 0 | 0 | 480 | from collections import deque
f = open("input.txt")
n = int(f.readline())
dll = deque()
for i in range(n):
input_line = [str(s) for s in f.readline().split()]
if input_line[0] == "insert":
dll.appendleft(int(input_line[1]))
elif input_line[0] == "delete":
try:
dll.remove(int(in... | Traceback (most recent call last):
File "/tmp/tmpubo0g_30/tmpbg881ivm.py", line 3, in <module>
f = open("input.txt")
^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'input.txt'
| |
s542279448 | p02265 | u317901693 | 1450409880 | Python | Python3 | py | Runtime Error | 30 | 8000 | 386 | from collections import deque
n = int(input())
dll = deque()
for i in range(n):
input_line = [str(s) for s in input().split()]
if input_line[0] == "insert":
dll.appendleft(int(input_line[1]))
elif input_line[0] == "delete":
dll.remove(int(input_line[1]))
elif input_line[0] == "deleteFir... | Traceback (most recent call last):
File "/tmp/tmptb1o9uod/tmp94tgh8xr.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s449991448 | p02265 | u797673668 | 1452359073 | Python | Python3 | py | Runtime Error | 70 | 8332 | 399 | from functools import reduce
from collections import deque
def operate(dq, op):
if op[0] == 'i':
dq.appendleft(int(op[7:]))
else:
k = op[6]
if k == 'F':
dq.popleft()
elif k == 'L':
dq.pop()
else:
dq.remove(int(op[7:]))
return dq
... | Traceback (most recent call last):
File "/tmp/tmpy1f_dd1e/tmprh_oyvtk.py", line 19, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s981166971 | p02265 | u321017034 | 1454031429 | Python | Python3 | py | Runtime Error | 30 | 7744 | 330 | n = int(input())
l_l = list()
for i in range(n):
cmd_l = input().split()
cmd = cmd_l[0]
if cmd == "insert":
l_l.insert(0, cmd_l[1])
elif cmd == "delete":
l_l.remove(cmd_l[1])
elif cmd == "deleteFirst":
del l_l[0]
elif cmd == "deleteLast":
del l_l[-1]
print(' '.... | Traceback (most recent call last):
File "/tmp/tmpa1918rw_/tmp1oanve9s.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s584189304 | p02265 | u731710433 | 1455001039 | Python | Python3 | py | Runtime Error | 30 | 7984 | 310 | from collections import deque
dq = deque()
n = int(input())
for _ in range(n):
cmd = input().split()
if cmd[0] == "insert":
dq.appendleft(cmd[1])
elif cmd[0] == "delete":
dq.remove(cmd[1])
elif cmd[0] == "deleteFirst":
dq.popleft()
else:
dq.pop()
print(*dq) | Traceback (most recent call last):
File "/tmp/tmp4ie8i6pz/tmpbdp0bwr6.py", line 4, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s226360090 | p02265 | u193025715 | 1455378990 | Python | Python3 | py | Runtime Error | 30 | 7700 | 461 | n = int(input())
lists = []
for i in range(n):
inputs = input().split()
commandName = inputs[0]
if len(inputs) == 1:
if commandName == 'deleteFirst':
lists.pop(0)
elif commandName == 'deleteLast':
lists.pop(-1)
else:
num = inputs[1]
if commandNa... | Traceback (most recent call last):
File "/tmp/tmpc9pwkmob/tmp2sux9ort.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s476760904 | p02265 | u567281053 | 1456322737 | Python | Python | py | Runtime Error | 0 | 0 | 2148 | class DoublyLinkedList:
def __init__(self):
self.first = Node(-1)
self.first.setNext(Node(-1))
def insert(self, value):
newNode = Node(value)
newNode.setNext(self.first.getNext())
newNode.setPrev(self.first)
self.first.getNext().setPrev(newNode)
self.firs... | File "/tmp/tmpu2ynb8sd/tmpbkhy3duc.py", line 67
print self.value,
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s867957526 | p02265 | u567281053 | 1456322820 | Python | Python | py | Runtime Error | 10 | 6388 | 2177 | class DoublyLinkedList:
def __init__(self):
self.first = Node(-1)
self.first.setNext(Node(-1))
def insert(self, value):
newNode = Node(value)
newNode.setNext(self.first.getNext())
newNode.setPrev(self.first)
self.first.getNext().setPrev(newNode)
self.firs... | File "/tmp/tmp4i4udxyv/tmph385hu7a.py", line 67
print self.value,
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s915944412 | p02265 | u424209323 | 1456409360 | Python | Python | py | Runtime Error | 0 | 0 | 388 | A = []
n = input()
for i in range(n):
command = [0, 0]
temp = raw_input().split()
command[0] = temp[0]
command[1] = int(temp[1])
if command[0] == "insert":
A.insert(0, command[1])
elif command[0] == "delete":
A.remove(command[1])
elif command[0] == "deleteFirst":
A.... | File "/tmp/tmp5aoelzrw/tmpfnex_lkx.py", line 19
print A
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s749004472 | p02265 | u424209323 | 1456409489 | Python | Python | py | Runtime Error | 0 | 0 | 420 | A = []
n = input()
for i in range(n):
command = [0, 0]
temp = raw_input().split()
command[0] = temp[0]
command[1] = int(temp[1])
if command[0] == "insert":
A.insert(0, command[1])
elif command[0] == "delete":
A.remove(command[1])
elif command[0] == "deleteFirst":
A.... | File "/tmp/tmpyw9pt2bg/tmp2ju35zab.py", line 20
print A[i],
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s726381176 | p02265 | u424209323 | 1456409541 | Python | Python | py | Runtime Error | 0 | 0 | 420 | A = []
n = input()
for i in range(n):
command = [0, 0]
temp = raw_input().split()
command[0] = temp[0]
command[1] = int(temp[1])
if command[0] == 'insert':
A.insert(0, command[1])
elif command[0] == 'delete':
A.remove(command[1])
elif command[0] == 'deleteFirst':
A.... | File "/tmp/tmphpt0lsq3/tmp44vxjbr8.py", line 20
print A[i],
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s765424294 | p02265 | u424209323 | 1456410812 | Python | Python | py | Runtime Error | 10 | 6288 | 347 | A = []
n = input()
for i in range(n):
command = raw_input().split()
if command[0] == 'insert':
A.insert(0, command[1])
elif command[0] == 'delete':
A.remove(command[1])
elif command[0] == 'deleteFirst':
A.pop(0)
elif command[0] == 'deleteLast':
A.pop()
for i in ran... | File "/tmp/tmp4ugfu42j/tmpdmh0x4h6.py", line 17
print A[i],
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s716657716 | p02265 | u233232390 | 1456419726 | Python | Python | py | Runtime Error | 0 | 0 | 462 | A=[]
fp =0
bp =0
cmd = raw_input()
n=int(raw_input())
while n:
if s[0] == 'i':
A.append(int(s[7:]))
fp += 1
elif s[6] == ' ':
try:
i = A[::-1].index(int(s[7:]))
if i!=-1:
del A[-i-1]
fp -=1
except:
pass
elif... | File "/tmp/tmpcjct8zam/tmpxpavj1gd.py", line 26
print int(e),
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s641925511 | p02265 | u233232390 | 1456419758 | Python | Python | py | Runtime Error | 0 | 0 | 466 | A=[]
fp =0
bp =0
cmd = raw_input()
n=int(raw_input())
while n:
if cmd[0] == 'i':
A.append(int(s[7:]))
fp += 1
elif cmd[6] == ' ':
try:
i = A[::-1].index(int(s[7:]))
if i!=-1:
del A[-i-1]
fp -=1
except:
pass
... | File "/tmp/tmp_2i26i2e/tmp0x7756fa.py", line 26
print int(e),
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s654007999 | p02265 | u233232390 | 1456419779 | Python | Python | py | Runtime Error | 0 | 0 | 470 | A=[]
fp =0
bp =0
cmd = raw_input()
n=int(raw_input())
while n:
if cmd[0] == 'i':
A.append(int(cmd[7:]))
fp += 1
elif cmd[6] == ' ':
try:
i = A[::-1].index(int(cmd[7:]))
if i!=-1:
del A[-i-1]
fp -=1
except:
pass
... | File "/tmp/tmp4zapvpl2/tmpko6l06u0.py", line 26
print int(e),
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s985286834 | p02265 | u567281053 | 1456486070 | Python | Python | py | Runtime Error | 4640 | 69832 | 1491 | class DoublyLinkedList:
def __init__(self, value = -1):
self.value = value
self.prev = self
self.next = self
def insert(self, value):
newNode = DoublyLinkedList(value)
newNode.next = self.next
newNode.prev = self
self.next.prev = newNode
self.next... | File "/tmp/tmp_mksav1a/tmpuo9tqc45.py", line 35
print self.value,
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s223698366 | p02265 | u894114233 | 1456841205 | Python | Python | py | Runtime Error | 10 | 6456 | 444 | def insert(x,a):
a.insert(0,x)
return a
def delete(x,a):
a.remove(x)
return a
def deletefirst(a):
del a[0]
return a
def deletelast(a):
del a[-1]
return a
n=input()
a=[]
for i in xrange(n):
s=raw_input().split()
if s[0]=="insert":
insert(s[1],a)
elif s[0]=="delete":
... | Traceback (most recent call last):
File "/tmp/tmpaa9z671d/tmp5tr_97sa.py", line 13, in <module>
n=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s850083018 | p02265 | u572790226 | 1460350358 | Python | Python3 | py | Runtime Error | 20 | 7668 | 382 | n = int(input())
stack = []
for i in range(n):
command = list(input().split())
# print(stack, command)
if command[0] == 'insert':
stack = [command[1]] + stack
elif command[0] == 'delete':
stack.remove(command[1])
elif command[0] == 'deleteFirst':
stack.pop(0)
elif command[... | Traceback (most recent call last):
File "/tmp/tmplkxrzjei/tmpc14od0hg.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s403043127 | p02265 | u763534154 | 1462789348 | Python | Python | py | Runtime Error | 0 | 0 | 2274 | MAX_N = 2000000
class DoublyLinkedList(object):
def __init__(self):
self.list = [Node(0, 0, 0, 0)] * MAX_N
self.gen_node = node_generator()
nil = 0
self.nil_node = self.gen_node(0, nil, nil)
self.list[nil] = self.nil_node
def insert(self, x):
inserted = self.... | File "/tmp/tmpdfc3ldmg/tmp6xztt1mc.py", line 49
print ans.strip()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s424578832 | p02265 | u763534154 | 1462789360 | Python | Python | py | Runtime Error | 0 | 0 | 2270 | MAX_N = 200
class DoublyLinkedList(object):
def __init__(self):
self.list = [Node(0, 0, 0, 0)] * MAX_N
self.gen_node = node_generator()
nil = 0
self.nil_node = self.gen_node(0, nil, nil)
self.list[nil] = self.nil_node
def insert(self, x):
inserted = self.gen_... | File "/tmp/tmp56ke7rk7/tmp4mrxlvh8.py", line 49
print ans.strip()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s988296449 | p02265 | u763534154 | 1462789480 | Python | Python | py | Runtime Error | 60 | 21960 | 2282 | MAX_N = 2000000
class DoublyLinkedList(object):
def __init__(self):
self.list = [Node(0, 0, 0, 0)] * MAX_N
self.gen_node = node_generator()
nil = 0
self.nil_node = self.gen_node(0, nil, nil)
self.list[nil] = self.nil_node
def insert(self, x):
inserted = self.... | File "/tmp/tmpyinu7snq/tmpo1q953zf.py", line 49
print ans.strip()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s969545429 | p02265 | u763534154 | 1462790048 | Python | Python | py | Runtime Error | 10 | 6560 | 2297 | MAX_N = 20000
class DoublyLinkedList(object):
def __init__(self):
self.list = [Node(0, 0, 0, 0)] * MAX_N
self.gen_node = node_generator()
nil = 0
self.nil_node = self.gen_node(0, nil, nil)
self.list[nil] = self.nil_node
def insert(self, x):
inserted = self.ge... | File "/tmp/tmp_v8r7h78/tmpd41fa8eh.py", line 50
print ans.strip()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s585998182 | p02265 | u763534154 | 1462790237 | Python | Python | py | Runtime Error | 10 | 7272 | 2298 | MAX_N = 100000
class DoublyLinkedList(object):
def __init__(self):
self.list = [Node(0, 0, 0, 0)] * MAX_N
self.gen_node = node_generator()
nil = 0
self.nil_node = self.gen_node(0, nil, nil)
self.list[nil] = self.nil_node
def insert(self, x):
inserted = self.g... | File "/tmp/tmpaf90hs4v/tmpwchxak7y.py", line 50
print ans.strip()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s170948376 | p02265 | u763534154 | 1462790264 | Python | Python | py | Runtime Error | 20 | 10180 | 2298 | MAX_N = 500000
class DoublyLinkedList(object):
def __init__(self):
self.list = [Node(0, 0, 0, 0)] * MAX_N
self.gen_node = node_generator()
nil = 0
self.nil_node = self.gen_node(0, nil, nil)
self.list[nil] = self.nil_node
def insert(self, x):
inserted = self.g... | File "/tmp/tmp2og1l8v2/tmpzkyd4tsq.py", line 50
print ans.strip()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s256614046 | p02265 | u763534154 | 1462790289 | Python | Python | py | Runtime Error | 30 | 12552 | 2298 | MAX_N = 800000
class DoublyLinkedList(object):
def __init__(self):
self.list = [Node(0, 0, 0, 0)] * MAX_N
self.gen_node = node_generator()
nil = 0
self.nil_node = self.gen_node(0, nil, nil)
self.list[nil] = self.nil_node
def insert(self, x):
inserted = self.g... | File "/tmp/tmp4trcjtvf/tmpdtwb_6aa.py", line 50
print ans.strip()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s569177734 | p02265 | u763534154 | 1462790319 | Python | Python | py | Runtime Error | 60 | 14140 | 2299 | MAX_N = 1000001
class DoublyLinkedList(object):
def __init__(self):
self.list = [Node(0, 0, 0, 0)] * MAX_N
self.gen_node = node_generator()
nil = 0
self.nil_node = self.gen_node(0, nil, nil)
self.list[nil] = self.nil_node
def insert(self, x):
inserted = self.... | File "/tmp/tmp1oshm8kn/tmp248ep03a.py", line 50
print ans.strip()
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s002783961 | p02265 | u512342660 | 1464272458 | Python | Python | py | Runtime Error | 10 | 6488 | 920 | def insert(o,dll):
dll.append(o)
def delete(o,dll):
dll.remove(o)
def deleteFirst(dll):
dll.pop(0)
def deleteLast(dll):
dll.pop(-1)
def main():
n = input()
dll = []
for _ in xrange(n):
tmp = raw_input().split()
if len(tmp) == 1:
if tmp[0] == "deleteFirst":
... | File "/tmp/tmpon1s7yl4/tmp1dh3ie3g.py", line 21
print "This command is invalid."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s839860926 | p02265 | u512342660 | 1464272777 | Python | Python | py | Runtime Error | 10 | 6376 | 1013 | def insert(o,dll):
dll.insert(0,o)
def delete(o,dll):
dll.remove(o)
def deleteFirst(dll):
dll.pop(0)
def deleteLast(dll):
dll.pop(-1)
def main():
n = input()
dll = []
for _ in xrange(n):
tmp = raw_input().split()
if len(tmp) == 1:
# print dll
# print ... | File "/tmp/tmpqisflxpa/tmpkah48_7d.py", line 23
print "This command is invalid."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s972237554 | p02265 | u569960318 | 1465194490 | Python | Python3 | py | Runtime Error | 30 | 7976 | 356 | from collections import deque
n = int(input())
dl = deque()
for _ in range(n):
cmd = input()
if ' ' in cmd:
op,v = cmd.split()
else:
op = cmd
if op == 'insert' : dl.appendleft(v)
elif op == 'delete' : dl.remove(v)
elif op == 'deleteFirst': dl.popleft()
elif op ==... | Traceback (most recent call last):
File "/tmp/tmpvi7fwabe/tmps04u0gmh.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s926869590 | p02265 | u778333573 | 1465630385 | Python | Python | py | Runtime Error | 0 | 0 | 358 | n = input()
lis = []
ans = 0
for i in xrange(n):
com = raw_input()
if com[0] == 'i':
lis.append(com[7:])
elif com[6] == ' ':
try:
lis.pop(~lis[::-1].index(com[7:]))
except:
pass
elif com[6] == 'F':
lis.pop()
else:
bot += 1
print ' '... | File "/tmp/tmpdulr19bo/tmp1hnorlbd.py", line 18
print ' '.join( map(str, reversed(lis[ans:])) )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s762533881 | p02265 | u611490888 | 1468234147 | Python | Python | py | Runtime Error | 0 | 0 | 1071 | # -*- coding: utf-8 -*-
commands = {"insert": lambda x, l: insert(x, l),
"delete": lambda x, l: delete(x, l),
"deleteFirst": lambda l: deleteFirst(l),
"deleteLast": lambda l: deleteLast(l)}
# ??£??????????????????????????????x?????????????´?????¶?????¶????
def insert(x, l):
l ... | File "/tmp/tmpkz_vy58q/tmpe5sjnnoc.py", line 47
print ' '.join(result)
^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s478973502 | p02265 | u096922415 | 1468368669 | Python | Python3 | py | Runtime Error | 30 | 7780 | 1598 | # http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_3_C&lang=jp
sample_input = list(range(3))
sample_input[0] = '''7
insert 5
insert 2
insert 3
insert 1
delete 3
insert 6
delete 5'''
sample_input[1] = '''9
insert 5
insert 2
insert 3
insert 1
delete 3
insert 6
delete 5
deleteFirst
deleteLast'''
sample_input... | Traceback (most recent call last):
File "/tmp/tmptbbpc1cz/tmph2ll7ei_.py", line 53, in <module>
num_of_command = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s957091511 | p02265 | u096922415 | 1468592275 | Python | Python3 | py | Runtime Error | 20 | 7896 | 3405 | # http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_3_C&lang=jp
sample_input = list(range(3))
sample_input[0] = '''7
insert 5
insert 2
insert 3
insert 1
delete 3
insert 6
delete 5'''
sample_input[1] = '''9
insert 5
insert 2
insert 3
insert 1
delete 3
insert 6
delete 5
deleteFirst
deleteLast'''
sample_input... | Traceback (most recent call last):
File "/tmp/tmpu6uncc3k/tmpgv42fw2m.py", line 124, in <module>
num_of_command = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s831669597 | p02265 | u612243550 | 1469381105 | Python | Python3 | py | Runtime Error | 0 | 0 | 1157 | class Node:
def __init__(self, key, prevNode, nextNode):
self.key = key
self.prevNode = prevNode
self.nextNode = nextNode
def deleteNode(node):
if node == fNode:
return
node.prevNode.nextNode = node.nextNode
node.nextNode.preNode = node.prevNode
def searchNode(key):
... | Traceback (most recent call last):
File "/tmp/tmpfnqz7xpz/tmpaiyj2lq4.py", line 25, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s498279304 | p02265 | u612243550 | 1469383982 | Python | Python3 | py | Runtime Error | 0 | 0 | 1477 | class Node:
def __init__(self, key, prevNode, nextNode):
self.key = key
self.prevNode = prevNode
self.nextNode = nextNode
def deleteNode(node):
if node == fNode:
return
node.prevNode.nextNode = node.nextNode
node.nextNode.prevNode = node.prevNode
def searchNode(key):
... | Traceback (most recent call last):
File "/tmp/tmpwic8bg1y/tmp9g1zuii_.py", line 45, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s420248800 | p02265 | u554198876 | 1470154730 | Python | Python3 | py | Runtime Error | 30 | 7956 | 427 | from collections import deque
n = int(input())
d = deque()
for i in range(n):
line = input().split()
if len(line) == 2:
command, ele = line
else:
command = line[0]
if command == 'insert':
d.appendleft(ele)
elif command == 'delete':
d.remove(ele)
elif command == 'd... | Traceback (most recent call last):
File "/tmp/tmpv6f9owbs/tmp012nlml9.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s894317503 | p02265 | u554198876 | 1470155001 | Python | Python3 | py | Runtime Error | 40 | 7936 | 428 | from collections import deque
n = int(input())
d = deque()
for i in range(n):
line = input().split()
if len(line) == 2:
command, ele = line
else:
command = line[0]
if command == 'insert':
d.appendleft(ele)
elif command == 'delete':
d.remove(ele)
elif command == '... | Traceback (most recent call last):
File "/tmp/tmpgwz9sxzz/tmpzki5g1m6.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s801540515 | p02265 | u989295536 | 1470234710 | Python | Python3 | py | Runtime Error | 0 | 0 | 713 | # coding:utf-8
# Doubly Linked List
class DLL:
def __init__(self):
self.array = []
def insert(self, x):
self.array = [x] + self.array
def delete(self, x):
del self.array[self.array.index(x)]
def deleteFirst(self):
del self.array[0]
def deleteLast(self):
... | Traceback (most recent call last):
File "/tmp/tmpmkvnuxjz/tmphi5behzu.py", line 41, in <module>
main()
File "/tmp/tmpmkvnuxjz/tmphi5behzu.py", line 25, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s962801058 | p02265 | u989295536 | 1470234789 | Python | Python3 | py | Runtime Error | 0 | 0 | 713 | # coding:utf-8
# Doubly Linked List
class DLL:
def __init__(self):
self.array = []
def insert(self, x):
self.array = [x] + self.array
def delete(self, x):
del self.array[self.array.index(x)]
def deleteFirst(self):
del self.array[0]
def deleteLast(self):
... | Traceback (most recent call last):
File "/tmp/tmpbygf5uxd/tmpicbqe24q.py", line 41, in <module>
main()
File "/tmp/tmpbygf5uxd/tmpicbqe24q.py", line 25, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s822667674 | p02265 | u989295536 | 1470237732 | Python | Python3 | py | Runtime Error | 30 | 7720 | 823 | # coding:utf-8
# Doubly Linked List
class DLL:
def __init__(self):
self.array = []
def insert(self, x):
self.array = [x] + self.array
def delete(self, x):
del self.array[self.array.index(x)]
def deleteFirst(self):
del self.array[0]
def deleteLast(self):
... | Traceback (most recent call last):
File "/tmp/tmp7_2sa_ty/tmpy7356u0o.py", line 44, in <module>
main()
File "/tmp/tmp7_2sa_ty/tmpy7356u0o.py", line 25, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s707655685 | p02265 | u989295536 | 1470237964 | Python | Python3 | py | Runtime Error | 0 | 0 | 878 | # coding:utf-8
# Doubly Linked List
class DLL:
def __init__(self):
self.array = []
def insert(self, x):
self.array = [x] + self.array
def delete(self, x):
if x in dll.array:
del self.array[self.array.index(x)]
def deleteFirst(self):
del self.array[0]
... | Traceback (most recent call last):
File "/tmp/tmp120tmnbh/tmpyxtyknmr.py", line 45, in <module>
main()
File "/tmp/tmp120tmnbh/tmpyxtyknmr.py", line 26, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s079261277 | p02265 | u989295536 | 1470239146 | Python | Python3 | py | Runtime Error | 20 | 7736 | 561 | # coding:utf-8
# Doubly Linked List
def main():
n = int(input())
ans = ""
dll = []
for _ in range(n):
operation = input().split()
command = operation[0]
if len(command) == 6:
key = str(operation[1])
if command == "insert":
dll.insert(0, ... | Traceback (most recent call last):
File "/tmp/tmp3qduxchh/tmpqnorbf6a.py", line 29, in <module>
main()
File "/tmp/tmp3qduxchh/tmpqnorbf6a.py", line 7, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s788374388 | p02265 | u589886885 | 1471011676 | Python | Python3 | py | Runtime Error | 0 | 0 | 384 | from collections import deque
n = int(input())
q = deque()
for i in range(n):
command, num = input().split()
if command == 'insert':
q.appendleft(n)
elif command == 'delete':
try:
q.remove(num)
except Exception as e:
pass
elif command == 'deleteFirst':
... | Traceback (most recent call last):
File "/tmp/tmpjwbvcs_o/tmpk1oxwifh.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s305474323 | p02265 | u589886885 | 1471011781 | Python | Python3 | py | Runtime Error | 0 | 0 | 384 | from collections import deque
n = int(input())
q = deque()
for i in range(n):
command, num = input().split()
if command == 'insert':
q.appendleft(n)
elif command == 'delete':
try:
q.remove(num)
except Exception as e:
pass
elif command == 'deleteFirst':
... | Traceback (most recent call last):
File "/tmp/tmp6v98oz19/tmp0mnihpd3.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s753004266 | p02265 | u589886885 | 1471013212 | Python | Python3 | py | Runtime Error | 0 | 0 | 419 | rom collections import deque
import sys
n = int(sys.stdin.readline())
q = deque()
for i in range(n):
command = sys.stdin.readline()[:-1]
if command[0] == 'i':
q.appendleft(command[7:])
elif command[6] == ' ':
try:
q.remove(command[7:])
except Exception as e:
... | File "/tmp/tmp22hvvdny/tmpr77m_8zq.py", line 1
rom collections import deque
^^^^^^^^^^^
SyntaxError: invalid syntax
| |
s660773867 | p02265 | u092047183 | 1471665906 | Python | Python3 | py | Runtime Error | 30 | 7820 | 549 | # coding: utf-8
import sys
from collections import deque
#n, q = map(int, input().split())
n = int(input())
tasks = {
"insert": "appendleft",
"delete": "remove",
"deleteFirst": "pop",
"deleteLast": "popleft"
}
a = deque()
for i in range(n):
input_line = input()
if input_line in tasks:
... | Traceback (most recent call last):
File "/tmp/tmpe3rst96o/tmppvtpa9dq.py", line 7, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s854032058 | p02265 | u092047183 | 1471666128 | Python | Python3 | py | Runtime Error | 30 | 7928 | 549 | # coding: utf-8
import sys
from collections import deque
#n, q = map(int, input().split())
n = int(input())
tasks = {
"insert": "appendleft",
"delete": "remove",
"deleteFirst": "popleft",
"deleteLast": "pop"
}
a = deque()
for i in range(n):
input_line = input()
if input_line in tasks:
... | Traceback (most recent call last):
File "/tmp/tmpcrcl6gpc/tmpt1xyzm72.py", line 7, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s117947924 | p02265 | u092047183 | 1471667643 | Python | Python3 | py | Runtime Error | 0 | 0 | 600 | # coding: utf-8
import sys
from collections import deque
n = int(input())
task_name = (
"insert",
"delete",
"deleteFirst",
"deleteLast"
)
tasks = deque(map(lambda x: x if x in task_name else x.split(), sys.stdin.readlines()))
a = deque()
for task in tasks:
#deleteFirst,deleteLast
if len(ta... | Traceback (most recent call last):
File "/tmp/tmpz7oi52bk/tmp66hlg7_t.py", line 6, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s501340639 | p02265 | u989295536 | 1472707903 | Python | Python3 | py | Runtime Error | 0 | 0 | 768 | # coding:utf-8
# Doubly Linked List
class DLL:
def __init__(self):
self.array = []
def insert(self, x):
self.array = [x] + self.array
def delete(self, x):
del self.array[self.array.index(x)]
def deleteFirst(self):
del self.array[0]
def deleteLast(self):
... | Traceback (most recent call last):
File "/tmp/tmpnn2bt801/tmpewy6r0k2.py", line 40, in <module>
main()
File "/tmp/tmpnn2bt801/tmpewy6r0k2.py", line 25, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s157309890 | p02265 | u989295536 | 1472708087 | Python | Python3 | py | Runtime Error | 20 | 7760 | 822 | # coding:utf-8
# Doubly Linked List
class DLL:
def __init__(self):
self.array = []
def insert(self, x):
self.array = [x] + self.array
def delete(self, x):
del self.array[self.array.index(x)]
def deleteFirst(self):
del self.array[0]
def deleteLast(self):
... | Traceback (most recent call last):
File "/tmp/tmpz_o40jt8/tmp4qwpuyqv.py", line 44, in <module>
main()
File "/tmp/tmpz_o40jt8/tmp4qwpuyqv.py", line 25, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s973520667 | p02265 | u390995924 | 1473173775 | Python | Python3 | py | Runtime Error | 20 | 7672 | 358 | n = int(input().strip())
l = []
for _ in range(n):
cmd = input()
if cmd == "deleteFirst":
l = l[1:]
elif cmd == "deleteLast":
l.pop()
elif cmd.startswith("insert "):
_, e = cmd.split(" ")
l.insert(0, e)
elif cmd.startswith("delete "):
_, e = cmd.split(" ")
... | Traceback (most recent call last):
File "/tmp/tmpmxtn86l2/tmpsyxqirbf.py", line 1, in <module>
n = int(input().strip())
^^^^^^^
EOFError: EOF when reading a line
| |
s672771333 | p02265 | u390995924 | 1473221926 | Python | Python3 | py | Runtime Error | 30 | 7944 | 376 | from collections import deque
q = deque()
n = int(input().strip())
for _ in range(n):
cmd = input()
if cmd == "deleteFirst":
q.popleft()
elif cmd == "deleteLast":
q.pop()
elif cmd.startswith("insert "):
v = cmd[7:]
q.appendleft(v)
elif cmd.startswith("delete "):
... | Traceback (most recent call last):
File "/tmp/tmp6dfa8lqo/tmpiuj0e2d5.py", line 5, in <module>
n = int(input().strip())
^^^^^^^
EOFError: EOF when reading a line
| |
s424048790 | p02265 | u890722286 | 1474064022 | Python | Python3 | py | Runtime Error | 20 | 7724 | 417 | n = int(input())
ans = []
for i in range(n):
c = input().split()
cmd = c[0]
x = 0
if 1 < len(c):
x = int(c[1])
if cmd == 'insert':
y = [x] + ans
ans = y
elif cmd == 'delete':
index = ans.index(x)
ans.pop(index)
elif cmd == 'deleteFirst':
ans.p... | Traceback (most recent call last):
File "/tmp/tmplk5ey6m_/tmp12j6jp27.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s741250681 | p02265 | u510829608 | 1474205664 | Python | Python3 | py | Runtime Error | 20 | 7652 | 294 | n = int(input())
li = []
for i in range(n):
command = input().split()
if command[0] == 'insert':
li.insert(0, command[1])
elif command[0] == 'delete':
li.remove(command[1])
elif command[0] == 'deleteFirst':
li.pop(0)
else:
li.pop()
print(*li) | Traceback (most recent call last):
File "/tmp/tmp_f7cxg_n/tmpx2pbujcq.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s141995213 | p02265 | u510829608 | 1474206593 | Python | Python3 | py | Runtime Error | 0 | 0 | 429 | from collections import deque
n = int(input())
dll = deque()
for i in range(n):
input_line = input().split()
if input_line[0] == "insert":
dll.appendleft(input_line[1])
elif input_line[0] == "delete":
try:
dll.remove(input_line[1])
except:
pass
e... | File "/tmp/tmps2rncm88/tmphcz6g9i7.py", line 20
print(*dll
^
SyntaxError: '(' was never closed
| |
s901529119 | p02265 | u135273382 | 1475733595 | Python | Python3 | py | Runtime Error | 30 | 7884 | 360 | from collections import deque
n = int(input())
d = deque()
cmd = ['com', 0]
for i in range(n):
cmd = input().split()
if cmd[0] == 'insert':
d.appendleft(int(cmd[1]))
elif cmd[0] == 'delete':
d.remove(int(cmd[1]))
elif cmd[0] == 'deleteFirst':
d.popleft()
elif cmd[0] == 'dele... | Traceback (most recent call last):
File "/tmp/tmpvar8n8yz/tmpu7ec23ns.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s686730779 | p02265 | u135273382 | 1475733623 | Python | Python3 | py | Runtime Error | 30 | 7948 | 360 | from collections import deque
n = int(input())
d = deque()
cmd = ['com', 0]
for i in range(n):
cmd = input().split()
if cmd[0] == 'insert':
d.appendleft(int(cmd[1]))
elif cmd[0] == 'delete':
d.remove(int(cmd[1]))
elif cmd[0] == 'deleteFirst':
d.popleft()
elif cmd[0] == 'dele... | Traceback (most recent call last):
File "/tmp/tmpjjblkmrl/tmp2pojs5_1.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.