1
0

03-KRT-02-XOR最高位分组.svg 1.4 KB

123456789
  1. <svg xmlns="http://www.w3.org/2000/svg" width="940" height="300" viewBox="0 0 940 300">
  2. <style>.t{font:16px sans-serif;fill:#1f2937}.s{font:13px sans-serif;fill:#475569}.box0{fill:#dbeafe;stroke:#2563eb;stroke-width:3}.box1{fill:#fee2e2;stroke:#dc2626;stroke-width:3}.e{stroke:#64748b;stroke-width:3}.cross{stroke:#ea580c;stroke-width:5}.bit{font:24px monospace;fill:#0f172a}</style>
  3. <rect width="940" height="300" fill="white"/><text x="32" y="34" class="t" font-weight="bold">XOR-MST:按当前最高不同位切成两组,组内递归、组间只补一条最便宜边</text>
  4. <rect x="70" y="92" width="300" height="145" rx="14" class="box0"/><rect x="570" y="92" width="300" height="145" rx="14" class="box1"/>
  5. <text x="92" y="125" class="t" font-weight="bold">当前位 b 为 0 的组</text><text x="592" y="125" class="t" font-weight="bold">当前位 b 为 1 的组</text>
  6. <text x="105" y="165" class="bit">0 01 10</text><text x="105" y="205" class="bit">0 10 11</text><text x="605" y="165" class="bit">1 00 01</text><text x="605" y="205" class="bit">1 01 11</text>
  7. <line x1="370" y1="164" x2="570" y2="164" class="cross"/><path d="M570 164 l-16 -9 v18z" fill="#ea580c"/><text x="385" y="145" class="s">跨组必带 2^b</text><text x="395" y="205" class="s">低位再用 Trie 求最小</text>
  8. <text x="72" y="270" class="s">同组中的更高位前缀相同;跨组边的最高不同位固定,故可独立递归。</text>
  9. </svg>