/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|  1.00k|  auto operator+(node t) -> node {
   13|  1.00k|    return {u32(u64(t.a) * a % P), u32((u64(t.a) * b + t.b) % P)};
   14|  1.00k|  }
   15|    903|  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|      5|  for (int i = 0; i < n; ++i) {
                                       ^4
  ------------------
  |  Branch (25:19): [True: 80.00%, False: 20.00%]
  ------------------
   26|      4|    int k = i * 2 + 1;
   27|      4|    a[k] = {rd.uw(), rd.uw()};
   28|      7|    for (int j = 1; k & (j * 2); k -= j, j *= 2) {
                                               ^3
  ------------------
  |  Branch (28:21): [True: 42.86%, False: 57.14%]
  ------------------
   29|      3|      a[k - j] = a[k - j * 2] + a[k];
   30|      3|    }
   31|      4|  }
   32|  1.00k|  while (q--) {
  ------------------
  |  Branch (32:10): [True: 99.90%, False: 0.10%]
  ------------------
   33|  1.00k|    let t = rd.u1();
   34|  1.00k|    if (t == 0) {
  ------------------
  |  Branch (34:9): [True: 50.30%, False: 49.70%]
  ------------------
   35|    503|      int k = rd.uh() * 2 + 1;
   36|    503|      a[k] = {rd.uw(), rd.uw()};
   37|  1.50k|      for (int j = 1;; j *= 2) {
                                     ^1.00k
   38|  1.50k|        if (k & (j * 2)) {
  ------------------
  |  Branch (38:13): [True: 34.92%, False: 65.08%]
  ------------------
   39|    527|          a[k - j] = a[k - j * 2] + a[k];
   40|    527|          k -= j;
   41|    982|        } else {
   42|    982|          if (k + j * 3 > n * 2) break;
                                               ^503
  ------------------
  |  Branch (42:15): [True: 51.22%, False: 48.78%]
  ------------------
   43|    479|          a[k + j] = a[k] + a[k + j * 2];
   44|    479|          k += j;
   45|    479|        }
   46|  1.50k|      }
   47|    503|    }
   48|  1.00k|    if (t == 1) {
  ------------------
  |  Branch (48:9): [True: 49.70%, False: 50.30%]
  ------------------
   49|    497|      int l = rd.uh() * 2 + 1;
   50|    497|      int r = rd.uh() * 2 + 1;
   51|    497|      u32 x = a[l] + rd.uw();
   52|    497|      int k = (-1 << log(l ^ r)) & r;
   53|    800|      for (++l; l < k; l += l & -l) {
                                     ^303
  ------------------
  |  Branch (53:17): [True: 37.88%, False: 62.12%]
  ------------------
   54|    303|        x = a[l + (l & -l) / 2] + x;
   55|    303|      }
   56|    600|      for (--r; k < r;) {
  ------------------
  |  Branch (56:17): [True: 17.17%, False: 82.83%]
  ------------------
   57|    103|        int t = 1 << log(r - k);
   58|    103|        x = a[k + t / 2] + x;
   59|    103|        k += t;
   60|    103|      }
   61|    497|      wt.uw(x);
   62|    497|    }
   63|  1.00k|  }
   64|      1|  return 0;
   65|      1|}