summaryrefslogtreecommitdiff
path: root/test/math/linearRecurrence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/math/linearRecurrence.cpp')
-rw-r--r--test/math/linearRecurrence.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/math/linearRecurrence.cpp b/test/math/linearRecurrence.cpp
index f0ebe76..79607ac 100644
--- a/test/math/linearRecurrence.cpp
+++ b/test/math/linearRecurrence.cpp
@@ -6,16 +6,15 @@ vector<ll> mul(const vector<ll>& a, const vector<ll>& b) {
return mulSlow(a, b);
}
-
struct RandomRecurence {
vector<ll> f, c, cache;
RandomRecurence(int n) : f(Random::integers<ll>(n, 0, mod)), c(Random::integers<ll>(n, 0, mod)), cache(f) {}
ll operator()(ll k){
- while (sz(cache) <= k) {
+ while (ssize(cache) <= k) {
ll cur = 0;
- for (ll i = 0; i < sz(c); i++) {
- cur += (c[i] * cache[sz(cache) - i - 1]) % mod;
+ for (ll i = 0; i < ssize(c); i++) {
+ cur += (c[i] * cache[ssize(cache) - i - 1]) % mod;
}
cur %= mod;
cache.push_back(cur);