<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>peroon</author_name>
  <author_url>https://blog.hatena.ne.jp/peroon/</author_url>
  <blog_title>perogram</blog_title>
  <blog_url>https://perogram.hateblo.jp/</blog_url>
  <categories>
    <anon>cpp</anon>
  </categories>
  <description>参考 http://www.nct9.ne.jp/m_hiroi/linux/cpp08.html#ans06 順列で書くと桁あふれする nCr, nCr-1の関係式から再帰で求められる 追記：競プロではこれを使うことはほぼなく、逆元を使う long long combination(int n, int r) { if (n == r || r == 0) return 1; else return combination(n, r - 1) * (n - r + 1) / r; } 注意点🤔 n = 100000など大きいときは遅い n = 500000などで再帰が深すぎてSegmenta…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fperogram.hateblo.jp%2Fentry%2Fcpp_combination&quot; title=&quot;【C++】nCr 組み合わせ数の実装 漸化式 - perogram&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>https://cdn-ak.f.st-hatena.com/images/fotolife/p/peroon/20190402/20190402202040.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-12-10 18:54:50</published>
  <title>【C++】nCr 組み合わせ数の実装 漸化式</title>
  <type>rich</type>
  <url>https://perogram.hateblo.jp/entry/cpp_combination</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
