| 12345678910 |
- <svg xmlns="http://www.w3.org/2000/svg" width="940" height="340" viewBox="0 0 940 340">
- <style>.t{font:16px sans-serif;fill:#1f2937}.s{font:13px sans-serif;fill:#475569}.n{fill:#fff;stroke:#2563eb;stroke-width:3}.event{fill:#fff7ed;stroke:#ea580c;stroke-width:3}.e{stroke:#64748b;stroke-width:3}.time{stroke:#16a34a;stroke-width:3;stroke-dasharray:6 5}</style>
- <rect width="940" height="340" fill="#f8fafc"/><text x="38" y="33" class="t" font-weight="bold">递增 Kruskal 的每次成功 union 都向上创建一个更晚的事件节点</text>
- <line x1="65" y1="278" x2="885" y2="278" class="time"/><text x="70" y="308" class="s">叶:原顶点</text><text x="735" y="308" class="s">向根:合并阈值不减</text>
- <g class="e"><line x1="475" y1="60" x2="360" y2="145"/><line x1="475" y1="60" x2="630" y2="220"/><line x1="360" y1="145" x2="255" y2="225"/><line x1="360" y1="145" x2="455" y2="225"/><line x1="255" y1="225" x2="185" y2="278"/><line x1="255" y1="225" x2="310" y2="278"/><line x1="455" y1="225" x2="410" y2="278"/><line x1="455" y1="225" x2="510" y2="278"/></g>
- <g class="event"><rect x="445" y="38" width="60" height="44" rx="7"/><rect x="330" y="123" width="60" height="44" rx="7"/><rect x="225" y="203" width="60" height="44" rx="7"/><rect x="425" y="203" width="60" height="44" rx="7"/></g>
- <g class="n"><circle cx="185" cy="278" r="18"/><circle cx="310" cy="278" r="18"/><circle cx="410" cy="278" r="18"/><circle cx="510" cy="278" r="18"/><circle cx="630" cy="220" r="18"/></g>
- <g class="t" text-anchor="middle"><text x="475" y="66">9: 6</text><text x="360" y="151">8: 5</text><text x="255" y="231">6: 2</text><text x="455" y="231">7: 3</text><text x="185" y="284">1</text><text x="310" y="284">2</text><text x="410" y="284">3</text><text x="510" y="284">4</text><text x="630" y="226">5</text></g>
- <text x="680" y="134" class="s">LCA(2,4)=8</text><text x="680" y="158" class="s">所以首次连通权为 5</text>
- </svg>
|