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
s571415269
p02265
u477717106
1524817794
Python
Python3
py
Runtime Error
0
0
300
n, q = map(int, input().split()) l = [] for i in range(n): t = [] for j in input().split(): t += [j] t[1] = int(t[1]) l += [t] c = 0 while len(l) > 0: if l[0][1] > q: l[0][1] -= q l += [l[0]] l.pop(0) c += q else: c += l[0][1] print(l[0][0], c) l.pop(0)
Traceback (most recent call last): File "/tmp/tmpg_vjcqqi/tmpylhg13hn.py", line 1, in <module> n, q = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s390736816
p02265
u724548524
1524976346
Python
Python3
py
Runtime Error
20
5600
321
n = int(input()) a = [] for i in range(n): c = input() if c == "deleteFirst": a.pop(0) elif c == "deleteLast": a.pop() else: c, v = c.split() v = int(v) if c == "insert": a.insert(0, v) else: a.remove(v) print(" ".join(map(str, a)))...
Traceback (most recent call last): File "/tmp/tmpzmf69b8x/tmp1m_akfkf.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s036219723
p02265
u255317651
1524994916
Python
Python3
py
Runtime Error
0
0
426
# -*- coding: utf-8 -*- """ Created on Sun Apr 29 18:31:35 2018 ALDS1-3c simple implementation owing to the feature of python. @author: maezawa """ a = [] n = int(input()) for i in range(n): com, key = input().split() if com == 'insert': a.insert(0, key) elif com == 'delete': a.remove(key) ...
Traceback (most recent call last): File "/tmp/tmprtyov5e1/tmp6z6455sp.py", line 9, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s823429782
p02265
u255317651
1524995319
Python
Python3
py
Runtime Error
20
5612
631
# -*- coding: utf-8 -*- """ Created on Sun Apr 29 18:31:35 2018 ALDS1-3c simple implementation owing to the feature of python. @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) a = [] n = int(input()) for i...
Traceback (most recent call last): File "/tmp/tmp108xusru/tmpc9xa6vbp.py", line 15, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s663598011
p02265
u255317651
1525003182
Python
Python3
py
Runtime Error
0
0
767
# -*- coding: utf-8 -*- """ Created on Sun Apr 29 18:31:35 2018 ALDS1-3c simple implementation owing to the feature of python. @author: maezawa """ from sys import stdin 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) a = []...
Traceback (most recent call last): File "/tmp/tmpaviqrm_9/tmpmk944zbj.py", line 17, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s873296504
p02265
u255317651
1525003827
Python
Python3
py
Runtime Error
0
0
822
# -*- coding: utf-8 -*- """ Created on Sun Apr 29 18:31:35 2018 ALDS1-3c simple implementation owing to the feature of python. @author: maezawa """ from sys def print_array(g): ans = str(g[0]) if len(g) > 1: for i in range(1,len(g)): ans += ' '+str(g[i]) sys.stdout.write(ans) a = [] n...
File "/tmp/tmpric15tub/tmprh4lctm0.py", line 7 from sys ^ SyntaxError: invalid syntax
s982014175
p02265
u255317651
1525004715
Python
Python3
py
Runtime Error
0
0
841
# -*- coding: utf-8 -*- """ Created on Sun Apr 29 18:31:35 2018 ALDS1-3c simple implementation owing to the feature of python. @author: maezawa """ import sys def print_array(g): sys.stdout.write(g[0]) if len(g) > 1: for i in range(1,len(g)): sys.stdout.write(' '+str(g[i])) sys.stdout....
File "/tmp/tmpy5qte_6p/tmp3dawzaly.py", line 14 sys.stdout.write(\n) ^ SyntaxError: unexpected character after line continuation character
s583437929
p02265
u255317651
1525004743
Python
Python3
py
Runtime Error
0
0
843
# -*- coding: utf-8 -*- """ Created on Sun Apr 29 18:31:35 2018 ALDS1-3c simple implementation owing to the feature of python. @author: maezawa """ import sys def print_array(g): sys.stdout.write(g[0]) if len(g) > 1: for i in range(1,len(g)): sys.stdout.write(' '+str(g[i])) sys.stdout....
Traceback (most recent call last): File "/tmp/tmp2de72m1x/tmpiqf5qcs4.py", line 17, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s593482261
p02265
u064320529
1525042681
Python
Python3
py
Runtime Error
20
5604
440
n=int(input()) dll=[] for i in range(n): line=input() d=line.split(" ") if d[0]=="insert": dll=[int(d[1])]+dll elif d[0]=="delete": ind=dll.index(int(d[1])) dll.pop(ind) elif d[0]=="deleteFirst": dll.pop(0) elif d[0]=="deleteLast": dll.pop() for i in r...
Traceback (most recent call last): File "/tmp/tmpui3a_kwh/tmpndf6vkhp.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s688642496
p02265
u064320529
1525043438
Python
Python3
py
Runtime Error
20
5600
435
n=int(input()) dll=[] for i in range(n): line=input() d=line.split(" ") if d[0]=="insert": dll=[int(d[1])]+dll elif d[0]=="delete": ind=dll.index(int(d[1])) dll.pop(ind) elif d[0]=="deleteFirst": dll.pop(0) elif d[0]=="deleteLast": dll.pop() for i in r...
Traceback (most recent call last): File "/tmp/tmp6wp_6ntl/tmpafmf8618.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s672867430
p02265
u126478680
1525063134
Python
Python3
py
Runtime Error
20
5604
438
#! python3 # doubly_linked_list.py keys = [] n = int(input()) for i in range(n): command = input() if command == 'deleteFirst': keys.pop(0) elif command == 'deleteLast': keys.pop(-1) else: command, x = command.split(' ') if command == 'insert': keys.insert(0...
Traceback (most recent call last): File "/tmp/tmpshrb4zxw/tmpmbn44gvo.py", line 6, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s964701569
p02265
u896240461
1525081599
Python
Python3
py
Runtime Error
20
5604
441
def pr(a): for i in range(len(a)): print(a[i],end="") if i == len(a)-1: print("") else : print(" ",end="") n = int(input()) a = [] for i in range(n): x = input().split() if x[0] == "insert": a.insert(0,int(x[1])) elif x[0] == "delete": a.r...
Traceback (most recent call last): File "/tmp/tmp_4ixfjvy/tmpcq6vorc1.py", line 9, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s326902163
p02265
u017435045
1525246181
Python
Python3
py
Runtime Error
0
0
320
from collections import deque d = deque() n = int(input()) for i in range(n): s = input().split() if s[0] == 'insert': d.appendleft(int(s[1]) elif s[0] =='delete': if s[1] in d: d.remove(s[1]) else: pass elif s[0] =='deleteFirst': d.popleft() else: d.pop() print(*d)
File "/tmp/tmp7qopm5jw/tmp2dln6swp.py", line 6 if s[0] == 'insert': d.appendleft(int(s[1]) ^ SyntaxError: '(' was never closed
s746843309
p02265
u017435045
1525246213
Python
Python3
py
Runtime Error
0
0
320
from collections import deque d = deque() n = int(input()) for i in range(n): s = input().split() if s[0] == 'insert': d.appendleft(int(s[1]) elif s[0] =='delete': if s[1] in d: d.remove(s[1]) else: pass elif s[0] =='deleteFirst': d.popleft() else: d.pop() print(*d)
File "/tmp/tmpc22oavtw/tmp2vdr0eb9.py", line 6 if s[0] == 'insert': d.appendleft(int(s[1]) ^ SyntaxError: '(' was never closed
s367763107
p02265
u017435045
1525246753
Python
Python3
py
Runtime Error
0
0
344
from collections import deque d = deque() n = int(input()) for i in range(n): s = input().split() if str(s[0][6]) =='F': d.popleft() elif: str(s[0][6]) =='L':d.pop() elif str(s[0][0]) == 'i': d.appendleft(int(s[1])) else : if int(s[1]) in d: d.remove(int(s[1])) else: pas...
File "/tmp/tmpqj_85bph/tmpfh6wqknj.py", line 7 elif: str(s[0][6]) =='L':d.pop() ^ SyntaxError: invalid syntax
s033658447
p02265
u017435045
1525246765
Python
Python3
py
Runtime Error
0
0
344
from collections import deque d = deque() n = int(input()) for i in range(n): s = input().split() if str(s[0][6]) =='F': d.popleft() elif: str(s[0][6]) =='L':d.pop() elif str(s[0][0]) == 'i': d.appendleft(int(s[1])) else : if int(s[1]) in d: d.remove(int(s[1])) else: pas...
File "/tmp/tmpbm925wjw/tmp7ggcjxae.py", line 7 elif: str(s[0][6]) =='L':d.pop() ^ SyntaxError: invalid syntax
s468900130
p02265
u017435045
1525246801
Python
Python3
py
Runtime Error
0
0
333
from collections import deque d = deque() n = int(input()) for i in range(n): s = input().split() if str(s[0][6]) =='F': d.popleft() elif: str(s[0][6]) =='L':d.pop() elif str(s[0][0]) == 'i': d.appendleft(int(s[1])) else : if int(s[1]) in d: d.remove(int(s[1])) else: pas...
File "/tmp/tmpke9eeqgu/tmppnr0lgi0.py", line 7 elif: str(s[0][6]) =='L':d.pop() ^ SyntaxError: invalid syntax
s164717692
p02265
u017435045
1525246828
Python
Python3
py
Runtime Error
0
0
333
from collections import deque d = deque() n = int(input()) for i in range(n): s = input().split() if str(s[0][6]) =='F': d.popleft() elif: str(s[0][6]) =='L':d.pop() elif str(s[0][0]) == 'i': d.appendleft(int(s[1])) else : if int(s[1]) in d: d.remove(int(s[1])) else: pas...
File "/tmp/tmpvfubvcew/tmpn4okkyp4.py", line 7 elif: str(s[0][6]) =='L':d.pop() ^ SyntaxError: invalid syntax
s108355350
p02265
u017435045
1525246843
Python
Python3
py
Runtime Error
0
0
333
from collections import deque d = deque() n = int(input()) for i in range(n): s = input().split() if str(s[0][6]) =='F': d.popleft() elif: str(s[0][6]) =='L':d.pop() elif str(s[0][0]) == 'i': d.appendleft(int(s[1])) else : if int(s[1]) in d: d.remove(int(s[1])) else: pas...
File "/tmp/tmp47pz6elr/tmp7drvobgx.py", line 7 elif: str(s[0][6]) =='L':d.pop() ^ SyntaxError: invalid syntax
s079489713
p02265
u772417059
1525288910
Python
Python
py
Runtime Error
0
0
298
n=int(input()) array=[] for i in range(n): a=input() if a=="deleteFirst": array.pop(0) elif a=="deleteLast": array.pop() else: command,x=a.split() if command=="insert": array.insert(0,x) elif command=="delete": if (x in array): array.remove(x) print(" ".join(array))
Traceback (most recent call last): File "/tmp/tmpeun76_vh/tmpa7as_5jo.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s458449517
p02265
u564105430
1525674293
Python
Python3
py
Runtime Error
20
6004
494
#ALDS_3_C 16D8103010K Ko Okasaki from collections import deque def pr(A,n): for i in range(n): if i!=n-1: print(A[i],end=" ") else: print(A[i]) n=int(input()) que_r=deque() for i in range(n): s=input().split() if s[0]=="insert": que_r.appendleft(int(s[1]...
Traceback (most recent call last): File "/tmp/tmpmiv49zth/tmp2cwj90bo.py", line 12, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s435665600
p02265
u564105430
1525674503
Python
Python3
py
Runtime Error
30
6004
460
from collections import deque def pr(A,n): for i in range(n): if i!=n-1: print(A[i],end=" ") else: print(A[i]) n=int(input()) que_r=deque() for i in range(n): s=input().split() if s[0]=="insert": que_r.appendleft(int(s[1])) elif s[0]=="delete": ...
Traceback (most recent call last): File "/tmp/tmpw8wlg9h4/tmpv5_2cg_y.py", line 10, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s209052793
p02265
u564105430
1525674819
Python
Python3
py
Runtime Error
0
0
493
from collections import deque def pr(A,n): for i in range(n): if i!=n-1: print(A[i],end=" ") else: print(A[i]) n=int(input()) que_r=deque() c=0 for i in range(n): s=input().split() if s[0]=="insert": que_r.appendleft(int(s[1])) elif s[0]=="delete" and ...
Traceback (most recent call last): File "/tmp/tmpdoflabd2/tmpemk4froc.py", line 10, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s870939396
p02265
u564105430
1525675613
Python
Python3
py
Runtime Error
0
0
477
def pr(A,n): for i in range(n): if i!=n-1: print(A[i],end=" ") else: print(A[i]) n=int(input()) que_r=deque() for i in range(n): s=input().split() if s[0]=="insert": que_r.appendleft(int(s[1])) elif s[0]=="delete" and que_r.count(int(s[1]))>=1: ...
Traceback (most recent call last): File "/tmp/tmpedy2wdgh/tmp38e80h1h.py", line 8, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s895598601
p02265
u896240461
1525678349
Python
Python3
py
Runtime Error
0
0
2001
def pr(data,next,head,tail): i = head while(1): if i == -1: print("") break print(data[i],end = "") i = next[i] if i != -1 : print(" ",end="") def ins_f(data,next,prev,x,head,tail): size = len(data) if head != -1 : data.append(...
Traceback (most recent call last): File "/tmp/tmpz3tbl5n6/tmp6vs3ff5h.py", line 71, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s360032973
p02265
u896240461
1525678406
Python
Python3
py
Runtime Error
0
0
2028
def pr(data,next,head,tail): i = head while(1): if i == -1: print("") break print(data[i],end = "") i = next[i] if i != -1 : print(" ",end="") def ins_f(data,next,prev,x,head,tail): size = len(data) if head != -1 : data.append(...
Traceback (most recent call last): File "/tmp/tmpbz9tolxk/tmpp_b_rn_6.py", line 71, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s148793343
p02265
u564105430
1525679868
Python
Python3
py
Runtime Error
0
0
341
from collections import deque n=int(input()) que_r=deque() data=deque() for i in range(n): s=input() l=len(s) if s[0]=="i": que_r.appendleft(s[7:]) elif s[6]==" ": try: que_r.remove(s[7:]) except: pass elif l>10: que_r.popleft() elif l>6: que...
Traceback (most recent call last): File "/tmp/tmp8cmyqypn/tmpdmkmzxh7.py", line 3, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s054565295
p02265
u408444038
1525759852
Python
Python3
py
Runtime Error
0
0
403
n = int(input()) c = [0]*n s = [] a = [] for i in range(n): c[i] = list(input().split()) if c[i][0]=='insert': s.append(c[i][1]) elif c[i][0]=='delete': s.remove(c[i][1]) elif c[i][0]=='deleteFirst': del s[len(s)-1] elif c[i][0]=='deleteLast': del s[0] else ...
File "/tmp/tmpgiokk7os/tmpq72c4ncz.py", line 17 else ^ SyntaxError: expected ':'
s785686304
p02265
u848218390
1525793261
Python
Python3
py
Runtime Error
0
0
2178
class DLL: class Node: def __init__(self, x, y, z): self.v = x self.prv = y self.nxt = z def __init__(self): init = DLL.Node(None, None, None) init.prv = init init.nxt = init self.size = 0 self.init = init def insert(self,...
Traceback (most recent call last): File "/tmp/tmpv5hfkkl3/tmpr2affnzq.py", line 73, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s833276802
p02265
u848218390
1525793353
Python
Python3
py
Runtime Error
0
0
2183
class DLL: class Node: def __init__(self, x, y, z): self.v = x self.prv = y self.nxt = z def __init__(self): init = DLL.Node(None, None, None) init.prv = init init.nxt = init self.size = 0 self.init = init def insert(self,...
Traceback (most recent call last): File "/tmp/tmp3ymokup9/tmpe6rv2t15.py", line 75, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s983627272
p02265
u481175672
1525807952
Python
Python
py
Runtime Error
0
0
487
n = int(input()) list = [] check = 0 for i in range(n): l = input().split() if l[0] == "insert": list.insert(0,int(l[1])) elif l[0] == "delete": for j in range(len(list)): if list[j] == int(l[1]): check = 1 if check == 1: list.remove(int(l[1])) elif l[0] == "deleteFirst": del list[0] ...
Traceback (most recent call last): File "/tmp/tmp5k3yqju5/tmpiwu6v_93.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s273764381
p02265
u728137020
1525826088
Python
Python3
py
Runtime Error
20
5600
316
a=int(input()) list=[] for i in range(a): order=input().split() if order[0]=="insert": list.append(order[1]) elif order[0]=="delete": list.remove(order[1]) elif order[0]=="deleteFirst": list.pop(0) elif order[0]=="deleteLast": list.pop(len(list)-1) print(*list)
Traceback (most recent call last): File "/tmp/tmpuai1t9m3/tmpurov_on8.py", line 1, in <module> a=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s017998748
p02265
u728137020
1525826853
Python
Python3
py
Runtime Error
0
0
353
a=int(input()) list=[] for i in range(a): order=input().split() if order[0]=="insert": list.appendleft(order[1]) elif order[0]=="delete": if order[1] in list: list.remove(order[1]) elif order[0]=="deleteFirst": list.pop(0) elif order[0]=="deleteLast": lis...
Traceback (most recent call last): File "/tmp/tmpa3rw6ni5/tmp0pp0q87i.py", line 1, in <module> a=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s592431532
p02265
u728137020
1525827271
Python
Python3
py
Runtime Error
0
0
390
from collections import deque a=int(input()) list=deque([]) for i in range(a): order=input().split() if order[0]=="insert": list.appendleft(order[1]) elif order[0]=="delete": if order[1] in list: list.remove(order[1]) elif order[0]=="deleteFirst": list.pop(0) eli...
Traceback (most recent call last): File "/tmp/tmp2350kxyg/tmp3yeohsd3.py", line 2, in <module> a=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s917490836
p02265
u728137020
1525827384
Python
Python
py
Runtime Error
0
0
378
from collections import deque a=int(input()) list=deque([]) for i in range(a): order=input().split() if order[0]=="insert": list.appendleft(order[1]) elif order[0]=="delete": if order[1] in list: list.remove(order[1]) elif order[0]=="deleteFirst": list.pop() elif...
Traceback (most recent call last): File "/tmp/tmpyrlkieb6/tmpcrnmgd_w.py", line 2, in <module> a=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s828912441
p02265
u728137020
1525827751
Python
Python
py
Runtime Error
0
0
382
from collections import deque a=int(input()) list=deque([]) for i in range(a): order=input().split() if order[0]=="insert": list.appendleft(order[1]) elif order[0]=="delete": if order[1] in list: list.remove(order[1]) elif order[0]=="deleteFirst": list.popleft() ...
Traceback (most recent call last): File "/tmp/tmpgqhe1dxp/tmpkspxysp9.py", line 2, in <module> a=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s512609615
p02265
u252641015
1525847488
Python
Python3
py
Runtime Error
0
0
1546
#include <list> #include <string> using namespace std; #define ll long long int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin>>n; string com; int key; list<ll> lst; list<ll>::iterator it,i=lst.end(); while(n--){ cin>>com; if(com=="insert"){ c...
File "/tmp/tmpzp2ve8nm/tmpkpe_zh7a.py", line 47 2015-03-23 23:30 ^ SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
s608678151
p02265
u252641015
1525847505
Python
Python3
py
Runtime Error
0
0
823
#include <list> #include <string> using namespace std; #define ll long long int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin>>n; string com; int key; list<ll> lst; list<ll>::iterator it,i=lst.end(); while(n--){ cin>>com; if(com=="insert"){ c...
File "/tmp/tmpktizuxk3/tmp6smjkoua.py", line 3 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s142371014
p02265
u252641015
1525847594
Python
Python
py
Runtime Error
0
0
826
#include <list> #include <string> using namespace std; #define ll long long int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin>>n; string com; int key; list<ll> lst; list<ll>::iterator it,i=lst.end(); while(n--){ cin>>com; if(com=="insert"){ ...
File "/tmp/tmp7szrh5sr/tmpjh4jnepk.py", line 4 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s672655258
p02265
u252641015
1525847604
Python
Python3
py
Runtime Error
0
0
826
#include <list> #include <string> using namespace std; #define ll long long int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin>>n; string com; int key; list<ll> lst; list<ll>::iterator it,i=lst.end(); while(n--){ cin>>com; if(com=="insert"){ ...
File "/tmp/tmpiwndqpqu/tmppyendb8l.py", line 4 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s109654156
p02265
u252641015
1525847844
Python
Python3
py
Runtime Error
0
0
480
import sys A=[] fp =0 bp =0 n=int(raw_input()) while n: s = raw_input() 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: ...
File "/tmp/tmptmfsg_g8/tmp8afgj38n.py", line 30 print int(e), ^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s324404657
p02265
u898049910
1527077913
Python
Python3
py
Runtime Error
20
5596
425
n = int(input()) linked_list = [] for _ in range(n): command = input() if "insert" in command: x = command.split()[-1] linked_list.insert(0, x) elif command == "deleteFirst": del linked_list[0] elif command == "deleteLast": del linked_list[-1] elif "delete" in comm...
Traceback (most recent call last): File "/tmp/tmpcppdqvy8/tmp15gikxym.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s305440884
p02265
u898049910
1527077929
Python
Python3
py
Runtime Error
20
5600
425
n = int(input()) linked_list = [] for _ in range(n): command = input() if "insert" in command: x = command.split()[-1] linked_list.insert(0, x) elif command == "deleteFirst": del linked_list[0] elif command == "deleteLast": del linked_list[-1] elif "delete" in comm...
Traceback (most recent call last): File "/tmp/tmpe_0fngkv/tmpvo9skdr7.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s392325339
p02265
u938045879
1527226079
Python
Python3
py
Runtime Error
20
5604
372
n = int(input()) output = [] for i in range(n): li = input().split(' ') if(li[0] == 'insert'): output.insert(0, int(li[1])) elif(li[0] == 'delete'): output.remove(int(li[1])) elif(li[0] == 'deleteFirst'): del output[0] elif(li[0] == 'deleteLast'): del output[-1] str_l...
Traceback (most recent call last): File "/tmp/tmp7uu3c0hz/tmp4tccr3qv.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s276497611
p02265
u957840591
1527385308
Python
Python3
py
Runtime Error
0
0
1532
import sys class Node(): def __init__(self, key=None, prev=None, next=None): self.key = key self.prev = prev self.next = next class DoublyLinkedList(): def __init__(self): self.head = Node() self.head.next = self.head self.head.prev = self.head def inser...
Traceback (most recent call last): File "/tmp/tmp28rurd77/tmpdxbz2rn3.py", line 54, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s630977384
p02265
u986478725
1527479402
Python
Python3
py
Runtime Error
20
5596
585
# ALDS1_3_C. def show(a): # 配列の中身を出力する。 _str = "" for i in range(len(a) - 1): _str += str(a[i]) + " " _str += str(a[len(a) - 1]) print(_str) def main(): n = int(input()) list = [] for i in range(n): command = input().split() if len(command) > 1: if c...
Traceback (most recent call last): File "/tmp/tmpaiy9xcd2/tmputgn7w3y.py", line 25, in <module> main() File "/tmp/tmpaiy9xcd2/tmputgn7w3y.py", line 12, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s314702895
p02265
u684241248
1527503462
Python
Python3
py
Runtime Error
0
0
715
from collections import deque n = int(input()) ops = [tuple(input().split()) for i in range(n)] ary = deque([]) def insert(ary, x): ary.appendleft(x) def delete(ary, x): if x in ary: ind = ary.index(x) ary = ary[:ind] + ary[ind + 1:] def delete_first(ary): ary.popleft() def delete_...
Traceback (most recent call last): File "/tmp/tmplj94av9s/tmpkflrvi2p.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s565821544
p02265
u404682284
1527863592
Python
Python3
py
Runtime Error
0
0
496
def assign(linked_list, commmand, x): if command == 'insert': linked_list.insert(0, int(x)) if command == 'delete': linked_list.remove(int(x)) if command == 'deleteFirst': linked_list.deleteFirst(int(x)) if command == 'deleteLast': linked_list.deleteLast(int(x)) n = int(...
Traceback (most recent call last): File "/tmp/tmpirm5n5fr/tmphku3xcqt.py", line 11, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s494056479
p02265
u404682284
1527863629
Python
Python3
py
Runtime Error
0
0
496
def assign(linked_list, commmand, x): if command == 'insert': linked_list.insert(0, int(x)) if command == 'delete': linked_list.remove(int(x)) if command == 'deleteFirst': linked_list.deleteFirst(int(x)) if command == 'deleteLast': linked_list.deleteLast(int(x)) n = int(...
Traceback (most recent call last): File "/tmp/tmplr3__e_5/tmp4q6emtvb.py", line 11, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s707402001
p02265
u404682284
1527863712
Python
Python3
py
Runtime Error
0
0
470
def assign(linked_list, commmand, x): if command == 'insert': linked_list.insert(0, int(x)) if command == 'delete': linked_list.remove(int(x)) if command == 'deleteFirst': linked_list.pop(0) if command == 'deleteLast': linked_list.pop() n = int(input()) linked_list = [] ...
Traceback (most recent call last): File "/tmp/tmpt0lny63e/tmpgjow1txe.py", line 11, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s261539146
p02265
u404682284
1527864122
Python
Python3
py
Runtime Error
20
5600
557
def assign(linked_list, commmand, x): if command == 'insert': linked_list.insert(0, int(x)) if command == 'delete': linked_list.remove(int(x)) if command == 'deleteFirst': linked_list.pop(0) if command == 'deleteLast': linked_list.pop() n = int(input()) linked_list = [] ...
Traceback (most recent call last): File "/tmp/tmpv_bymbgp/tmp8l1xgh_1.py", line 11, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s360013802
p02265
u990900604
1527928034
Python
Python
py
Runtime Error
0
0
1611
#!/usr/bin/env python #-*- coding: utf-8 -*- class Node: def __init__(self, val): self.val = val self.prev = None self.next = None class LinkedList: def __init__(self): self.head = Node(None) self.head.prev = self.head self.head.next = self.head def inser...
File "/tmp/tmpfnwilqv5/tmp52wae475.py", line 52 print p.val, ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s594697244
p02265
u990900604
1527928076
Python
Python
py
Runtime Error
0
0
1611
#!/usr/bin/env python #-*- coding: utf-8 -*- class Node: def __init__(self, val): self.val = val self.prev = None self.next = None class LinkedList: def __init__(self): self.head = Node(None) self.head.prev = self.head self.head.next = self.head def inser...
File "/tmp/tmprs82kga1/tmpa6quy6b0.py", line 52 print p.val, ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s644911093
p02265
u990900604
1527929318
Python
Python
py
Runtime Error
0
0
394
# -*- coding: utf-8 -*- from collections import deque if __name__ == '__main__': n = int(input()) L = deque() for i in range(n): cmdline = input().split() if cmdline[0] == "insert": L.appendleft(cmdline[1]) elif cmdline[0] == "delete": L.remove(cmdline[1]) elif cmdline[0] == "deleteFirst": L.pop...
Traceback (most recent call last): File "/tmp/tmps68wkctd/tmpf_j4qsbo.py", line 6, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s386972007
p02265
u990900604
1527929332
Python
Python3
py
Runtime Error
30
6004
394
# -*- coding: utf-8 -*- from collections import deque if __name__ == '__main__': n = int(input()) L = deque() for i in range(n): cmdline = input().split() if cmdline[0] == "insert": L.appendleft(cmdline[1]) elif cmdline[0] == "delete": L.remove(cmdline[1]) elif cmdline[0] == "deleteFirst": L.pop...
Traceback (most recent call last): File "/tmp/tmp2fdyqkba/tmpfoe786q1.py", line 6, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s842220847
p02265
u990900604
1527929360
Python
Python3
py
Runtime Error
20
6000
394
# -*- coding: utf-8 -*- from collections import deque if __name__ == '__main__': n = int(input()) L = deque() for i in range(n): cmdline = input().split() if cmdline[0] == "insert": L.appendleft(cmdline[1]) elif cmdline[0] == "delete": L.remove(cmdline[1]) elif cmdline[0] == "deleteFirst": L.pop...
Traceback (most recent call last): File "/tmp/tmpelc1l7zj/tmpqzag1_hs.py", line 6, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s472838435
p02265
u990900604
1527933858
Python
Python
py
Runtime Error
0
0
946
#!/usr/bin/env python #-*- coding: utf-8 -*- import sys class LinkedList: def __init__(self): self.l = [] def insert(self, val): self.l.append(val) def delete(self, val): i = len(self.l) - 1 while i >= 0 and l[i] != val: i -= 1 del self.l[i] def ...
File "/tmp/tmpynzag3t3/tmpvk0qwzkz.py", line 28 print self.l[i], ^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s901594011
p02265
u007270338
1527971301
Python
Python3
py
Runtime Error
30
6000
403
#coding:utf-8 from collections import deque n = int(input()) day = deque() for i in range(n): order = list(input().split()) if order[0] == "insert": day.appendleft(order[1]) if order[0] == "delete": day.remove(order[1]) if order[0] == "deleteFirst": day.popleft() if order[0]...
Traceback (most recent call last): File "/tmp/tmp0vsnb_8w/tmpkb9r8gqm.py", line 4, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s761152074
p02265
u007270338
1527973708
Python
Python3
py
Runtime Error
0
0
447
%%cython import numpy as np n = int(input()) A = list(map(int, input().split())) q = int(input()) m = list(map(int, input().split())) def solve(i, num): if num == 0: global sw sw = 1 return 0 if i >= n or num < 0: return 0 return solve(i+1, num), solve(i+1, num-A[i]) for n...
File "/tmp/tmptutn9wuw/tmpwb19k3e4.py", line 1 %%cython ^ SyntaxError: invalid syntax
s203383419
p02265
u007270338
1527973894
Python
Python3
py
Runtime Error
0
0
470
%load_ext Cython #coding:utf-8 import numpy as np n = int(input()) A = list(map(int, input().split())) q = int(input()) m = list(map(int, input().split())) def solve(i, num): if num == 0: global sw sw = 1 return 0 if i >= n or num < 0: return 0 return solve(i+1, num), solv...
File "/tmp/tmpgyn9uscc/tmpc_1m9a43.py", line 1 %load_ext Cython ^ SyntaxError: invalid syntax
s114981430
p02265
u007270338
1527974205
Python
Python3
py
Runtime Error
0
0
523
#coding:utf-8 from collections import deque from numba import jit n = int(input()) @jit def ord(order): if order[0] == "insert": day.appendleft(order[1]) elif order[0] == "delete": try: day.remove(order[1]) except: continue elif order[0] == "deleteFirst": ...
File "/tmp/tmp8zcmssfy/tmpw500u3dv.py", line 14 continue ^^^^^^^^ SyntaxError: 'continue' not properly in loop
s297446537
p02265
u007270338
1527974257
Python
Python3
py
Runtime Error
0
0
519
#coding:utf-8 from collections import deque from numba import jit n = int(input()) @jit def ord(order): if order[0] == "insert": day.appendleft(order[1]) elif order[0] == "delete": try: day.remove(order[1]) except: pass elif order[0] == "deleteFirst": ...
Traceback (most recent call last): File "/tmp/tmpeyfce51p/tmpznvvs4cq.py", line 4, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s813938169
p02265
u318430977
1528039724
Python
Python3
py
Runtime Error
20
5604
870
class DoublyLinkedList: def __init__(self): self.data = [] def insert(self, x): self.data.insert(0, x) def delete(self, x): self.data.remove(x) def deleteFirst(self): self.data.pop(0) def deleteLast(self): self.data.pop(len(self.data) - 1) def print_list...
Traceback (most recent call last): File "/tmp/tmpt_helpda/tmp0dv99331.py", line 26, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s614422740
p02265
u971076135
1528196763
Python
Python3
py
Runtime Error
20
5596
469
if __name__ == '__main__': store = list() for i in range(int(input())): parts = input().split() cmd = parts[0] if cmd == 'insert': store.insert(0, int(parts[1])) elif cmd == 'delete': num = int(parts[1]) store.remove(num) elif cmd == 'd...
Traceback (most recent call last): File "/tmp/tmphgpzap7k/tmplb5ybtie.py", line 3, in <module> for i in range(int(input())): ^^^^^^^ EOFError: EOF when reading a line
s139368218
p02265
u971076135
1528201287
Python
Python3
py
Runtime Error
20
5608
1625
class LinkedList(object): class Node(object): def __init__(self, value, next=None, prev=None): self.value = value self.next = next self.prev = prev def __init__(self, dtype): self.dtype = dtype self.dummy = LinkedList.Node(dtype()) self.dumm...
Traceback (most recent call last): File "/tmp/tmp_k2faum4/tmp41w6caol.py", line 54, in <module> for i in range(int(input())): ^^^^^^^ EOFError: EOF when reading a line
s197768299
p02265
u657361950
1529889507
Python
Python3
py
Runtime Error
0
0
985
import java.util.Iterator; import java.util.Scanner; import java.util.LinkedList; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); LinkedList<Integer> list = new LinkedList<Integer>(); for (int i = 0; i < n; i++) { String command = ...
File "/tmp/tmpvjixz4a8/tmp1hs3ivxg.py", line 5 public class Main { ^^^^^ SyntaxError: invalid syntax
s230786711
p02265
u445032255
1529903524
Python
Python3
py
Runtime Error
30
5996
608
from collections import deque def main(): N = int(input()) L = deque([]) for _ in range(N): command_value = input() if len(command_value.split()) == 2: command, value = command_value.split() else: command = command_value value = None if...
Traceback (most recent call last): File "/tmp/tmp8v1gusgl/tmptjunau5f.py", line 28, in <module> main() File "/tmp/tmp8v1gusgl/tmptjunau5f.py", line 4, in main N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s276210767
p02265
u445032255
1529903649
Python
Python3
py
Runtime Error
30
6004
589
from collections import deque def main(): N = int(input()) L = deque([]) for _ in range(N): command_value = input() if len(command_value.split()) == 2: command, value = command_value.split() else: command = command_value value = None if...
Traceback (most recent call last): File "/tmp/tmp17xgml1u/tmpv0uzs84a.py", line 27, in <module> main() File "/tmp/tmp17xgml1u/tmpv0uzs84a.py", line 4, in main N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s713237199
p02265
u929141425
1529981410
Python
Python3
py
Runtime Error
20
5600
297
N = int(input()) lis = [] for n in range(N): com = input().split() if com[0] == "insert": lis.insert(0,int(com[1])) elif com[0] == "delete": lis.remove(int(com[1])) elif com[0] == "deleteFirst": del lis[0] else: lis.pop() print(*lis)
Traceback (most recent call last): File "/tmp/tmpo6bksjvd/tmppan_uwqt.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s755665758
p02265
u207394722
1530226085
Python
Python3
py
Runtime Error
30
5612
1765
class Node(): key = 0 def __init__( self, key ): self.key = key self.next = -1 self.pre = -1 def insert( self, othernode ): # othernodeにはinsert前の先頭のノードを入れる self.next = othernode othernode.pre = self return self def delete( self, x ): #先頭ノードで実行 i...
Traceback (most recent call last): File "/tmp/tmpf0_7mb98/tmp20r_92fb.py", line 65, in <module> main() File "/tmp/tmpf0_7mb98/tmp20r_92fb.py", line 39, in main n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s770864624
p02265
u207394722
1530226213
Python
Python3
py
Runtime Error
20
5612
1784
class Node(): key = 0 def __init__( self, key ): self.key = key self.next = -1 self.pre = -1 def insert( self, othernode ): # othernodeにはinsert前の先頭のノードを入れる self.next = othernode othernode.pre = self return self def delete( self, x ): #先頭ノードで実行 i...
Traceback (most recent call last): File "/tmp/tmpgv0_0cwy/tmpzv85q03w.py", line 65, in <module> main() File "/tmp/tmpgv0_0cwy/tmpzv85q03w.py", line 39, in main n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s091756257
p02265
u207394722
1530226775
Python
Python3
py
Runtime Error
20
5612
1957
class Node(): key = 0 def __init__( self, key ): self.key = key self.next = -1 self.pre = -1 def insert( self, othernode ): # othernodeにはinsert前の先頭のノードを入れる self.next = othernode othernode.pre = self return self def delete( self, x ): #先頭ノードで実行 F...
Traceback (most recent call last): File "/tmp/tmpuiz2h_qv/tmpe3ycrv5u.py", line 71, in <module> main() File "/tmp/tmpuiz2h_qv/tmpe3ycrv5u.py", line 45, in main n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s373432547
p02265
u207394722
1530229107
Python
Python3
py
Runtime Error
0
0
1686
def main(): n = int( input() ) FirstNode = {"pre":-1, "key":None, "next":-1} for i in range(n): tmp = input().split() if tmp[0] == "insert": TmpNode = {"pre":FirstNode, "key":tmp[1], "next":-1} FirstNode[next] = TmpNode FirstNode = TmpNode elif tmp...
Traceback (most recent call last): File "/tmp/tmp4dvnz6er/tmpkyj5tfc3.py", line 49, in <module> main() File "/tmp/tmp4dvnz6er/tmpkyj5tfc3.py", line 2, in main n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s895620172
p02265
u316584871
1530252711
Python
Python3
py
Runtime Error
0
0
884
n = int(input()) xlist = [] for i in range(n): command = list(map(str,input().split())) if (command[0] == 'insert'): x = command[1] if (len(xlist) == 0): xlist.append(int(x)) else: xlist.append(int(x)) for i in range(1,len(xlist)): k = ...
Traceback (most recent call last): File "/tmp/tmp8dktebd8/tmp632bd_zq.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s548954040
p02265
u316584871
1530256723
Python
Python3
py
Runtime Error
0
0
567
from collections import deque ##deque 라는 데이터형 편리한듯. print도그렇고 append,pop속도도 빠르고 n = int(input()) xdeque = deque() for i in range(n): command = list(map(str,input().split())) if (command[0] == 'insert'): x = command[1] xdeque.appendleft(int(x)) elif (command[0] == 'delete'): x = com...
Traceback (most recent call last): File "/tmp/tmpeel3k2dv/tmpiv2xm1cp.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s390639438
p02265
u316584871
1530257110
Python
Python3
py
Runtime Error
0
0
381
from collections import deque n = int(input()) d = deque() for _ in range(n): x = input().split() if (command[0][0] == 'i'): d.appendleft(int(x[1])) elif (command[0] == 'delete'): try: d.remove(int(x[1])) except ValueError: pass elif (x[0][6] == 'F'): ...
Traceback (most recent call last): File "/tmp/tmphb48b09f/tmp32kk1kfd.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s170247629
p02265
u316584871
1530257132
Python
Python3
py
Runtime Error
0
0
377
from collections import deque n = int(input()) d = deque() for _ in range(n): x = input().split() if (command[0][0] == 'i'): d.appendleft(int(x[1])) elif (command[0] == 'delete'): try: d.remove(int(x[1])) except ValueError: pass elif (x[0][6] == 'F'): ...
Traceback (most recent call last): File "/tmp/tmpoi155h1p/tmpspv0d5p0.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s919445129
p02265
u682153677
1530425627
Python
Python3
py
Runtime Error
0
0
481
# -*- coding: utf-8 -*- n = int(input()) key = [] for i in range(n): command, num = list(input().split()) if command == 'insert': key.append(num) elif command == 'delete': key.remove(num) elif command == 'deleteFirst': del key[0] elif command == 'deleteLast': del k...
Traceback (most recent call last): File "/tmp/tmpygcgpmd5/tmpjyj0f59s.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s200820783
p02265
u682153677
1530425723
Python
Python3
py
Runtime Error
20
5604
494
# -*- coding: utf-8 -*- n = int(input()) key = [] for i in range(n): command = list(input().split()) if command[0] == 'insert': key.append(command[1]) elif command[0] == 'delete': key.remove(command[1]) elif command[0] == 'deleteFirst': del key[0] elif command[0] == 'delet...
Traceback (most recent call last): File "/tmp/tmpv5fz0l10/tmpr_wcawzm.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s554913468
p02265
u682153677
1530426309
Python
Python3
py
Runtime Error
0
0
520
# -*- coding: utf-8 -*- n = int(input()) key = [] for i in range(n + 1): command = list(input().split()) if command[0] == 'insert': key.append(command[1]) elif command[0] == 'delete' and command[1] in key: key.remove(command[1]) elif command[0] == 'deleteFirst': del key[0] ...
Traceback (most recent call last): File "/tmp/tmpyk3lm3lc/tmpnegpg4ub.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s794570873
p02265
u741801763
1530429205
Python
Python3
py
Runtime Error
20
5600
295
l = [] n = int(input()) for _ in range (n): cmd = input().split(' ') if cmd[0]=='insert': l.insert(0,int(cmd[1])) if cmd[0]=='delete': l.remove(int(cmd[1])) if cmd[0]=='deleteFirst': l.pop(0) if cmd[0]=='deleteLast': l.pop(len(l)-1) print(*l)
Traceback (most recent call last): File "/tmp/tmpvo9bfjgs/tmprt840z55.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s634962703
p02265
u741801763
1530429226
Python
Python3
py
Runtime Error
30
5600
295
l = [] n = int(input()) for _ in range (n): cmd = input().split(' ') if cmd[0]=='insert': l.insert(0,int(cmd[1])) if cmd[0]=='delete': l.remove(int(cmd[1])) if cmd[0]=='deleteFirst': l.pop(0) if cmd[0]=='deleteLast': l.pop(len(l)-1) print(*l)
Traceback (most recent call last): File "/tmp/tmp3wd8inst/tmp5016jvf6.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s945652166
p02265
u995990363
1530504473
Python
Python3
py
Runtime Error
30
5604
863
class LinkedList(object): def __init__(self): self.nodes = [] def insert(self, node): self.nodes.insert(0, node) def delete(self, node): self.nodes.remove(node) def deleteFirst(self): self.nodes.pop(0) def deleteLast(self): self.nodes.pop() def run()...
Traceback (most recent call last): File "/tmp/tmpl6flp4vm/tmp8w8qxwnv.py", line 34, in <module> run() File "/tmp/tmpl6flp4vm/tmp8w8qxwnv.py", line 19, in run n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s789226905
p02265
u995990363
1530505388
Python
Python3
py
Runtime Error
0
0
535
def run(): n = int(input()) nodes = [] for _ in range(n): order = [o.strip() for o in input().split()] if order[0] == 'insert': nodes.insert(0, (int(order[1])) elif order[0] == 'delete': if int(order[1]) in nodes: nodes.remove(int(order[1])) ...
File "/tmp/tmp40d3s9cn/tmpaq_t7h2c.py", line 7 nodes.insert(0, (int(order[1])) ^ SyntaxError: '(' was never closed
s815939763
p02265
u741801763
1530550784
Python
Python3
py
Runtime Error
0
0
486
from collections import deque n = int(input()) l = deque() count = set([]) for _ in range (n): cmd = input().split(' ') print(cmd) if cmd[0]=='insert': l.appendleft(int(cmd[1])) if not int(cmd[1]) in count: count.add(int(cmd[1])) if cmd[0]=='delete': if len(l) !=0 and...
Traceback (most recent call last): File "/tmp/tmpbb_3e_0z/tmp2cmzv3bc.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s072284686
p02265
u741801763
1530550825
Python
Python3
py
Runtime Error
0
0
467
from collections import deque n = int(input()) l = deque() count = set([]) for _ in range (n): cmd = input().split(' ') if cmd[0]=='insert': l.appendleft(int(cmd[1])) if not int(cmd[1]) in count: count.add(int(cmd[1])) if cmd[0]=='delete': if len(l) !=0 and int(cmd[2]) in...
Traceback (most recent call last): File "/tmp/tmpv2n9rhzc/tmpq826ezfr.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s377947618
p02265
u741801763
1530550914
Python
Python3
py
Runtime Error
20
6000
467
from collections import deque n = int(input()) l = deque() count = set([]) for _ in range (n): cmd = input().split(' ') if cmd[0]=='insert': l.appendleft(int(cmd[1])) if not int(cmd[1]) in count: count.add(int(cmd[1])) if cmd[0]=='delete': if len(l) !=0 and int(cmd[1]) in...
Traceback (most recent call last): File "/tmp/tmp04h5mesp/tmpgxhxdhui.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s153464905
p02265
u741801763
1530551119
Python
Python3
py
Runtime Error
30
6000
533
from collections import deque n = int(input()) l = deque() count = set([]) for _ in range (n): cmd = input().split(' ') if cmd[0]=='insert': l.appendleft(int(cmd[1])) if not int(cmd[1]) in count: count.add(int(cmd[1])) if cmd[0]=='delete': if len(l) !=0 and int(cmd[1]) in...
Traceback (most recent call last): File "/tmp/tmppbe7cebv/tmphsinuvbi.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s882242281
p02265
u912237403
1371272679
Python
Python
py
Runtime Error
10
4232
316
n = int(raw_input()) li = [] for i in range(n): cmd = raw_input().split() if cmd[0] == 'insert': li.insert(0,cmd[1]) elif cmd[0] == 'delete': li.remove(cmd[1]) elif cmd[0] == 'deleteFirst': li.pop(0) elif cmd[0] == 'deleteLast': li.pop() for e in li: print e,
File "/tmp/tmp2gvqrbqh/tmpau_d6_4a.py", line 15 print e, ^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s380091795
p02265
u912237403
1371272857
Python
Python
py
Runtime Error
0
0
346
n = int(raw_input()) li = [] for i in range(n): cmd = raw_input().split() if cmd[0] == 'insert': li.insert(0,cmd[1]) elif cmd[0] == 'delete': try: li.remove(cmd[1]) elif cmd[0] == 'deleteFirst': li.pop(0) elif cmd[0] == 'deleteLast': li.pop() print li...
File "/tmp/tmpfe93h68i/tmpra115puj.py", line 11 elif cmd[0] == 'deleteFirst': SyntaxError: expected 'except' or 'finally' block
s662462121
p02265
u912237403
1373806274
Python
Python
py
Runtime Error
0
0
1235
import sys A=[[0,0,0]] size = 0 def insert(A,x): global size fp=A[0][1] try: i=[e[0] for e in A].index(-1) A[i]=[x,fp,0] A[fp][2]=i A[0][1]=i except: A.append([x,fp,0]) A[fp][2]=len(A)-1 A[0][1]=len(A)-1 size += 1 def delete(A,x): ...
File "/tmp/tmpw8oe802e/tmp78ldwfno.py", line 62 elif len(s[0]) == 6;#'delete': ^ SyntaxError: invalid syntax
s817534440
p02265
u912237403
1373808625
Python
Python
py
Runtime Error
0
0
1302
import sys A=[[0,0,0]] buf=[] size = 0 def insert(A,x): global size,buf fp=A[0][1] try: if buf==[]: buf = [i for i,e in enumerate(A) if e==-1] else: i = buf[-1] buf = buf[:-1] A[i]=[x,fp,0] A[fp][2]=i A[0][1]=i except: ...
File "/tmp/tmpiq8iqay9/tmp6ji8438f.py", line 61 while int(raw_input()) ^ SyntaxError: expected ':'
s704171887
p02265
u912237403
1373808653
Python
Python
py
Runtime Error
0
0
1303
import sys A=[[0,0,0]] buf=[] size = 0 def insert(A,x): global size,buf fp=A[0][1] try: if buf==[]: buf = [i for i,e in enumerate(A) if e==-1] else: i = buf[-1] buf = buf[:-1] A[i]=[x,fp,0] A[fp][2]=i A[0][1]=i except: ...
File "/tmp/tmpf9v28ypr/tmpygv49cdy.py", line 75 print A[e][0], ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s478078632
p02265
u912237403
1373835397
Python
Python
py
Runtime Error
0
0
1986
import sys class Deque: # セルの定義 class Cell2: def __init__(self, x, y = None, z = None): self.data = x self.next = y self.prev = z # 初期化 def __init__(self): head = Deque.Cell2(None) # ヘッダ head.next = head # 循環リスト head.prev = ...
File "/tmp/tmpjpgh7zr5/tmpohavjkje.py", line 90 print A ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s047982149
p02265
u912237403
1373835651
Python
Python
py
Runtime Error
10
4332
1753
import sys class Deque: class Cell2: def __init__(self, x, y = None, z = None): self.data = x self.next = y self.prev = z def __init__(self): head = Deque.Cell2(None) head.next = head head.prev = head self.size = 0 sel...
File "/tmp/tmpjvj1zeku/tmpj3ikuoxl.py", line 83 print A ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s518598050
p02265
u912237403
1373836358
Python
Python
py
Runtime Error
0
0
1845
import sys class Deque: class Cell2: def __init__(self, x, y = None, z = None): self.data = x self.next = y self.prev = z def __init__(self): head = Deque.Cell2(None) head.next = head head.prev = head self.size = 0 sel...
File "/tmp/tmpil0ve_at/tmpomf91gkn.py", line 86 print A ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s561473204
p02265
u912237403
1373836756
Python
Python
py
Runtime Error
0
0
1910
import sys class Deque: class Cell2: def __init__(self, x, y = None, z = None): self.data = x self.next = y self.prev = z def __init__(self): head = Deque.Cell2(None) head.next = head head.prev = head self.size = 0 sel...
File "/tmp/tmpavl9_laq/tmp1cel8uz7.py", line 88 print A ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s718066575
p02265
u912237403
1373839244
Python
Python
py
Runtime Error
0
0
335
import sys,gc A=[] n=int(raw_input()) while n: s = raw_input() if s[0] == 'i' A.insert(0,s[7:]) elif s[6] == ' ': try: A.remove(s[7:]) except: pass elif s[6] == 'F': A.pop(0) elif s[6] == 'L': A.pop() n -=1 for e in A: ...
File "/tmp/tmp3nj7tbo3/tmpeyqp4yh0.py", line 8 if s[0] == 'i' ^ SyntaxError: expected ':'
s629482160
p02265
u912237403
1373847283
Python
Python
py
Runtime Error
0
0
526
import sys,gc A=[] fp =0 bp =0 n=int(raw_input()) while n: s = raw_input() if s[0] == 'i': A.append(s[7:]) fp += 1 elif s[6] == ' ': i=-1 try: while True: i = A[i+1:].index(s[7:]) finally: if i!=-1: del A[...
File "/tmp/tmpbaa5wtbi/tmpo3wbya6_.py", line 33 print int(e), ^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s387902347
p02265
u572424947
1376653203
Python
Python
py
Runtime Error
10
4244
394
n = int(raw_input()) cmdlist = [raw_input().split() for i in range(n)] cmddict = { "insert":"%s.insert(0,%d)", "delete":"%s.remove(%d)", "deleteFirst":"%s.pop(0)", "deleteLast":"%s.pop()", } mylist = [] for cmd in cmdlist: try: cmd[1] = int(cmd[1]) exec(cmddict[cmd[0]] % ("mylist", cmd[1])) except IndexE...
File "/tmp/tmp_cx6r428/tmps2grxzm2.py", line 21 print i, ^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?