a=[2,1,5,7,3]
n=len(a)
s1=[-1]*n:top1=-1
s2=[-1]*n;top2=-1
for i in range(n)
while top1!=-1 and a[i] < s1[top1]:
top2+=1;s2[top2]=s1[top1];top1-=1
top1+=1;s1[top1]=a[i]
while top2!=-1:
top1+=1;s1[top1]=s2[top2];top2-=1
运行该程序段后,下列表达式不成立的是( )
A.top1==5 | B.top2==-1 | C.s1[0]==1 | D.s1[4]==7 |

同类型试题

y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2


y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2

