<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>noko_htn</author_name>
  <author_url>https://blog.hatena.ne.jp/noko_htn/</author_url>
  <blog_title>nokoのブログ</blog_title>
  <blog_url>https://noko-htn.hatenadiary.com/</blog_url>
  <categories>
    <anon>競プロ</anon>
  </categories>
  <description>はじめに しゃくとり法について復習してみました アルゴリズム概要 しゃくとり法 (尺取り法) の解説と、それを用いる問題のまとめ 英語でいうとtwo pointersらしい O(n2) をO(n)にするテクニックの1つであるしゃくとり法 「連続する部分列」で使う 「条件」を満たす区間 (連続する部分列) のうち、最小の長さを求めよ 「条件」を満たす区間 (連続する部分列) のうち、最大の長さを求めよ 「条件」を満たす区間 (連続する部分列) を数え上げよ 愚直に全探索をしようと思うと、n(n+1)/2n個の区間がある (後述) ため O(n2)の計算量を要します。それを鮮やかに O(n)に改善…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnoko-htn.hatenadiary.com%2Fentry%2F2020%2F04%2F12%2F160343&quot; title=&quot;しゃくとり法を復習してみた(Python)  - nokoのブログ&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>2020-04-12 16:03:43</published>
  <title>しゃくとり法を復習してみた(Python) </title>
  <type>rich</type>
  <url>https://noko-htn.hatenadiary.com/entry/2020/04/12/160343</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
