<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>moistx</author_name>
  <author_url>https://blog.hatena.ne.jp/moistx/</author_url>
  <blog_title>Logfiles</blog_title>
  <blog_url>https://logfiles.hatenablog.com/</blog_url>
  <categories>
    <anon>SRM</anon>
  </categories>
  <description>問題文 'A', 'B', 'C' のみの文字を用いて、長さ n の文字列が構成される。文字列のうち、その部分文字列において 'A', 'B', 'C' の文字が順不同で１つずつ連続しているようなものがあるものは、禁止文字列と定義する。禁止文字列でない長さ n の文字列の総数を答えよ。解法 dp[文字数][1つ前の文字種][2つ前の文字種] := 禁止文字列の数 として、DPする。 class ForbiddenStrings { public: long long countNotForbidden(int n) { if(n == 1) return 3; if(n == 2) retur…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flogfiles.hatenablog.com%2Fentry%2F20140822%2F1408685931&quot; title=&quot;SRM412 ForbiddenStrings - Logfiles&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>2014-08-22 14:38:51</published>
  <title>SRM412 ForbiddenStrings</title>
  <type>rich</type>
  <url>https://logfiles.hatenablog.com/entry/20140822/1408685931</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
