<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>SssssI</author_name>
  <author_url>https://blog.hatena.ne.jp/SssssI/</author_url>
  <blog_title>コードとか</blog_title>
  <blog_url>https://sssssi.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>最大値と最小値を両方O(logN)で見たい、ワガママな人のための優先度付きキュー。要素の追加はO(logN)、要素の存在確認はO(1)。 ただし、heapqを２つ使っているので使うメモリも２倍、計算量も２倍。 import heapq class HeapBiq: def __init__(self,A=[]): self.low = A self.hi = [-1*a for a in A] heapq.heapify(self.low) heapq.heapify(self.hi) self.dic = {} for a in A: if a in self.dic: self.dic[a…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsssssi.hatenablog.com%2Fentry%2F2023%2F01%2F08%2F171726&quot; title=&quot;両方向で見られる優先度付きキュー - コードとか&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-01-08 17:17:26</published>
  <title>両方向で見られる優先度付きキュー</title>
  <type>rich</type>
  <url>https://sssssi.hatenablog.com/entry/2023/01/08/171726</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
