diff options
| author | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 21:17:29 +0100 |
|---|---|---|
| committer | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 21:17:29 +0100 |
| commit | 1880ccb6d85c6eb79e724593457877bab431951c (patch) | |
| tree | 23eddd5bd0b29b3024e170a5ef9023eda9226ab5 /content/math/linearRecurrence.cpp | |
| parent | e95f59debd69ee7d45d5c966ce466d23264e1c3c (diff) | |
get rid of all() and sz()
Diffstat (limited to 'content/math/linearRecurrence.cpp')
| -rw-r--r-- | content/math/linearRecurrence.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/content/math/linearRecurrence.cpp b/content/math/linearRecurrence.cpp index a8adacd..eb04566 100644 --- a/content/math/linearRecurrence.cpp +++ b/content/math/linearRecurrence.cpp @@ -1,9 +1,9 @@ constexpr ll mod = 998244353; // oder ntt mul @\sourceref{math/transforms/ntt.cpp}@ vector<ll> mul(const vector<ll>& a, const vector<ll>& b) { - vector<ll> c(sz(a) + sz(b) - 1); - for (int i = 0; i < sz(a); i++) { - for (int j = 0; j < sz(b); j++) { + vector<ll> c(ssize(a) + ssize(b) - 1); + for (int i = 0; i < ssize(a); i++) { + for (int j = 0; j < ssize(b); j++) { c[i+j] += a[i]*b[j] % mod; }} for (ll& x : c) x %= mod; @@ -11,7 +11,7 @@ vector<ll> mul(const vector<ll>& a, const vector<ll>& b) { } ll kthTerm(const vector<ll>& f, const vector<ll>& c, ll k) { - int n = sz(c); + int n = ssize(c); vector<ll> q(n + 1, 1); for (int i = 0; i < n; i++) q[i + 1] = (mod - c[i]) % mod; vector<ll> p = mul(f, q); |
