<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mayokoex</author_name>
  <author_url>https://blog.hatena.ne.jp/mayokoex/</author_url>
  <blog_title>mayoko’s diary</blog_title>
  <blog_url>https://mayokoex.hatenablog.com/</blog_url>
  <categories>
    <anon>yukicoder</anon>
  </categories>
  <description>問題 No.75 回数の期待値の問題 - yukicoder 解法 冷静に漸化式を立てます。dp[i] = (今のマスが i の時にゴールするために必要なサイコロをふる回数の期待値)とすると, dp[i] = 1/6 * dp[i+1] + ... + 1/6 * dp[i+6]とします。求めたいのは dp[0] ですね。この漸化式は連立方程式を立てることで求められますが, ガウス・ザイデル法というのを用いると何回も上記の漸化式を繰り返すことで目的の値を求めることが出来ます。はい。 double solve(int K) { vector&lt;double&gt; dp(K+6); for (int t…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2015%2F11%2F19%2F211408&quot; title=&quot;yukicoder No.75 回数の期待値の問題 - mayoko’s diary&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>2015-11-19 21:14:08</published>
  <title>yukicoder No.75 回数の期待値の問題</title>
  <type>rich</type>
  <url>https://mayokoex.hatenablog.com/entry/2015/11/19/211408</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
