```interact
timer t range=0..8.3 step=0.05 speed=50 label="开跑"
step hb0 over t: (0,52.5) -> (0.6,18.0) -> (5.85,12.0)
step hb1 over t: (0,18.0) -> (0.6,52.5) -> (2.7,30.0) -> (5.15,12.0) -> (5.85,18.0)
step hb2 over t: (0,72.0) -> (0.95,30.0) -> (2.7,52.5) -> (4.1,12.0) -> (5.15,30.0) -> (6.2,24.0)
step hb3 over t: (0,30.0) -> (0.95,72.0) -> (1.3,63.0) -> (3.05,12.0) -> (4.1,52.5) -> (4.45,42.0) -> (5.5,24.0) -> (6.2,30.0)
step hb4 over t: (0,63.0) -> (1.3,72.0) -> (1.65,12.0) -> (3.05,63.0) -> (3.4,42.0) -> (4.45,52.5) -> (4.8,24.0) -> (5.5,42.0)
step hb5 over t: (0,12.0) -> (1.65,72.0) -> (2.0,42.0) -> (3.4,63.0) -> (3.75,24.0) -> (4.8,52.5)
step hb6 over t: (0,42.0) -> (2.0,72.0) -> (2.35,24.0) -> (3.75,63.0)
step hb7 over t: (0,24.0) -> (2.35,72.0)
step hq0 over t: (0,52.5) -> (0.6,18.0) -> (1.65,12.0)
step hq1 over t: (0,18.0) -> (0.6,52.5) -> (0.95,12.0) -> (1.65,18.0)
step hq2 over t: (0,72.0) -> (1.3,24.0)
step hq3 over t: (0,30.0)
step hq4 over t: (0,63.0) -> (2.0,42.0)
step hq5 over t: (0,12.0) -> (0.95,52.5)
step hq6 over t: (0,42.0) -> (2.0,63.0)
step hq7 over t: (0,24.0) -> (1.3,72.0)
step nb over t: (0,0) -> (0.6,1) -> (0.95,2) -> (1.3,3) -> (1.65,4) -> (2.0,5) -> (2.35,6) -> (2.7,7) -> (3.05,8) -> (3.4,9) -> (3.75,10) -> (4.1,11) -> (4.45,12) -> (4.8,13) -> (5.15,14) -> (5.5,15) -> (5.85,16) -> (6.2,17)
step nq over t: (0,0) -> (0.6,1) -> (0.95,2) -> (1.3,3) -> (1.65,4) -> (2.0,5)
computed dq = t >= 2.55 ? 1 : 0
computed db = t >= 6.75 ? 1 : 0
computed race = t < 2.55 ? 1 : 0
computed yb0 = 225 - hb0
computed yb1 = 225 - hb1
computed yb2 = 225 - hb2
computed yb3 = 225 - hb3
computed yb4 = 225 - hb4
computed yb5 = 225 - hb5
computed yb6 = 225 - hb6
computed yb7 = 225 - hb7
computed yq0 = 225 - hq0
computed yq1 = 225 - hq1
computed yq2 = 225 - hq2
computed yq3 = 225 - hq3
computed yq4 = 225 - hq4
computed yq5 = 225 - hq5
computed yq6 = 225 - hq6
computed yq7 = 225 - hq7
template svg: <svg viewBox="0 0 560 300" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="冒泡排序对战快速排序">
  <defs><linearGradient id="srbg" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#12112a"/><stop offset="1" stop-color="#0c0b1d"/></linearGradient></defs>
  <rect x="0" y="0" width="560" height="300" rx="14" fill="url(#srbg)"/>
  <text x="280" y="30" text-anchor="middle" font-size="13.5" letter-spacing="0.5" fill="#dfe3f7">同一个数组 · 同一个时钟 · 不同的算法</text>
  <rect x="48" y="{yb0}" width="20" height="{hb0}" rx="2.5" fill="#8b7cf8" opacity="0.85"/>
  <rect x="74" y="{yb1}" width="20" height="{hb1}" rx="2.5" fill="#8b7cf8" opacity="0.85"/>
  <rect x="100" y="{yb2}" width="20" height="{hb2}" rx="2.5" fill="#8b7cf8" opacity="0.85"/>
  <rect x="126" y="{yb3}" width="20" height="{hb3}" rx="2.5" fill="#8b7cf8" opacity="0.85"/>
  <rect x="152" y="{yb4}" width="20" height="{hb4}" rx="2.5" fill="#8b7cf8" opacity="0.85"/>
  <rect x="178" y="{yb5}" width="20" height="{hb5}" rx="2.5" fill="#8b7cf8" opacity="0.85"/>
  <rect x="204" y="{yb6}" width="20" height="{hb6}" rx="2.5" fill="#8b7cf8" opacity="0.85"/>
  <rect x="230" y="{yb7}" width="20" height="{hb7}" rx="2.5" fill="#8b7cf8" opacity="0.85"/>
  <line x1="42" y1="225" x2="256" y2="225" stroke="#3f4a78" stroke-width="1.2"/>
  <text x="148" y="250" text-anchor="middle" font-size="9.5" letter-spacing="1.5" fill="#6f7ba3">冒泡排序</text>
  <rect x="308" y="{yq0}" width="20" height="{hq0}" rx="2.5" fill="#5ec9f0" opacity="0.85"/>
  <rect x="334" y="{yq1}" width="20" height="{hq1}" rx="2.5" fill="#5ec9f0" opacity="0.85"/>
  <rect x="360" y="{yq2}" width="20" height="{hq2}" rx="2.5" fill="#5ec9f0" opacity="0.85"/>
  <rect x="386" y="{yq3}" width="20" height="{hq3}" rx="2.5" fill="#5ec9f0" opacity="0.85"/>
  <rect x="412" y="{yq4}" width="20" height="{hq4}" rx="2.5" fill="#5ec9f0" opacity="0.85"/>
  <rect x="438" y="{yq5}" width="20" height="{hq5}" rx="2.5" fill="#5ec9f0" opacity="0.85"/>
  <rect x="464" y="{yq6}" width="20" height="{hq6}" rx="2.5" fill="#5ec9f0" opacity="0.85"/>
  <rect x="490" y="{yq7}" width="20" height="{hq7}" rx="2.5" fill="#5ec9f0" opacity="0.85"/>
  <line x1="302" y1="225" x2="516" y2="225" stroke="#3f4a78" stroke-width="1.2"/>
  <text x="408" y="250" text-anchor="middle" font-size="9.5" letter-spacing="1.5" fill="#6f7ba3">快速排序</text>
  <text x="148" y="268" text-anchor="middle" font-size="9" fill="#8a93b8">{nb} 次交换</text>
  <text x="408" y="268" text-anchor="middle" font-size="9" fill="#8a93b8">{nq} 次交换</text>
  <text x="408" y="70" text-anchor="middle" font-size="14" font-weight="700" fill="#7fe0b2" opacity="{dq}">排好了 ✓</text>
  <text x="408" y="88" text-anchor="middle" font-size="9" fill="#7fe0b2" opacity="{dq}">……等冒泡呢</text>
  <text x="148" y="70" text-anchor="middle" font-size="14" font-weight="700" fill="#8a93b8" opacity="{db}">终于 ✓</text>
  <text x="280" y="288" text-anchor="middle" font-size="9" fill="#6f7ba3">每次交换都烘焙成纯文本的 step 函数 · 没有代码在跑，只有时间</text>
</svg>
```
