<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>GCD畳み込み on yamate11のブログ</title>
    <link>https://yamate11.github.io/blog/tags/gcd%E7%95%B3%E3%81%BF%E8%BE%BC%E3%81%BF/</link>
    <description>Recent content in GCD畳み込み on yamate11のブログ</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Wed, 20 May 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://yamate11.github.io/blog/tags/gcd%E7%95%B3%E3%81%BF%E8%BE%BC%E3%81%BF/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>ARC185E - Adjacent GCD</title>
      <link>https://yamate11.github.io/blog/posts/2025/04-27-ret-arc185-e/</link>
      <pubDate>Wed, 20 May 2026 00:00:00 +0000</pubDate>
      <guid>https://yamate11.github.io/blog/posts/2025/04-27-ret-arc185-e/</guid>
      <description>問題概要 問題へのリンク 整数 $N$ と，長さ $N$ の正の整数列 $(A_1, \ldots, A_N)$ が与えられる． $m = 1, 2, \ldots, N$ に対して，次の問題を解け
列 $(A_1, \dots, A_m)$ の空でない部分列のスコアの総和を 998244353 で割ったあまりを求めよ． ただし，列 $(B_1, \ldots, B_k)$ のスコアは，$\displaystyle\sum_{i = 1}^{k-1} \textrm{gcd}(B_i, B_{i + 1})$ である． 制約 $1\leq N \leq 5\times10^{5}$，$1 \leq A_i \leq 10^5$
解 公式解説へのリンク ユーザ解説 (noshi91) へのリンク すこし考察すると，解を $R_1, \ldots, R_N$ として，
$$ R_i = 2R_{i - 1} + \sum_{j = 1}^{i - 1} 2^j \textrm{gcd}(A_i, A_j) $$</description>
    </item>
  </channel>
</rss>
