差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン両方とも次のリビジョン
programming_algorithm:contest_history:atcoder:2019:0309_abc121 [2019/03/09] – [解法] ikatakosprogramming_algorithm:contest_history:atcoder:2019:0309_abc121 [2019/03/09] – [解法] ikatakos
行 21: 行 21:
  
 まず排他的論理和の性質から、$f(A,B) = f(1,B) \oplus f(1,A-1)$ である。 まず排他的論理和の性質から、$f(A,B) = f(1,B) \oplus f(1,A-1)$ である。
 +
 +      f(1,A-1):  1     3 .. A-2 A-1
 +  XOR f(1,  B):  1     3 .. A-2 A-1  A  A+1 ... B-1  B
 +  ----------------------------------------------------
 +                 `-- 打ち消し合う --'  A  A+1 ... B-1  B
  
 なので、1から$N$ までの累積排他的論理和が求められればよい。 なので、1から$N$ までの累積排他的論理和が求められればよい。
programming_algorithm/contest_history/atcoder/2019/0309_abc121.txt · 最終更新: 2019/03/09 by ikatakos
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0