70 lines
6.9 KiB
XML
70 lines
6.9 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 425" width="900" height="425"><title>单调栈过程</title><defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0 0L10 5L0 10Z" fill="#416687"/></marker></defs><rect width="100%" height="100%" fill="white"/><g font-family="Microsoft YaHei,Arial,sans-serif" fill="#263c52" stroke-linecap="round">
|
|
<text x="35" y="25" text-anchor="middle" dominant-baseline="central" font-size="19">身高</text>
|
|
<text x="200" y="25" text-anchor="middle" dominant-baseline="central" font-size="19">栈中数据</text>
|
|
<rect x="10" y="45" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="32.0" y="67.0" text-anchor="middle" dominant-baseline="central" font-size="18">10</text>
|
|
<rect x="90" y="45" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="112.0" y="67.0" text-anchor="middle" dominant-baseline="central" font-size="18">10</text>
|
|
<rect x="134" y="45" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="156.0" y="67.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<rect x="178" y="45" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="200.0" y="67.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<rect x="222" y="45" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="244.0" y="67.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<text x="295" y="74" font-size="18">空栈,把 10 入栈,答案增加 0</text>
|
|
<rect x="10" y="105" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="32.0" y="127.0" text-anchor="middle" dominant-baseline="central" font-size="18">3</text>
|
|
<rect x="90" y="105" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="112.0" y="127.0" text-anchor="middle" dominant-baseline="central" font-size="18">10</text>
|
|
<rect x="134" y="105" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="156.0" y="127.0" text-anchor="middle" dominant-baseline="central" font-size="18">3</text>
|
|
<rect x="178" y="105" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="200.0" y="127.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<rect x="222" y="105" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="244.0" y="127.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<text x="295" y="134" font-size="18">弹出 ≤ 3 的栈顶,把 3 入栈,答案增加 1</text>
|
|
<rect x="10" y="165" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="32.0" y="187.0" text-anchor="middle" dominant-baseline="central" font-size="18">7</text>
|
|
<rect x="90" y="165" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="112.0" y="187.0" text-anchor="middle" dominant-baseline="central" font-size="18">10</text>
|
|
<rect x="134" y="165" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="156.0" y="187.0" text-anchor="middle" dominant-baseline="central" font-size="18">7</text>
|
|
<rect x="178" y="165" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="200.0" y="187.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<rect x="222" y="165" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="244.0" y="187.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<text x="295" y="194" font-size="18">弹出 ≤ 7 的栈顶,把 7 入栈,答案增加 1</text>
|
|
<rect x="10" y="225" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="32.0" y="247.0" text-anchor="middle" dominant-baseline="central" font-size="18">4</text>
|
|
<rect x="90" y="225" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="112.0" y="247.0" text-anchor="middle" dominant-baseline="central" font-size="18">10</text>
|
|
<rect x="134" y="225" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="156.0" y="247.0" text-anchor="middle" dominant-baseline="central" font-size="18">7</text>
|
|
<rect x="178" y="225" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="200.0" y="247.0" text-anchor="middle" dominant-baseline="central" font-size="18">4</text>
|
|
<rect x="222" y="225" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="244.0" y="247.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<text x="295" y="254" font-size="18">弹出 ≤ 4 的栈顶,把 4 入栈,答案增加 2</text>
|
|
<rect x="10" y="285" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="32.0" y="307.0" text-anchor="middle" dominant-baseline="central" font-size="18">12</text>
|
|
<rect x="90" y="285" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="112.0" y="307.0" text-anchor="middle" dominant-baseline="central" font-size="18">12</text>
|
|
<rect x="134" y="285" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="156.0" y="307.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<rect x="178" y="285" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="200.0" y="307.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<rect x="222" y="285" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="244.0" y="307.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<text x="295" y="314" font-size="18">弹出 ≤ 12 的栈顶,把 12 入栈,答案增加 0</text>
|
|
<rect x="10" y="345" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="32.0" y="367.0" text-anchor="middle" dominant-baseline="central" font-size="18">2</text>
|
|
<rect x="90" y="345" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="112.0" y="367.0" text-anchor="middle" dominant-baseline="central" font-size="18">12</text>
|
|
<rect x="134" y="345" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="156.0" y="367.0" text-anchor="middle" dominant-baseline="central" font-size="18">2</text>
|
|
<rect x="178" y="345" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="200.0" y="367.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<rect x="222" y="345" width="44" height="44" stroke="#67859e" fill="white" stroke-width="1.5"/>
|
|
<text x="244.0" y="367.0" text-anchor="middle" dominant-baseline="central" font-size="18"></text>
|
|
<text x="295" y="374" font-size="18">弹出 ≤ 2 的栈顶,把 2 入栈,答案增加 1</text>
|
|
</g></svg> |