Skip to content

Commit

Permalink
微小的更新
Browse files Browse the repository at this point in the history
  • Loading branch information
zerolfx committed Oct 26, 2018
1 parent faf3454 commit ae864e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions 2-数学.md
Original file line number Diff line number Diff line change
Expand Up @@ -1249,12 +1249,10 @@ LL exBSGS(LL a, LL b, LL p) { // a^x = b (mod p)
## 数论分块
令 $g(i) = \lfloor \frac{n}{i} \rfloor$。在求 $g(i)$ 的同时求出 $[i,j]$ 的 $g(i)$。那么 $j=n/(n/i)$。
$f(i) = \lfloor \frac{n}{i} \rfloor=v$ 时 $i$ 的取值范围是 $[l,r]$。
```cpp
for (LL i = 1; i <= n; i = j + 1) {
j = n / (n / i);
ans += (j - i + 1) * (n / i);
for (LL l = 1, v, r; l <= N; l = r + 1) {
v = N / l; r = N / v;
}
```

Binary file modified template.pdf
Binary file not shown.

0 comments on commit ae864e0

Please sign in to comment.