/tmp/solutions/build/point_set_range_composite-main.cpp:
    1|       |#include <common.h>
    2|       |#include <toy/bit.h>
    3|       |prelude;
    4|       |
    5|       |namespace {
    6|       |
    7|       |constexpr int N = 1e6;
    8|       |constexpr int P = 998244353;
    9|       |
   10|       |struct node {
   11|       |  u32 a, b;
   12|      5|  auto operator+(node t) -> node {
   13|      5|    return {u32(u64(t.a) * a % P), u32((u64(t.a) * b + t.b) % P)};
   14|      5|  }
   15|     12|  auto operator+(u32 x) -> u32 { return (u64(a) * x + b) % P; }
   16|       |} a[N];
   17|       |
   18|       |} // namespace
   19|       |
   20|      1|int main() {
   21|      1|  rd rd;
   22|      1|  wt wt;
   23|      1|  int n = rd.uh();
   24|      1|  int q = rd.uh();
   25|      6|  for (int i = 0; i < n; ++i) {
                                       ^5
  ------------------
  |  Branch (25:19): [True: 83.33%, False: 16.67%]
  ------------------
   26|      5|    int k = i * 2 + 1;
   27|      5|    a[k] = {rd.uw(), rd.uw()};
   28|      8|    for (int j = 1; k & (j * 2); k -= j, j *= 2) {
                                               ^3
  ------------------
  |  Branch (28:21): [True: 37.50%, False: 62.50%]
  ------------------
   29|      3|      a[k - j] = a[k - j * 2] + a[k];
   30|      3|    }
   31|      5|  }
   32|      6|  while (q--) {
  ------------------
  |  Branch (32:10): [True: 83.33%, False: 16.67%]
  ------------------
   33|      5|    let t = rd.u1();
   34|      5|    if (t == 0) {
  ------------------
  |  Branch (34:9): [True: 20.00%, False: 80.00%]
  ------------------
   35|      1|      int k = rd.uh() * 2 + 1;
   36|      1|      a[k] = {rd.uw(), rd.uw()};
   37|      3|      for (int j = 1;; j *= 2) {
                                     ^2
   38|      3|        if (k & (j * 2)) {
  ------------------
  |  Branch (38:13): [True: 33.33%, False: 66.67%]
  ------------------
   39|      1|          a[k - j] = a[k - j * 2] + a[k];
   40|      1|          k -= j;
   41|      2|        } else {
   42|      2|          if (k + j * 3 > n * 2) break;
                                               ^1
  ------------------
  |  Branch (42:15): [True: 50.00%, False: 50.00%]
  ------------------
   43|      1|          a[k + j] = a[k] + a[k + j * 2];
   44|      1|          k += j;
   45|      1|        }
   46|      3|      }
   47|      1|    }
   48|      5|    if (t == 1) {
  ------------------
  |  Branch (48:9): [True: 80.00%, False: 20.00%]
  ------------------
   49|      4|      int l = rd.uh() * 2 + 1;
   50|      4|      int r = rd.uh() * 2 + 1;
   51|      4|      u32 x = a[l] + rd.uw();
   52|      4|      int k = (-1 << log(l ^ r)) & r;
   53|     10|      for (++l; l < k; l += l & -l) {
                                     ^6
  ------------------
  |  Branch (53:17): [True: 60.00%, False: 40.00%]
  ------------------
   54|      6|        x = a[l + (l & -l) / 2] + x;
   55|      6|      }
   56|      6|      for (--r; k < r;) {
  ------------------
  |  Branch (56:17): [True: 33.33%, False: 66.67%]
  ------------------
   57|      2|        int t = 1 << log(r - k);
   58|      2|        x = a[k + t / 2] + x;
   59|      2|        k += t;
   60|      2|      }
   61|      4|      wt.uw(x);
   62|      4|    }
   63|      5|  }
   64|      1|  return 0;
   65|      1|}