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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s675569578 | p02264 | u564464686 | 1524819352 | Python | Python3 | py | Runtime Error | 0 | 0 | 391 | s=0
A=input().split()
n=(int)(A[0])
t=(int)(A[1])
x=[0 for i in range(2*n)]
for i in range(n):
B=input().split()
k=2*i
x[k]=(B[0])
x[k+1]=(int)(B[1])
while len(x)>0:
s=x[1]-t
if s>0:
sum+=t
x.append(x[0])
x.append(s)
del x[0]
del x[0]
if s<=0:
... | Traceback (most recent call last):
File "/tmp/tmprlp1o1te/tmp4gwjnxqe.py", line 2, in <module>
A=input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s021068423 | p02264 | u150984829 | 1524896392 | Python | Python3 | py | Runtime Error | 0 | 0 | 278 | import sys
from collections import deque
def m():
s=sys.stdin.readlines()
q=int(s[0].split()[1])
f=lambda x,y:(x,int(y))
d=deque(f(*e.split())for e in s[1:])
t,a=0,[]
while d:
k,v=d.popleft()
if v>q:v-=q;t+=q;d+[[k,v]]
else:t+=v;a+=[f'{k} {t}\n']
print(a[:-1])
m()
| Traceback (most recent call last):
File "/tmp/tmpyzm75vg7/tmp2_w8yv9i.py", line 14, in <module>
m()
File "/tmp/tmpyzm75vg7/tmp2_w8yv9i.py", line 5, in m
q=int(s[0].split()[1])
~^^^
IndexError: list index out of range
| |
s485966979 | p02264 | u055885332 | 1524900007 | Python | Python3 | py | Runtime Error | 0 | 0 | 483 | #16D8101014F 久留米 竜之介 Python
from collections import deque
n,time=map(int,input().split())
timenow = 0
p=[]
q=[]
queue=[] #p1,p2....
Queue=[] #time
for i in range (n):
line=input().split()
q.append(int(line.pop()))
p.append(line.pop())
print(len(p))
while len(p) is not 0:
Ptmp=p.deque()
if Ptmp<=100:
timenow+=P... | /tmp/tmpqebt2y71/tmp6twm6cf5.py:16: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while len(p) is not 0:
/tmp/tmpqebt2y71/tmp6twm6cf5.py:16: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while len(p) is not 0:
Traceback (most recent call last):
File "/tmp/tmpqebt2y71/tmp6twm6cf5.py", lin... | |
s459091030 | p02264 | u055885332 | 1524902084 | Python | Python3 | py | Runtime Error | 20 | 5600 | 626 | #16D8101014F 久留米 竜之介 Python
n,time=map(int,input().split())
timenow = 0
p=[]
q=[]
queue=[] #p1,p2....
Queue=[] #time
for i in range (n):
line=input().split()
q.append(int(line.pop()))
p.append(line.pop())
head=0
tail=len(p)-1
while head is not tail:
#print(p)
#print(q)
#print(head,tail)
Ptmp=q[head]
if Ptmp<=... | Traceback (most recent call last):
File "/tmp/tmpk53qmuia/tmp4vk5zk1j.py", line 3, in <module>
n,time=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s797547289 | p02264 | u724548524 | 1524975790 | Python | Python3 | py | Runtime Error | 0 | 0 | 363 | n, p = map(int, input().split())
ps = []
for i in range(n):
ps.append(input().split())
ps[i][1] = int(ps[i][1])
t = 0
i = 0
j = 0
while len(ps) > 0:
if ps[i][1] > p:
ps[i][1] -= p
t += p
i = (i + 1) % n
elif ps[i][1] != 0:
t += ps[i][1]
print("{0} {1}".format(ps[i... | Traceback (most recent call last):
File "/tmp/tmphzi6aiep/tmp4ksxtgdi.py", line 1, in <module>
n, p = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s950370922 | p02264 | u255317651 | 1524991574 | Python | Python3 | py | Runtime Error | 0 | 0 | 1045 | # -*- coding: utf-8 -*-
"""
Created on Sun Apr 29 14:42:43 2018
@author: maezawa
"""
def print_array(g):
ans = str(g[0])
if len(g) > 1:
for i in range(1,len(g)):
ans += ' '+str(g[i])
print(ans)
name=[]
time=[]
current_time = 0
n, q = list(map(int, input().split()))
for i in range(n)... | File "/tmp/tmplztp5vr6/tmpsxd5a_dq.py", line 41
% i = (i+1)%remain
^
SyntaxError: invalid syntax
| |
s949157861 | p02264 | u255317651 | 1524991605 | Python | Python3 | py | Runtime Error | 0 | 0 | 1045 | # -*- coding: utf-8 -*-
"""
Created on Sun Apr 29 14:42:43 2018
@author: maezawa
"""
def print_array(g):
ans = str(g[0])
if len(g) > 1:
for i in range(1,len(g)):
ans += ' '+str(g[i])
print(ans)
name=[]
time=[]
current_time = 0
n, q = list(map(int, input().split()))
for i in range(n)... | Traceback (most recent call last):
File "/tmp/tmp2txnt5ez/tmpfbbvqnh5.py", line 19, in <module>
n, q = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s720912149 | p02264 | u255317651 | 1524991710 | Python | Python3 | py | Runtime Error | 0 | 0 | 1044 | # -*- coding: utf-8 -*-
"""
Created on Sun Apr 29 14:42:43 2018
@author: maezawa
"""
def print_array(g):
ans = str(g[0])
if len(g) > 1:
for i in range(1,len(g)):
ans += ' '+str(g[i])
print(ans)
name=[]
time=[]
current_time = 0
n, q = list(map(int, input().split()))
for i in range(n)... | Traceback (most recent call last):
File "/tmp/tmpcyrn2s28/tmpojm6znsu.py", line 19, in <module>
n, q = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s689753925 | p02264 | u255317651 | 1524991923 | Python | Python3 | py | Runtime Error | 0 | 0 | 1040 | # -*- coding: utf-8 -*-
"""
Created on Sun Apr 29 14:42:43 2018
@author: maezawa
"""
def print_array(g):
ans = str(g[0])
if len(g) > 1:
for i in range(1,len(g)):
ans += ' '+str(g[i])
print(ans)
name=[]
time=[]
current_time = 0
n, q = list(map(int, input().split()))
for i in range(n)... | Traceback (most recent call last):
File "/tmp/tmp12ehi1cq/tmpblf1pzkq.py", line 19, in <module>
n, q = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s102187155 | p02264 | u255317651 | 1524992013 | Python | Python3 | py | Runtime Error | 0 | 0 | 1040 | # -*- coding: utf-8 -*-
"""
Created on Sun Apr 29 14:42:43 2018
@author: maezawa
"""
def print_array(g):
ans = str(g[0])
if len(g) > 1:
for i in range(1,len(g)):
ans += ' '+str(g[i])
print(ans)
name=[]
time=[]
current_time = 0
n, q = list(map(int, input().split()))
for i in range(n)... | Traceback (most recent call last):
File "/tmp/tmp27a8ed62/tmpdc8n6oce.py", line 19, in <module>
n, q = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s654923190 | p02264 | u064313887 | 1525094404 | Python | Python3 | py | Runtime Error | 0 | 0 | 794 |
class Process:
def __init__(self,n,head,tail):
self.n = n
self.head = head
self.tail = tail
self.name = []
self.time = []
def void enqueue(self,x):
self.data = x
tail = (tail+1) % n
def dequeue(self):
self.x = self.[head]
head = (head+1) % n
return x
... | File "/tmp/tmpjh02jp_w/tmpo_of0ct8.py", line 11
def void enqueue(self,x):
^^^^^^^
SyntaxError: expected '('
| |
s576149476 | p02264 | u405027099 | 1525174696 | Python | Python3 | py | Runtime Error | 0 | 0 | 417 | a=input().split()
n=int(a[0])
q=int(a[1])
b=[0 for i in range(2*n)]
cnt=0
for i in range(n):
B=input().split()
b[2*i]=B[0]
b[2*i+1]=int(B[1])
while len(b)>0:
if b[1]-100>0:
tmp1=b[0]
tmp2=b[1]-100
del b[0]
del b[0]
b.append(tmp1)
b.append(tmp2)
cnt... | File "/tmp/tmpmaph9iu9/tmpg44k2dqw.py", line 23
del b[0
^
SyntaxError: '[' was never closed
| |
s931750062 | p02264 | u088372268 | 1525355002 | Python | Python3 | py | Runtime Error | 20 | 5604 | 1490 | class Queue():
def __init__(self, size=10):
self.queue = [None] * size
self.head = self.tail = 0
self.MAX = size
self.num_items = 0
def is_empty(self):
return self.num_items == 0
def is_full(self):
return self.num_items == self.MAX
def enqueue(self, x):... | Traceback (most recent call last):
File "/tmp/tmp59ydety1/tmp6l41h7e5.py", line 74, in <module>
main()
File "/tmp/tmp59ydety1/tmp6l41h7e5.py", line 52, in main
n, q = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s721949024 | p02264 | u810922275 | 1527034662 | Python | Python3 | py | Runtime Error | 0 | 0 | 347 | from collections import deque
import numpy as np
n,q=map(int,input().split())
s=0
queue=deque([])
for i in range(n):
name,time=input().split()
queue.append([name,int(time)])
while len(queue)>0:
t=queue.popleft()
if t[1]>q:
s=s+q
t[1]=t[1]-q
queue.append(t)
else:
s=s+... | Traceback (most recent call last):
File "/tmp/tmpuebg7mtn/tmpk1ejp0nk.py", line 3, in <module>
n,q=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s567931957 | p02264 | u810922275 | 1527034670 | Python | Python | py | Runtime Error | 0 | 0 | 347 | from collections import deque
import numpy as np
n,q=map(int,input().split())
s=0
queue=deque([])
for i in range(n):
name,time=input().split()
queue.append([name,int(time)])
while len(queue)>0:
t=queue.popleft()
if t[1]>q:
s=s+q
t[1]=t[1]-q
queue.append(t)
else:
s=s+... | Traceback (most recent call last):
File "/tmp/tmps1m5om4i/tmp9lzd_j69.py", line 3, in <module>
n,q=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s336472898 | p02264 | u657361950 | 1529630782 | Python | Python3 | py | Runtime Error | 0 | 0 | 2099 | import java.util.Scanner;
public class Main {
static class Node<E> {
public E value;
public Node<E> next;
public Node(E value) {
this.value = value;
this.next = null;
}
}
static class SimpleQueue<E> {
private Node<E> head;
private Node<E> tail;
int size;
public SimpleQueue() {
siz... | File "/tmp/tmpi_vad8bw/tmp96uorjz6.py", line 3
public class Main {
^^^^^
SyntaxError: invalid syntax
| |
s553533115 | p02264 | u153665391 | 1529886683 | Python | Python3 | py | Runtime Error | 0 | 0 | 894 | process_num, qms = map(int, input().split())
raw_procs = [input() for i in range(process_num)]
if __name__ == '__main__':
procs = []
for row in raw_procs:
name, time = row.split()
procs.push = {
"name": name,
"time": int(time),
}
total_time = 0
current_... | Traceback (most recent call last):
File "/tmp/tmpng31oid_/tmpobs9tg29.py", line 1, in <module>
process_num, qms = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s234344135 | p02264 | u682153677 | 1530423336 | Python | Python3 | py | Runtime Error | 0 | 0 | 577 | # -*- coding: utf-8 -*-
def simu(pro, q):
end_time = 0
while bool(pro):
if pro[1] > q:
end_time += q
pro.append(pro[0])
pro.append(pro[1] - q)
pro.pop(0)
pro.pop(1)
elif pro[1] <= q:
end_time += pro[1]
print(... | Traceback (most recent call last):
File "/tmp/tmp2y_2s39i/tmpk4_jp69l.py", line 22, in <module>
n, q = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s367531533 | p02264 | u682153677 | 1530423797 | Python | Python3 | py | Runtime Error | 0 | 0 | 547 | # -*- coding: utf-8 -*-
def simu(pro, q):
end_time = 0
while bool(pro):
if pro[1] > q:
end_time += q
pro.append(pro[0])
pro.append(pro[1] - q)
pro.pop(0) * 2
elif pro[1] <= q:
end_time += pro[1]
print('{0} {1... | Traceback (most recent call last):
File "/tmp/tmpt283yuu5/tmpbee8tgg0.py", line 20, in <module>
n, q = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s403653552 | p02264 | u682153677 | 1530423882 | Python | Python3 | py | Runtime Error | 0 | 0 | 547 | # -*- coding: utf-8 -*-
def simu(pro, q):
end_time = 0
while bool(pro):
if pro[1] > q:
end_time += q
pro.append(pro[0])
pro.append(pro[1] - q)
pro.pop(0) * 2
elif pro[1] <= q:
end_time += pro[1]
print('{0} {1... | Traceback (most recent call last):
File "/tmp/tmpwbzfmbde/tmpfvhqgfcn.py", line 20, in <module>
n, q = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s710626654 | p02264 | u912237403 | 1373785675 | Python | Python | py | Runtime Error | 0 | 0 | 1212 | #coding: utf-8
class Queue:
class Cell:
def __init__(self,data,link=None):
self.data=data
self.link=link
def __init__(self):
self.size=0
self.front=None
self.rear=None
def enqueue(self,x):
if self.size==0:
self.front = self.r... | File "/tmp/tmp7ecbc78s/tmpaglw3ad4.py", line 56
print job[0], stime
^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s467279928 | p02264 | u912237403 | 1373789590 | Python | Python | py | Runtime Error | 0 | 0 | 1233 | #coding: utf-8
import sys
class Queue:
class Cell:
def __init__(self, x, y = None):
self.data = x
self.next = y
def __init__(self):
self.size = 0
self.rear = None
def enqueue(self, x):
if self.size == 0:
self.rear = Queue.Cell(x)
... | File "/tmp/tmplv1elv_u/tmpbqh7wgpd.py", line 53
print job[0], stime
^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s112267070 | p02264 | u633068244 | 1395990682 | Python | Python | py | Runtime Error | 0 | 0 | 323 | n,q = map(int, raw_input().split())
que = [map(str, raw_input().split()) for i in range(n)]
for i in range(n):que[i][1] = int(que[i][1])
mxt = sum([y for x,y in que])
t = 0
i = 0
while t < mxt:
i %= n
c = que[i][1]
if c <= q:
t += c
que.pop(i)
n -= 1
print a[0],t
else:
t += q
que[i][1] = c - q
i +... | File "/tmp/tmp06l3d70o/tmpvybtn3ft.py", line 14
print a[0],t
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s996177350 | p02264 | u633068244 | 1395990886 | Python | Python | py | Runtime Error | 0 | 0 | 334 | n,q = map(int, raw_input().split())
que = [map(str, raw_input().split()) for i in range(n)]
for i in range(n):que[i][1] = int(que[i][1])
mxt = sum([y for x,y in que])
t = 0
i = 0
while t < mxt:
if que[i][1] <= q:
t += que[i][1]
que.pop(i)
n -= 1
print que[i][0],t
else:
t += q
que[i][1] = que[i][1] - q... | File "/tmp/tmp20uhpxs8/tmpofumstud.py", line 12
print que[i][0],t
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s650015596 | p02264 | u633068244 | 1395991660 | Python | Python | py | Runtime Error | 0 | 0 | 382 | n,q = map(int, raw_input().split())
que = [map(str, raw_input().split()) for i in range(n)]
for i in range(n):que[i][1] = int(que[i][1])
mxt = sum([y for x,y in que])
t = 0
i = 0
while t < mxt:
if i = n: i = 0
if que[i][1] <= q:
t += que[i][1]
print que[i][0],t
que.pop(i)
n -= 1
... | File "/tmp/tmp_qy015xz/tmpk51trcw_.py", line 8
if i = n: i = 0
^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s764533521 | p02265 | u007270338 | 1531051351 | Python | Python3 | py | Runtime Error | 20 | 5616 | 1315 | #coding:utf-8
dic = {}
nil = -1
class Doubly:
def __init__(self,key,l=nil,r=nil):
self.l = l
self.r = r
self.key = key
def Insert(self,key):
obj = Doubly(key)
obj.l = fake
fakeR = fake.r
fake.r = obj
obj.r = fakeR
fakeR.l = obj
di... | Traceback (most recent call last):
File "/tmp/tmpsbwd5siq/tmpuhlol4g5.py", line 45, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s793616428 | p02265 | u007270338 | 1531051910 | Python | Python3 | py | Runtime Error | 20 | 5616 | 1440 | #coding:utf-8
dic = {}
nil = -1
class Doubly:
def __init__(self,key,l=nil,r=nil):
self.l = l
self.r = r
self.key = key
def Insert(self,key):
obj = Doubly(key)
obj.l = fake
fakeR = fake.r
fake.r = obj
obj.r = fakeR
fakeR.l = obj
if... | Traceback (most recent call last):
File "/tmp/tmpusa81uom/tmpvqpe3fkt.py", line 47, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s560247241 | p02265 | u500386459 | 1531127038 | Python | Python3 | py | Runtime Error | 0 | 0 | 295 | list = []
count = int(input())
for ver in range(count):
try:
conditions,num = input().split()
except ValueError:
print(conditions)
if(conditions == "insert"):
list.append(num)
elif(conditions == "delete"):
list.remove(num)
for ver in range(len(list)):
print(list[ver],end=" ")
| Traceback (most recent call last):
File "/tmp/tmpv5442e0h/tmpycv62zmh.py", line 3, in <module>
count = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s454318986 | p02265 | u500386459 | 1531127095 | Python | Python3 | py | Runtime Error | 0 | 0 | 306 | list = []
count = int(input())
for ver in range(count):
try:
conditions,num = input().split()
except ValueError:
print(conditions)
if(conditions == "insert"):
list.append(num)
elif(conditions == "delete"):
list.remove(num)
for ver in range(len(list)):
print(list[ver],end=" ")
print('/n')
| Traceback (most recent call last):
File "/tmp/tmpah6emlup/tmpns4a_jra.py", line 3, in <module>
count = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s965999438 | p02265 | u500386459 | 1531127200 | Python | Python3 | py | Runtime Error | 0 | 0 | 304 | list = []
count = int(input())
for ver in range(count):
try:
conditions,num = input().split()
except ValueError:
print(conditions)
if(conditions == "insert"):
list.append(num)
elif(conditions == "delete"):
list.remove(num)
for ver in range(len(list)):
print(list[ver],end=" ")
print("")
| Traceback (most recent call last):
File "/tmp/tmpegwffb6o/tmpgne0yc6a.py", line 3, in <module>
count = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s290772812 | p02265 | u500386459 | 1531127407 | Python | Python3 | py | Runtime Error | 0 | 0 | 407 | list = []
count = int(input())
for ver in range(count):
try:
conditions,num = input().split()
except ValueError:
print(conditions)
if(conditions == "insert"):
list.append(num)
elif(conditions == "delete"):
list.remove(num)
elif(conditions == "insertFirst"):
list.insert(0,num)
elif(conditions == "dele... | Traceback (most recent call last):
File "/tmp/tmpvlwjeqro/tmpkn295jc5.py", line 3, in <module>
count = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s704796503 | p02265 | u500386459 | 1531127512 | Python | Python3 | py | Runtime Error | 0 | 0 | 400 | list = []
count = int(input())
for ver in range(count):
try:
conditions,num = input().split()
except ValueError:
print(conditions)
if(conditions == "insert"):
list.append(num)
elif(conditions == "delete"):
list.remove(num)
elif(conditions == "deleteFirst"):
del list[0]
elif(conditions == "deleteLast"... | Traceback (most recent call last):
File "/tmp/tmpc2ci29dz/tmphgkry4ld.py", line 3, in <module>
count = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s148793184 | p02265 | u908984540 | 1531206920 | Python | Python3 | py | Runtime Error | 30 | 5996 | 448 | from collections import deque
if __name__ == '__main__':
n = int(input())
dll = deque()
for _ in range(n):
command = input().split()
if command[0] == 'insert':
dll.appendleft(command[1])
elif command[0] == 'delete':
dll.remove(command[1])
elif command... | Traceback (most recent call last):
File "/tmp/tmplwl81_fl/tmpm3n5rpk4.py", line 4, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s804495357 | p02265 | u564464686 | 1531904721 | Python | Python3 | py | Runtime Error | 0 | 0 | 401 | n=int(input())
list=[]
for i in range(n):
A=input().split()
if A[0]=="insert":
a=int(A[1])
list.insert(0,a)
elif A[0]=="delete":
a=int(A[1])
list.remove(a)
else:
if A[0]=="deleteFirst":
list.pop(0)
elif A[0]=="deleteLast":
n=len(lis... | Traceback (most recent call last):
File "/tmp/tmpcqtfp0u9/tmpfgko4by8.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s454622402 | p02265 | u564464686 | 1531905042 | Python | Python3 | py | Runtime Error | 20 | 5600 | 430 | n=int(input())
list=[]
for i in range(n):
A=input().split()
if A[0]=="insert":
a=int(A[1])
list.insert(0,a)
elif A[0]=="delete":
a=int(A[1])
list.remove(a)
else:
if A[0]=="deleteFirst":
list.pop(0)
elif A[0]=="deleteLast":
n=len(lis... | Traceback (most recent call last):
File "/tmp/tmpzjmsbz_m/tmpvaksoxwg.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s516665464 | p02265 | u256678932 | 1534836264 | Python | Python3 | py | Runtime Error | 20 | 5632 | 2338 | class DoublyLinkedListNode:
def __init__(self, num):
self.num = num
self.next = None
self.prev = None
def setNext(self, node):
self.next = node
def setPrev(self, node):
self.prev = node
def getNum(self):
return self.num
def getNext(self):
... | Traceback (most recent call last):
File "/tmp/tmpitcp6m4u/tmp4ua1ckcv.py", line 107, in <module>
main()
File "/tmp/tmpitcp6m4u/tmp4ua1ckcv.py", line 88, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s433553240 | p02265 | u308033440 | 1535084713 | Python | Python3 | py | Runtime Error | 0 | 0 | 658 | from collections import deque
# 命令数入力
n = int(input())
# 命令入力
order_list = [input().split() for i in range(n)]
# 双方向連結リスト
doubly_linked_list = deque()
for _ in range(n):
#order = input().split()
if order[0] == "insert":
doubly_linked_list.appendleft(order[1])
elif order[0] == "del... | Traceback (most recent call last):
File "/tmp/tmpjfstzrvp/tmp5zz3layk.py", line 4, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s431065712 | p02265 | u581154076 | 1535100725 | Python | Python3 | py | Runtime Error | 30 | 6004 | 401 | from collections import deque
d = deque()
for _ in range(int(input())):
s = input()
try:
com, val = s.split()
val = int(val)
except ValueError:
com = s
if com == 'insert':
d.appendleft(val)
elif com == 'delete':
d.remove(val)
elif com == 'deleteFirst... | Traceback (most recent call last):
File "/tmp/tmpc8xtoa3f/tmpqbsp1w38.py", line 4, in <module>
for _ in range(int(input())):
^^^^^^^
EOFError: EOF when reading a line
| |
s469796740 | p02265 | u665238221 | 1535608092 | Python | Python3 | py | Runtime Error | 30 | 5996 | 303 | from collections import deque
q = deque()
for _ in range(int(input())):
c, *k = input().split()
k = k[0] if k else None
if c == 'insert':
q.appendleft(k)
elif c == 'delete':
q.remove(k)
elif c == 'deleteFirst':
q.popleft()
else:
q.pop()
print(*q)
| Traceback (most recent call last):
File "/tmp/tmposa4k15e/tmpttpu_flq.py", line 3, in <module>
for _ in range(int(input())):
^^^^^^^
EOFError: EOF when reading a line
| |
s038879995 | p02265 | u665238221 | 1535608633 | Python | Python3 | py | Runtime Error | 0 | 0 | 363 | from collections import deque
q = deque()
for _ in range(int(input())):
c, *k = input().split()
k = k[0] if k else None
if c[0] == 'i':
q.appendleft(k)
elif c[0] == 'd':
if c[6] == 'F':
q.popleft()
elif c[6] == 'L':
q.pop()
else:
if k i... | Traceback (most recent call last):
File "/tmp/tmp6gwz6__e/tmpsmqhq7rf.py", line 3, in <module>
for _ in range(int(input())):
^^^^^^^
EOFError: EOF when reading a line
| |
s279897943 | p02265 | u665238221 | 1535609048 | Python | Python3 | py | Runtime Error | 0 | 0 | 335 | from collections import deque
from sys import stdin
q = deque()
input()
for s in stdin:
c, *k = s.split()
k = k[0] if k else None
if c[0] == 'i':
q.appendleft(k)
elif c[0] == 'delete':
if k in q:
q.remove(k)
if c == 'deleteFirst':
q.popleft()
else:
q.p... | Traceback (most recent call last):
File "/tmp/tmp4prp0f_o/tmpfktpmimv.py", line 4, in <module>
input()
EOFError: EOF when reading a line
| |
s328035170 | p02265 | u356729014 | 1535690686 | Python | Python3 | py | Runtime Error | 0 | 0 | 363 | n = map(int,input())
a = [input(sep=" ")[1]]
for i in range(n):
command = input()
if(command == "deleteFirst"):
a.pop(0)
elif(command == "deleteLast"):
a.pop()
else:
command,num = command.split(sep = " ")
num = int(num)
if(command == "delete"):
a.remov... | Traceback (most recent call last):
File "/tmp/tmpe_c_dxh6/tmpw_4dm1mo.py", line 1, in <module>
n = map(int,input())
^^^^^^^
EOFError: EOF when reading a line
| |
s631595738 | p02265 | u356729014 | 1535691022 | Python | Python3 | py | Runtime Error | 0 | 0 | 421 | n = map(int,input())
a = [int(input().split(sep=" ")[1])]
for i in range(n):
command = input()
if(command == "deleteFirst"):
a.pop(0)
elif(command == "deleteLast"):
a.pop()
else:
command,num = command.split(sep = " ")
num = int(num)
if(command == "delete"):
... | Traceback (most recent call last):
File "/tmp/tmp0c706t_k/tmpyxf43wfn.py", line 1, in <module>
n = map(int,input())
^^^^^^^
EOFError: EOF when reading a line
| |
s269004143 | p02265 | u356729014 | 1535691099 | Python | Python3 | py | Runtime Error | 0 | 0 | 425 | n = map(int,input())
a = [int(input().split(sep=" ")[1])]
for i in range(n - 1):
command = input()
if(command == "deleteFirst"):
a.pop(0)
elif(command == "deleteLast"):
a.pop()
else:
command,num = command.split(sep = " ")
num = int(num)
if(command == "delete"):
... | Traceback (most recent call last):
File "/tmp/tmpw0szc069/tmpudh_7k_l.py", line 1, in <module>
n = map(int,input())
^^^^^^^
EOFError: EOF when reading a line
| |
s264750208 | p02265 | u356729014 | 1535692336 | Python | Python3 | py | Runtime Error | 20 | 5592 | 463 | n = int(input())
a = [int(input().split(sep=" ")[1])]
for i in range(n - 1):
command = input()
if(command == "deleteFirst"):
a.pop(0)
elif(command == "deleteLast"):
a.pop()
else:
command,num = command.split(sep = " ")
num = int(num)
if(command == "delete"):
... | Traceback (most recent call last):
File "/tmp/tmpzy29lser/tmpnjb_aki2.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s085204653 | p02265 | u554503378 | 1541050358 | Python | Python3 | py | Runtime Error | 20 | 5608 | 425 | n = int(input())
num_list = []
for _ in range(n):
cmd = (input().split())
if cmd[0] == 'insert':
num_list.insert(0,int(cmd[1]))
elif cmd[0] == 'delete':
idx = num_list.index(int(cmd[1]))
del(num_list[idx])
elif cmd[0] == 'deleteFirst':
del(num_list[0])
elif cmd[0] ... | Traceback (most recent call last):
File "/tmp/tmp9wc8w5do/tmpbjkw5tku.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s402519078 | p02265 | u554503378 | 1541051254 | Python | Python3 | py | Runtime Error | 0 | 0 | 357 | n = int(input())
num_list = []
for _ in range(n):
cmd = (input().split())
if cmd[0] == 'insert':
num_list.insert(0,cmd[1])
elif cmd[0] == 'delete':
if cmd[1] in num_list:
num_list.remove(cmd[0])
elif cmd[0] == 'deleteFirst':
del(num_list[0])
else:
num_l... | Traceback (most recent call last):
File "/tmp/tmp0_9lqj18/tmpkvwk79p9.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s340000591 | p02265 | u356729014 | 1545367294 | Python | Python3 | py | Runtime Error | 0 | 0 | 2522 |
from sys import stdin
import sys
class node:
def __init__(self,num,pre = None,nextnode = None):
self.num = num
self.prenode = pre
self.nextnode = nextnode
class doubly_linked_list:
import sys
begin_node = None
end_node = None
def insert(self,num):
if(self.e... | Traceback (most recent call last):
File "/tmp/tmpvu4epbps/tmpb6u5rb62.py", line 62, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s827312878 | p02265 | u803657704 | 1545889173 | Python | Python3 | py | Runtime Error | 0 | 0 | 2372 | import sys
import time
class NodeList:
class Node:
def __init__(self, left, x, right):
self.key = x
self.right = right
self.left = left
def __repr__(self):
return str(self.key)
def printDetail(self):
print(str(se... | Traceback (most recent call last):
File "/tmp/tmpq0z00hk5/tmpphslf4zf.py", line 79, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s056466203 | p02265 | u803657704 | 1545889390 | Python | Python3 | py | Runtime Error | 0 | 0 | 2367 | import sys
import time
class NodeList:
class Node:
def __init__(self, left, x, right):
self.key = x
self.right = right
self.left = left
def __repr__(self):
return str(self.key)
def printDetail(self):
print(str(se... | Traceback (most recent call last):
File "/tmp/tmpepw3jffd/tmps4uoqnpn.py", line 79, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s053085192 | p02265 | u771410206 | 1545962528 | Python | Python3 | py | Runtime Error | 20 | 5608 | 357 | n = int(input())
A = [list(map(str,input().split())) for _ in range(n)]
B = []
for i in range(n):
if A[i][0] == 'insert':
B.insert(0,int(A[i][1]))
elif A[i][0] == 'delete':
B.remove(int(A[i][1]))
elif A[i][0] == 'deleteFirst':
del B[0]
elif A[i][0] == 'deleteLast':
del B... | Traceback (most recent call last):
File "/tmp/tmpm_ygn4ff/tmphtya_g77.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s595672897 | p02265 | u065504661 | 1546168859 | Python | Python3 | py | Runtime Error | 0 | 0 | 1267 | class Node:
def __init__(self, key):
self._key = key
self._prev = None
self._next = None
def list_search(head, key):
cur = head._next
while cur._key != None and cur._key != key:
cur = cur._next
return cur
def initiation():
head = Node(None)
head._prev = head
head._next = head
return head
def de... | File "/tmp/tmplehflpe1/tmp7ghuahl6.py", line 61
while cur._next._key != None
^
SyntaxError: expected ':'
| |
s418798158 | p02265 | u065504661 | 1546168867 | Python | Python3 | py | Runtime Error | 0 | 0 | 1267 | class Node:
def __init__(self, key):
self._key = key
self._prev = None
self._next = None
def list_search(head, key):
cur = head._next
while cur._key != None and cur._key != key:
cur = cur._next
return cur
def initiation():
head = Node(None)
head._prev = head
head._next = head
return head
def de... | File "/tmp/tmp2cnpkq55/tmp83al_ejh.py", line 61
while cur._next._key != None
^
SyntaxError: expected ':'
| |
s303954609 | p02265 | u874395007 | 1546434993 | Python | Python3 | py | Runtime Error | 20 | 6012 | 661 | from collections import deque
n = int(input())
d = deque()
for _i in range(n):
line = input().split()
order = line[0]
if order in ('insert', 'delete'):
key = int(line[1])
if order == 'insert':
d.appendleft(key)
elif order == 'delete':
d.remove(key)
elif order == 'deleteF... | Traceback (most recent call last):
File "/tmp/tmpyt7l_4qh/tmp2a2nak_u.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s515533582 | p02265 | u809233245 | 1546475965 | Python | Python3 | py | Runtime Error | 20 | 5608 | 376 | n = int(input())
cmds = [input().split(' ') for _ in range(n)]
dl_list = []
for cmd in cmds:
if cmd[0] == 'insert':
dl_list.insert(0, int(cmd[1]))
elif cmd[0] == 'delete':
dl_list.remove(int(cmd[1]))
elif cmd[0] == 'deleteFirst':
del dl_list[0]
elif cmd[0] == 'deleteLast':
... | Traceback (most recent call last):
File "/tmp/tmpgj85xi2w/tmpqq603hge.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s753925998 | p02265 | u452220492 | 1551524744 | Python | Python3 | py | Runtime Error | 0 | 0 | 169 | n = int(input())
l = []
for i in range(n):
c, d = input().split()
if c[0] == 'i':
l.append(d)
else:
l.remove(d)
print(" ".join(sorted(l)))
| Traceback (most recent call last):
File "/tmp/tmp7bqclyyk/tmpm3nprcln.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s736819209 | p02265 | u452220492 | 1551525149 | Python | Python3 | py | Runtime Error | 20 | 5592 | 314 | n = int(input())
l = []
for i in range(n):
s = input()
if s == "deleteFirst":
l.pop(0)
continue
if s == "deleteLast":
l.pop()
continue
c, d = s.split()
if c == 'insert':
l.append(d)
elif c == "delete":
l.remove(d)
print(" ".join(l[::-1]))
| Traceback (most recent call last):
File "/tmp/tmpb4ni011i/tmprcdhainx.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s185052488 | p02265 | u452220492 | 1551533130 | Python | Python3 | py | Runtime Error | 20 | 5604 | 1178 | class Node:
def __init__(self, d, next):
self.d = d
self.next = next
def __str__(self):
if self.next is None:
return "(" + self.d + ")"
else:
return "(" + self.d + "," + str(self.next) + ")"
# import time
n = int(input())
node = None
for i in range(n):
... | Traceback (most recent call last):
File "/tmp/tmpi4kqf8v_/tmprus2d7u7.py", line 14, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s589604356 | p02265 | u799595944 | 1556788050 | Python | Python3 | py | Runtime Error | 0 | 0 | 2117 | class Node():
def __init__(self,value,prv,nxt):
self.value = value
self.prv = prv
self.nxt = nxt
class LinkedList():
def __init__(self,head,tail):
self.head = head
self.tail = tail
def insert(self,value):
if self.head == None:
self.head = Node(v... | Traceback (most recent call last):
File "/tmp/tmpg852w_z3/tmpalb6tvdn.py", line 49, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s564722441 | p02265 | u799595944 | 1556788613 | Python | Python3 | py | Runtime Error | 30 | 5608 | 2304 | class Node():
def __init__(self,value,prv,nxt):
self.value = value
self.prv = prv
self.nxt = nxt
class LinkedList():
def __init__(self,head,tail):
self.head = head
self.tail = tail
def insert(self,value):
if self.head == None:
self.head = Node(v... | Traceback (most recent call last):
File "/tmp/tmp7g80_ich/tmpns8yl_lh.py", line 52, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s808862834 | p02265 | u336705996 | 1559022641 | Python | Python3 | py | Runtime Error | 0 | 0 | 287 | n = int(input())
a = [input() for _ in range(n)]
queue = []
for command in a:
if 'insert 'in command:
queue.append(command.replace('insert ', ''))
elif 'delete 'in command:
queue.remove(command.replace('delete ', ''))
print(' '.join(map(str, reversed(queue)))
| File "/tmp/tmp7wxratml/tmplv3lmh46.py", line 11
print(' '.join(map(str, reversed(queue)))
^
SyntaxError: '(' was never closed
| |
s482127124 | p02265 | u336705996 | 1559181547 | Python | Python3 | py | Runtime Error | 30 | 6000 | 436 | from collections import deque
n = int(input())
a = [input() for _ in range(n)]
queue = deque()
for command in a:
if 'insert 'in command:
queue.append(command.replace('insert ', ''))
elif 'delete 'in command:
queue.remove(command.replace('delete ', ''))
elif 'deleteFirst' in command:
... | Traceback (most recent call last):
File "/tmp/tmp43v99vqw/tmpgb5pbej7.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s262932945 | p02265 | u822165491 | 1559291655 | Python | Python3 | py | Runtime Error | 0 | 0 | 3055 | class Node:
def __init__(self, key, prev, next):
self.key = key
self.prev = prev
self.next = next
class MyDLL:
def __init__(self):
self.linkedlist = []
self.length = 0
def isEmpty(self):
if self.length==0:
return True
return Fals... | Traceback (most recent call last):
File "/tmp/tmpmipavcha/tmpc4ur4bcf.py", line 84, in <module>
main()
File "/tmp/tmpmipavcha/tmpc4ur4bcf.py", line 69, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s369664889 | p02265 | u822165491 | 1559374424 | Python | Python3 | py | Runtime Error | 0 | 0 | 3769 | class Node:
def __init__(self, key, prev, next):
self.key = key
self.prev = prev
self.next = next
class MyDLL:
def __init__(self):
self.linkedlist = []
self.length = 0
def isEmpty(self):
if self.length==0:
return True
return Fals... | Traceback (most recent call last):
File "/tmp/tmpje05bafp/tmpt2lntmth.py", line 108, in <module>
main()
File "/tmp/tmpje05bafp/tmpt2lntmth.py", line 75, in main
input()
EOFError: EOF when reading a line
| |
s716776693 | p02265 | u566160059 | 1559403152 | Python | Python3 | py | Runtime Error | 0 | 0 | 335 | n = int(input())
commands = [input().split() for _ in range(n)]
l = []
for com in commands:
val = com[1]
com = com[0]
if com=='insert':
l.insert(0, val)
elif com=='delete':
l.remove(val)
elif com=='deleteFirst':
l.pop(0)
elif com=='deleteLast':
l.pop()
s = ' '.jo... | Traceback (most recent call last):
File "/tmp/tmpce77s_7s/tmp_rvxqwy_.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s811314578 | p02265 | u566160059 | 1559403546 | Python | Python3 | py | Runtime Error | 20 | 5604 | 319 | n = int(input())
commands = [input().split() for _ in range(n)]
l = []
for com in commands:
if com[0]=='insert':
l.insert(0, com[1])
elif com[0]=='delete':
l.remove(com[1])
elif com[0]=='deleteFirst':
l.pop(0)
elif com[0]=='deleteLast':
l.pop()
s = ' '.join(l)
print(s)
| Traceback (most recent call last):
File "/tmp/tmpr09_u2my/tmphagfts_e.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s241512951 | p02265 | u566160059 | 1559403826 | Python | Python3 | py | Runtime Error | 0 | 0 | 349 | n = int(input())
commands = [input().split() for _ in range(n)]
l = []
for com in commands:
print(l)
if com[0]=='insert':
l.insert(0, com[1])
elif com[0]=='delete':
try:
l.remove(com[1])
elif com[0]=='deleteFirst':
l.pop(0)
elif com[0]=='deleteLast':
l.po... | File "/tmp/tmp9tv6jqaj/tmp6f0swvvc.py", line 12
elif com[0]=='deleteFirst':
SyntaxError: expected 'except' or 'finally' block
| |
s081013215 | p02265 | u566160059 | 1559404745 | Python | Python3 | py | Runtime Error | 0 | 0 | 407 | from collections import deque
n = int(input())
commands = [input().split() for _ in range(n)]
l = deque([])
for com in commands:
if com[0]=='insert':
l.insert(0, com[1])
elif com[0]=='delete':
try:
l.remove(com[1])
except:
pass
elif com[0]=='deleteFirst':
... | Traceback (most recent call last):
File "/tmp/tmp7_zid0yt/tmp4fftasx7.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s721013568 | p02265 | u566160059 | 1559407067 | Python | Python3 | py | Runtime Error | 30 | 6004 | 357 | from collections import deque
n = int(input())
commands = [input() for _ in range(n)] # splitとかしてると間に合わない
l = deque()
for com in commands:
if com[0]=='i':
l.appendleft(com[7:])
elif com[6]=='F':
l.popleft()
elif com[6]=='L':
l.pop()
else:
l.remove(com[7:])
s = ' '.join... | Traceback (most recent call last):
File "/tmp/tmpeaqbeeis/tmpx2fmoix0.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s001622452 | p02265 | u566160059 | 1559407102 | Python | Python3 | py | Runtime Error | 30 | 6008 | 357 | from collections import deque
n = int(input())
commands = [input() for _ in range(n)] # splitとかしてると間に合わない
l = deque()
for com in commands:
if com[0]=='i':
l.appendleft(com[7:])
elif com[6]=='F':
l.popleft()
elif com[6]=='L':
l.pop()
else:
l.remove(com[7:])
s = ' '.join... | Traceback (most recent call last):
File "/tmp/tmpxb8_3bb0/tmp3se9zci8.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s767513042 | p02265 | u822165491 | 1559449034 | Python | Python3 | py | Runtime Error | 0 | 0 | 2537 | class Node:
def __init__(self, key):
self.key = key
self.prev = None
self.next = None
class MyDLL:
def __init__(self):
# 番兵:仮想的な先頭
self.sentinel = Node(None)
self.sentinel.prev = self.sentinel
self.sentinel.next = self.sentinel
def insert(se... | Traceback (most recent call last):
File "/tmp/tmpn5leys7s/tmptl5nefyx.py", line 79, in <module>
main()
File "/tmp/tmpn5leys7s/tmptl5nefyx.py", line 60, in main
input()
EOFError: EOF when reading a line
| |
s489061059 | p02265 | u535719732 | 1559567584 | Python | Python3 | py | Runtime Error | 0 | 0 | 382 | from collections import deque
n = int(input())
dList = deque()
for _ in range(n):
op = list(map(str,input().split()))
if(op[0] == "insert"):
dList.appendleft(op[1])
elif(op[0] == "delete"):
try:
dList.remove(op[1])
except:
pass
elif(op[0] == "deleteFirst"):
dList.popleft()
eli... | Traceback (most recent call last):
File "/tmp/tmpztcqrwnw/tmp841po7ln.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s507764972 | p02265 | u135880652 | 1559568964 | Python | Python3 | py | Runtime Error | 0 | 0 | 478 | from collections import deque
n = int(input())
dlist = deque()
for i in range(n):
arr = input().split()
cmd = ''
key = 0
cmd = arr[0]
if len(arr) > 1:
key = arr[1]
if cmd == 'insert':
dlist.appendleft(key)
elif cmd == 'delete':
try:
dlist.remove(key)
... | File "/tmp/tmp2f6ygprl/tmpxy9tws47.py", line 21
elif cmd == 'deleteFirst':
IndentationError: expected an indented block after 'except' statement on line 19
| |
s990645531 | p02265 | u319740114 | 1559584922 | Python | Python3 | py | Runtime Error | 0 | 0 | 502 | array = []
def func_insert(num):
array.insert(0, num)
def func_delete(num):
array.remove(num)
def func_deleteFirst():
array.pop(0)
def func_deleteLast():
array.pop()
n = int(input())
for _ in range(n):
command, key = input().split()
if command == 'insert':
func_insert(key)
elif... | Traceback (most recent call last):
File "/tmp/tmptcp913le/tmp9dxsz5w0.py", line 15, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s279304965 | p02265 | u319740114 | 1559585169 | Python | Python3 | py | Runtime Error | 20 | 5600 | 519 | array = []
def func_insert(num):
array.insert(0, num)
def func_delete(num):
array.remove(num)
def func_deleteFirst():
array.pop(0)
def func_deleteLast():
array.pop()
n = int(input())
for _ in range(n):
command = input().split()
if command[0] == 'insert':
func_insert(command[1])
... | Traceback (most recent call last):
File "/tmp/tmp5skl5yvt/tmpme3pb0vy.py", line 15, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s335152730 | p02265 | u507118101 | 1419911209 | Python | Python | py | Runtime Error | 20 | 4220 | 302 | n = input()
array = []
for i in range(n):
inst = raw_input().split()
if inst[0] == "insert":
array.insert(0,inst[1])
if inst[0] == "delete":
array.remove(inst[1])
if inst[0] == "deleteFirst":
del array[0]
if inst[0] == "deleteLast":
del array[len(array)-1]
print " ".join(i for i in array) | File "/tmp/tmpys_95u4b/tmprzuy0f66.py", line 13
print " ".join(i for i in array)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s083232437 | p02265 | u507118101 | 1420127021 | Python | Python | py | Runtime Error | 0 | 0 | 328 | n = input()
array = []
for i in range(n):
inst = raw_input().split()
if inst[0] == "insert":
array.insert(0,inst[1])
if inst[0] == "delete":
if inst[1] in array:
array.remove(inst[1])
if inst[0] == "deleteFirst":
array.pop[0]
if inst[0] == "deleteLast":
array.pop([len(array)-1])
print " ".join(i for i i... | File "/tmp/tmpmc_tsifj/tmp652runxf.py", line 14
print " ".join(i for i in array)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s145182070 | p02265 | u507118101 | 1420127190 | Python | Python | py | Runtime Error | 0 | 0 | 326 | n = input()
array = []
for i in range(n):
inst = raw_input().split()
if inst[0] == "insert":
array.insert(0,inst[1])
if inst[0] == "delete":
if inst[1] in array:
array.remove(inst[1])
if inst[0] == "deleteFirst":
array.pop[0]
if inst[0] == "deleteLast":
array.pop(len(array)-1)
print " ".join(i for i in ... | File "/tmp/tmpuny3flqr/tmpzjca47zc.py", line 14
print " ".join(i for i in array)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s135674345 | p02265 | u567380442 | 1421368695 | Python | Python3 | py | Runtime Error | 30 | 6728 | 364 | from collections import deque
import sys
dlist = deque()
func = {'insert':dlist.appendleft, 'delete':dlist.remove, 'deleteFirst':dlist.popleft, 'deleteLast':dlist.pop}
n = int(sys.stdin.readline())
for line in sys.stdin:
command = line.split()
if len(command) == 2:
command[1] = int(command[1])
f... | Traceback (most recent call last):
File "/tmp/tmpyvf8a2ll/tmpitvcu00_.py", line 8, in <module>
n = int(sys.stdin.readline())
^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s578387919 | p02265 | u481221703 | 1421636353 | Python | Python | py | Runtime Error | 0 | 0 | 304 | n=int(raw_input())
l = []
for x in xrange(n):
cmd, a = raw_input().split()
cmd = str(cmd)
a = int(a)
if cmd is "insert":
l.insert(0, a)
elif cmd is "delete":
l.pop(a)
elif cmd is "deleteFirst":
l.pop(0)
elif cmd is "deleteLast":
l.pop()
print l | File "/tmp/tmpj0jw0e9v/tmpte3v8cac.py", line 15
print l
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s925941852 | p02265 | u481221703 | 1421636503 | Python | Python | py | Runtime Error | 0 | 0 | 307 | n=int(raw_input())
l = []
for x in xrange(n):
cmd = raw_input().split()
cmd = str(cmd[0])
if cmd is "insert":
l.insert(0, int(cmd[1])
elif cmd is "delete":
l.pop(int(cmd[1])
elif cmd is "deleteFirst":
l.pop(0)
elif cmd is "deleteLast":
l.pop()
print l | File "/tmp/tmpcokofohm/tmpn2qqfgym.py", line 8
elif cmd is "delete":
^^^^
SyntaxError: invalid syntax
| |
s495709897 | p02265 | u481221703 | 1421640152 | Python | Python | py | Runtime Error | 0 | 0 | 327 | n=int(raw_input())
l = []
for x in xrange(n):
msg = raw_input().split()
cmd = str(msg[0])
if cmd == "insert":
l.insert(0, int(msg[1]))
elif cmd == "delete":
l.pop(int(msg[1]))
elif cmd == "deleteFirst":
l.pop(0)
elif cmd == "deleteLast":
l.pop()
for x in l:
p... | File "/tmp/tmpqda7m57a/tmp_ql5ukr7.py", line 16
print x,
^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s201237298 | p02265 | u481221703 | 1421640435 | Python | Python | py | Runtime Error | 20 | 4212 | 320 | n=int(raw_input())
l = []
for x in xrange(n):
msg = raw_input().split()
cmd = msg[0]
if cmd == "insert":
l.insert(0, msg[1])
elif cmd == "delete":
l.remove(msg[1])
elif cmd == "deleteFirst":
l.pop(0)
elif cmd == "deleteLast":
l.pop()
for x in l:
print int(x), | File "/tmp/tmp3yunm9jk/tmpqxzfs2h9.py", line 16
print int(x),
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s226619569 | p02265 | u481221703 | 1421640893 | Python | Python | py | Runtime Error | 20 | 4216 | 315 | n=int(raw_input())
l = []
for x in xrange(n):
msg = raw_input().split()
cmd = msg[0]
if cmd == "insert":
l.insert(0, msg[1])
elif cmd == "delete":
l.remove(msg[1])
elif cmd == "deleteFirst":
l.pop(0)
elif cmd == "deleteLast":
l.pop()
for x in l:
print x, | File "/tmp/tmpy85wnz3e/tmp8s1va16_.py", line 16
print x,
^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s168585116 | p02265 | u481221703 | 1421645685 | Python | Python | py | Runtime Error | 0 | 0 | 308 | n=int(raw_input())
l = []
for x in xrange(n):
m = raw_input().split()
cmd = m[0]
if cmd == "insert":
l.insert(0, m[1])
elif cmd == "delete":
if msg[1] in l:
l.remove(m[1])
elif cmd[7] == "F":
l.pop(0)
else:
l.pop()
for x in l:
print x, | File "/tmp/tmp06c0ew6o/tmpdv76mtt_.py", line 17
print x,
^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s263511193 | p02265 | u481221703 | 1421645972 | Python | Python | py | Runtime Error | 0 | 0 | 345 | n=int(raw_input())
l = []
for x in xrange(n):
m = raw_input().split()
cmd = m[0][-4]
if c == "s":
l.insert(0, m[1])
elif c == "i":
l.pop(0)
elif c == "L":
l.pop()
else:
try:
l.remove(m[1])
except Exception, e:
pass
... | File "/tmp/tmpbdzj07_t/tmp9oa8j7ko.py", line 15
except Exception, e:
^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
| |
s296034245 | p02265 | u879226672 | 1426873219 | Python | Python | py | Runtime Error | 10 | 4592 | 388 | from collections import deque
n=int(raw_input())
que = deque()
for i in xrange(n):
o = raw_input()
if o == 'deleteFirst':
del que[0]
elif o == 'deleteLast':
del que[-1]
else:
c,p = o.split()
p = int(p)
if c == 'insert':
que.appendleft(p)
elif c... | File "/tmp/tmp1zrmtc13/tmponz4xtx9.py", line 17
print ' '.join(map(str,que))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s251929031 | p02265 | u879226672 | 1426873679 | Python | Python | py | Runtime Error | 20 | 4596 | 412 | # -*- coding: utf-8 -*-
from collections import deque
n=int(raw_input())
que = deque()
for i in xrange(n):
o = raw_input()
if o == 'deleteFirst':
del que[0]
elif o == 'deleteLast':
del que[-1]
else:
c,p = o.split()
p = int(p)
if c == 'insert':
que.appe... | File "/tmp/tmp68ld63hb/tmpdw64u7pz.py", line 18
print ' '.join(map(str,que))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s836072404 | p02265 | u408260374 | 1431623040 | Python | Python3 | py | Runtime Error | 30 | 6732 | 402 | from collections import deque
que = deque()
for i in range(int(input())):
command = input()
if command == 'deleteFirst':
que.popleft()
elif command == 'deleteLast':
que.pop()
else:
c, n = command.split()
if c == 'insert':
que.appendleft(int(n))
elif c ... | Traceback (most recent call last):
File "/tmp/tmp__cuvjed/tmpjeoyt8oh.py", line 3, in <module>
for i in range(int(input())):
^^^^^^^
EOFError: EOF when reading a line
| |
s722836916 | p02265 | u689297737 | 1432224208 | Python | Python | py | Runtime Error | 20 | 4344 | 2376 | # http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_3_C
# Doubly Linked List
# Result:
import sys
class DoublyLikedList(object):
def __init__(self):
self.head = None
self.tail = None
def __str__(self):
vals = []
pointer = self.head
while pointer != None:
... | File "/tmp/tmp575xm3su/tmp_djtfa44.py", line 91
print lst
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s452319717 | p02265 | u604774382 | 1433155300 | Python | Python | py | Runtime Error | 10 | 4216 | 298 | n = int( raw_input( ) )
eles = []
for i in range( n ):
op = raw_input( ).split( " " )
if "insert" == op[0]:
eles.insert( 0, op[1] )
elif "delete" == op[0]:
eles.remove( op[1] )
elif "deleteFirst" == op[0] :
del eles[0]
elif "deleteLast" == op[0]:
eles.pop( )
print( " ".join( eles ) ) | Traceback (most recent call last):
File "/tmp/tmpquqop6iw/tmp_aui5crg.py", line 1, in <module>
n = int( raw_input( ) )
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s073148789 | p02265 | u604774382 | 1433156909 | Python | Python | py | Runtime Error | 0 | 0 | 332 | n = int( raw_input( ) )
eles = []
for i in range( n ):
op = raw_input( ).split( " " )
if "insert" == op[0]:
eles.insert( 0, op[1] )
elif "delete" == op[0]:
for val in eles:
if op[1] == val:
eles.pop( i )
elif "deleteFirst" == op[0] :
del eles[0]
elif "deleteLast" == op[0]:
eles.pop( )
print( " ".jo... | Traceback (most recent call last):
File "/tmp/tmpzyo96bwc/tmpqcdryjcf.py", line 1, in <module>
n = int( raw_input( ) )
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s449762330 | p02265 | u604774382 | 1433160553 | Python | Python | py | Runtime Error | 0 | 0 | 385 | import sys
n = int( raw_input( ) )
eles = []
lines = sys.stdin.readlines()
for line in lines:
op = line.split( " " )
op[1] = op[1].strip( )
if "insert" == op[0]:
eles.insert( 0, op[1] )
elif "delete" == op[0]:
if op[1].rstrip( ) in eles:
eles.remove( op[1] )
elif "deleteFirst" == op[0] :
del eles[0]
eli... | Traceback (most recent call last):
File "/tmp/tmp85yubbw_/tmpponvfxu5.py", line 3, in <module>
n = int( raw_input( ) )
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s878451648 | p02265 | u604774382 | 1433160647 | Python | Python | py | Runtime Error | 0 | 0 | 359 | import sys
n = int( raw_input( ) )
eles = []
for line in sys.stdin:
op = line.split( " " )
op[1] = op[1].strip( )
if "insert" == op[0]:
eles.insert( 0, op[1] )
elif "delete" == op[0]:
if op[1].rstrip( ) in eles:
eles.remove( op[1] )
elif "deleteFirst" == op[0] :
del eles[0]
elif "deleteLast" == op[0]:
... | Traceback (most recent call last):
File "/tmp/tmpdz2qsw0z/tmpp94eywfu.py", line 3, in <module>
n = int( raw_input( ) )
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s069549351 | p02265 | u140201022 | 1433309728 | Python | Python | py | Runtime Error | 0 | 0 | 267 | n=int(raw_input())
while n:
n-=1
s=map(str,raw_input().split())
if s[0][0]=='i':
ans.insert(0,s[1])
elif s[0][-3]=='r':
ans.pop(0)
elif s[0][-3]=='a':
ans.pop(0)
else:
ans.remove(s[1])
for i in ans:
print i, | File "/tmp/tmpvb52qbmg/tmpoucmaf7x.py", line 14
print i,
^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s204536467 | p02265 | u140201022 | 1433311073 | Python | Python | py | Runtime Error | 0 | 0 | 347 | ans=[]
n=int(raw_input())
while n:
n-=1
s=map(str,raw_input().split())
if s[0][0]=='i':
ans.insert(0,s[1])
elif s[0][-3]=='r':
ans.pop(0)
elif s[0][-3]=='a':
ans.pop()
else:
for i,j in enumerate(ans):
if j==s[1]:
ans.pop(i)
... | File "/tmp/tmp9um_kynm/tmp5s_inwol.py", line 17
print ' '.join(i)
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s519409197 | p02265 | u140201022 | 1433349313 | Python | Python | py | Runtime Error | 20 | 4596 | 348 | import sys
import collections
n=int(raw_input())
ans=collections.deque()
while n:
n-=1
s=sys.stdin.readline().rstrip().split(' ')
if s[0][0]=='i':
ans.appendleft(s[1])
elif s[0][-3]=='r':
ans.popleft()
elif s[0][-3]=='a':
ans.pop()
else:
ans.remove(s[1])
sys.stdou... | Traceback (most recent call last):
File "/tmp/tmp2bezm3__/tmps29xkl_r.py", line 3, in <module>
n=int(raw_input())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s849680961 | p02265 | u749752649 | 1434260375 | Python | Python | py | Runtime Error | 20 | 4236 | 710 | class LinkedList():
def __init__(self):
self.linked_list = []
def insert(self,x):
self.linked_list.insert(0,x)
def delete(self,x):
self.linked_list.remove(x)
def deleteFirst(self):
self.linked_list.pop(0)
def deleteLast(self):
self.linked_list.pop(-1)
def get(self):
return ' '.join(s... | File "/tmp/tmprhbvnl9a/tmpvdams_zk.py", line 32
print linkedlist.get()
^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s677066717 | p02265 | u609407244 | 1436261798 | Python | Python3 | py | Runtime Error | 30 | 6732 | 440 | import collections
n = int(input())
que = collections.deque()
for _ in range(n):
command = input()
if 'insert' in command:
command, num = command.split()
que.appendleft(int(num))
elif 'deleteFirst' in command:
que.popleft()
elif 'deleteLast' in command:
que.pop()
elif... | Traceback (most recent call last):
File "/tmp/tmphhykb7o0/tmpa_il_wpb.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s174167682 | p02265 | u609407244 | 1436263121 | Python | Python3 | py | Runtime Error | 0 | 0 | 498 | import sys
import collections
n = int(input())
que = collections.deque()
for _ in range(n):
command = sys.stdin.readline().strip()
if 'i' == command[0]:
command, num = command
que.appendleft(num)
elif 'deleteFirst\n' == command:
que.popleft()
elif 'deleteLast\n' == command:
... | Traceback (most recent call last):
File "/tmp/tmp_4a74nz7/tmp6tjil6pj.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.