<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>pekempey</author_name>
  <author_url>https://blog.hatena.ne.jp/pekempey/</author_url>
  <blog_title>pekempey's blog</blog_title>
  <blog_url>https://pekempey.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>https://yukicoder.me/problems/no/950だいぶ手間取った。対角化は頭にちらついてはいたけど経験上、行列の成分が任意のときにこれをやると沼にはまるので避けた。結果として避けてよかったのかな。たぶんどっちを選ぶかは好みの問題な気がする。行列でなく整数で $a^n=b \pmod{p}$ を求める問題であれば BSGS (baby step giant step) と呼ばれるアルゴリズムで解けます。今回の問題も\begin{equation} \begin{pmatrix} a &amp; 0 \\ 0 &amp; a \end{pmatrix}^n = \begin{pmatrix…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpekempey.hatenablog.com%2Fentry%2F2019%2F12%2F15%2F045622&quot; title=&quot;yukicoder No.950 行列累乗 - pekempey&amp;#39;s blog&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-12-15 04:56:22</published>
  <title>yukicoder No.950 行列累乗</title>
  <type>rich</type>
  <url>https://pekempey.hatenablog.com/entry/2019/12/15/045622</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
