<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ishikado</author_name>
  <author_url>https://blog.hatena.ne.jp/ishikado/</author_url>
  <blog_title>ishikadoのアルゴリズム勉強録</blog_title>
  <blog_url>https://ishikado.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>xorの演算はビットごとに独立に行えるので、ビットごとにデータ構造を用意して、クエリの処理を行う。 ここで必要なのは ある範囲のビットを反転する ある範囲において１であるビットの数を数える の２種類の演算を処理するデータ構造を定義すること。範囲の集約処理なのでSegmentTreeを用いるとうまくいく。 範囲の値の和は、SegmentTreeの各ノードに、子ノードの値の和を持つことによって計算可能。 ではある範囲のビットを反転する操作はどのように行うか？ このために、各ノードが反転しているかどうかのフラグを導入する。 範囲のビット反転を行うとき、完全にクエリ領域に含まれる領域は、フラグを反転す…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fishikado.hatenadiary.org%2Fentry%2F20130303%2F1362272708&quot; title=&quot;Codeforces Round #149 E - ishikadoのアルゴリズム勉強録&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>2013-03-03 10:05:08</published>
  <title>Codeforces Round #149 E</title>
  <type>rich</type>
  <url>https://ishikado.hatenadiary.org/entry/20130303/1362272708</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
