用户输出
{2 [] 1}
{2 []}
{}
{6}
{2 []}
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#45712 | #1018. 1-01E. JM的俄罗斯套娃 | Wrong Answer | 20 | 625 ms | 27056 K | Python 3 / 1.0 K | 233nihao | 2020-08-04 16:35:20 |
n=input();
a=[];
p=a
p2=[a];
for i in range(100):
p2.append(a);
flag=0
def drop(q):
p.remove(a[eval(q)-1])
def insert(q,w):
if(eval(w)!=0):
p.insert(eval(q),eval(w));
else:
p.insert(eval(q),[])
def target(q):
global p
global flag
if(eval(q)!=0):
if(type(p[eval(q)-1])!=type(1)):
p=p[eval(q)-1];
flag=flag+1;
p2[flag]=p;
if(eval(q)==0):
flag=flag-1;
p=p2[flag]
def out():
flag2=1;
print("{", end='')
if(len(p)!=0):
for i in range(len(p)):
if(type(p[i])==type([2,[3]])):
if(flag2==1):
print("[]", end='')
flag2=0
if(flag2==0):
print(' []',end='')
if(type(p[i])==type(1)):
if(flag2==0):
print(' ', end='')
print(p[i], end='')
flag2=0;
print("}\n",end='')
for i in range(eval(n)):
b=input();
if(b[0]=='1'):
insert(b[2],b[4]);
if(b[0]=='2'):
drop(b[2])
if(b[0]=='3'):
target(b[2])
if(b[0]=='4'):
out();
用户输出
{2 [] 1}
{2 []}
{}
{6}
{2 []}
系统信息
Exited with return code 0
用户输出
{2 4 3 5 1 6}
{2 3 5 6}
系统信息
Exited with return code 0
28
1 0 12
1 1 4
1 1 7
1 2 0
1 0 0
2 2
4
3 1
1 0 89
1 1 0
1 0 0
1 3 0
4
3 0
4
3 3
4
<50 bytes omitted>
用户输出
{[] [] 7 [] 4}
{[] [] 8 [] []}
{[] [] 7 [] 4}
{}
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 48, in <module>
drop(b[2])
File "/sandbox/2/a.py", line 9, in drop
p.remove(a[eval(q)-1])
ValueError: list.remove(): [[], 8, [], []] is not in list
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
20
1 0 0
1 1 1
1 0 0
1 3 2
4
3 1
1 0 17
1 1 12
1 2 19
2 1
1 0 23
1 3 0
4
3 0
3 1
3 0
<16 bytes omitted>
用户输出
{[] [] [] 1 2}
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 48, in <module>
drop(b[2])
File "/sandbox/2/a.py", line 9, in drop
p.remove(a[eval(q)-1])
ValueError: list.remove(): [1, 1, 1] is not in list
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
45
1 0 11
1 1 0
2 1
1 0 32
4
3 2
1 0 0
1 1 0
1 2 40
1 3 0
4
3 3
4
3 2
1 0 0
3 1
1 0
<129 bytes omitted>
{32 []}
{[] [] 40 []}
{[] [] 40 []}
{12}
{[]}
{12}
{[] [] 40 []}
{32 []}
{32 []}
{[] [] 40
<26 bytes omitted>
用户输出
{3 []}
{[] [] [] 4 []}
{[] [] [] 4 []}
{1}
{[] []}
{1}
{[] [] [] 4 []}
{3 []}
{3 []}
{[] [] [] 4 []}
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 48, in <module>
drop(b[2])
File "/sandbox/2/a.py", line 9, in drop
p.remove(a[eval(q)-1])
ValueError: list.remove(): [[], [[[1]]], 4, []] is not in list
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
50
1 0 12
1 0 8
1 0 19
1 3 6
4
1 4 34
1 5 7
1 5 8
4
1 7 91
1 1 1
1 7 2
1 0 12
4
1 0 8
<251 bytes omitted>
{19 8 12 6}
{19 8 12 6 34 8 7}
{12 19 1 8 12 6 34 8 2 7 91}
{19 8 12 6 34 7 19 1 8 12 6 34 8 2 7
<259 bytes omitted>
用户输出
{1 8 1 6}
{1 8 1 6 3 8 7}
{1 1 1 8 1 6 3 8 2 7 9}
{1 8 1 6 3 7 1 1 8 1 6 3 8 2 7 9}
{1 8 1 6 3 8 7 1 1 8 1 6 3 8 2 7 1 9 1 8 1 6
<12 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 46, in <module>
insert(b[2],b[4]);
File "/sandbox/2/a.py", line 11, in insert
if(eval(w)!=0):
File "<string>", line 0
^
SyntaxError: invalid syntax
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
50
1 0 0
1 0 8
2 2
1 1 6
4
1 2 34
1 3 0
1 3 8
4
1 4 0
2 1
1 4 2
1 0 12
4
1 0 8
1 0 1
<234 bytes omitted>
{8 6}
{8 6 34 8 []}
{12 6 34 8 [] 2 []}
{19 8 12 6 34 7 6 34 8 [] 2 []}
{12 19 [] 6 74 83 [] 8 1
<186 bytes omitted>
用户输出
{8 6}
{8 6 3 8 []}
{1 6 3 8 [] 2 []}
{1 8 1 6 3 7 6 3 8 [] 2 []}
{1 1 [] 6 7 8 [] 8 1 6 3 8 2 7 6 9 3 8 [] 2 []}
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 46, in <module>
insert(b[2],b[4]);
File "/sandbox/2/a.py", line 11, in insert
if(eval(w)!=0):
File "<string>", line 0
^
SyntaxError: invalid syntax
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
50
1 0 0
1 1 0
1 0 29
1 3 0
1 0 8
1 5 0
1 1 88
1 2 0
2 8
4
3 5
1 0 63
1 0 52
1 2 19
1
<187 bytes omitted>
{8 88 [] 29 [] [] []}
{63 7}
{8 88 [] 29 [] [] []}
{18 71 33}
{18}
{5 15 45}
{9 15 45}
{9 15
<16 bytes omitted>
用户输出
{8 8 2 [] [] [] []}
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 48, in <module>
drop(b[2])
File "/sandbox/2/a.py", line 9, in drop
p.remove(a[eval(q)-1])
ValueError: list.remove(): 2 is not in list
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
用户输出
{9}
{[] []}
{}
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
32
1 0 46
3 1
1 1 0
4
2 1
3 1
4
1 0 0
3 1
4
1 0 0
3 1
1 0 0
3 1
1 0 12
1 0 14
1 2 2
<73 bytes omitted>
用户输出
{4 []}
{}
{}
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 48, in <module>
drop(b[2])
File "/sandbox/2/a.py", line 9, in drop
p.remove(a[eval(q)-1])
IndexError: list index out of range
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1