Guest User

Untitled

a guest
May 3rd, 2020
58
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. *** main.cpp.old    Sun May  3 16:37:45 2020
  2. --- main.cpp    Sun May  3 16:34:23 2020
  3. ***************
  4. *** 181,182 ****
  5. --- 181,184 ----
  6.  
  7. +     vector<int> pos(n);
  8. +
  9.       for (int cx = 1; cx < BUBEN; ++cx) {
  10. ***************
  11. *** 185,186 ****
  12. --- 187,189 ----
  13.         for (int i = 0; i < n; ++i) {
  14. +         pos[i] = byDepth[depth[i] % cx].size();
  15.           byDepth[depth[i] % cx].push_back(i);
  16. ***************
  17. *** 210,212 ****
  18.             int y = depth[a] % x;
  19. !           int from = lower_bound(all(byDepth[y]), a) - byDepth[y].begin();
  20.             results[mi] += fget(byDepthFenwick[y], from);
  21. --- 213,215 ----
  22.             int y = depth[a] % x;
  23. !           int from = pos[a];
  24.             results[mi] += fget(byDepthFenwick[y], from);
  25. ***************
RAW Paste Data