<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>koba-e964</author_name>
  <author_url>https://blog.hatena.ne.jp/koba-e964/</author_url>
  <blog_title>koba-e964の日記</blog_title>
  <blog_url>https://koba-e964.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>こういうのはかなり得意だと思っている。 No.802 だいたい等差数列 - yukicoder 問題 以下の条件を満たす長さNの整数列Aの個数を数え、10^9+7で割った余りを求めよ。 1 i = 1, ..., N - 1に対して D1 制約 2 1 0 解法 まず愚直DPを考える。DP[i][j] := (Aの第i項まで見たとき、A[i]=jとなるような数列の個数)としたとき、以下のような遷移を持つDPを行えばよい。 init: DP[1][j] = 1 step: DP[i + 1][j + k] += DP[i][j] (D1 これのDP[N][1] + ... DP[N][M]が答え…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkoba-e964.hatenablog.com%2Fentry%2F2019%2F03%2F18%2F000751&quot; title=&quot;yukicoder No.802 だいたい等差数列 - koba-e964の日記&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>2019-03-18 00:07:51</published>
  <title>yukicoder No.802 だいたい等差数列</title>
  <type>rich</type>
  <url>https://koba-e964.hatenablog.com/entry/2019/03/18/000751</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
