| 12345678 |
- <svg xmlns="http://www.w3.org/2000/svg" width="950" height="310" viewBox="0 0 950 310">
- <style>.t{font:16px sans-serif;fill:#1f2937}.s{font:13px sans-serif;fill:#475569}.good{fill:#dcfce7;stroke:#16a34a;stroke-width:3}.bad{fill:#fee2e2;stroke:#dc2626;stroke-width:3}.cell{fill:#fff;stroke:#dc2626;stroke-width:2}.a{stroke:#64748b;stroke-width:3}</style>
- <rect width="950" height="310" fill="white"/><text x="32" y="34" class="t" font-weight="bold">复杂度的分界不是“是否用了 set”,而是当前段数能否被题面过程压住</text>
- <rect x="65" y="76" width="345" height="165" rx="12" class="good"/><text x="86" y="107" class="t" font-weight="bold">题目给出随机长区间赋值</text><rect x="95" y="138" width="275" height="44" rx="7" fill="#fff" stroke="#16a34a" stroke-width="2"/><text x="232" y="166" class="t" text-anchor="middle">许多旧段 → 一张新段</text><text x="87" y="215" class="s">段数常被压缩;但这是输入契约,</text><text x="87" y="234" class="s">不是每个 ODT 操作的最坏界。</text>
- <rect x="535" y="76" width="345" height="165" rx="12" class="bad"/><text x="556" y="107" class="t" font-weight="bold">对抗:全异值 + 全区间加</text>
- <g transform="translate(560 135)"><rect x="0" y="0" width="30" height="35" class="cell"/><rect x="30" y="0" width="30" height="35" class="cell"/><rect x="60" y="0" width="30" height="35" class="cell"/><rect x="90" y="0" width="30" height="35" class="cell"/><rect x="120" y="0" width="30" height="35" class="cell"/><rect x="150" y="0" width="30" height="35" class="cell"/><rect x="180" y="0" width="30" height="35" class="cell"/><rect x="210" y="0" width="30" height="35" class="cell"/><rect x="240" y="0" width="30" height="35" class="cell"/><text x="135" y="59" class="s" text-anchor="middle">每格一段,add(1,n,+1) 仍要扫 n 段</text></g>
- <text x="557" y="225" class="s">值差仍为 1,段数长期 Θ(n)。</text>
- </svg>
|