Math
1622. Fancy Sequence
Design Fancy: append(val); addAll(inc) adds to every element; multAll(m) multiplies every element; getIndex(i) returns the i-th element mod 1e9+7 (or −1). Up to 1e5 operations, so naively touching…
Loading…
Design Fancy: append(val); addAll(inc) adds to every element; multAll(m) multiplies every element; getIndex(i) returns the i-th element mod 1e9+7 (or −1). Up to 1e5 operations, so naively touching…
Loading…