Open FR-vdash-bot opened 3 months ago
Related Problems in Library Checker
Thank you for proposing new problems, and many References!! I only know that they can be computed in O(N^{2/3}) time, so I want to study them soon.
I can't access some of the references. Can you publish them?
I know that some algorithm can compute single partial sum, and some algorithm can compute all $\lfloor N/n \rfloor$-th partial sums. And both can be used to solve problems in competitive programming. So I think it is ok to put both version of the problem.
I forgot to change the permissions. It should be fine now.
By the way, from the practical point of view, experiments on QOJ show that the current $\tilde O(\sqrt n)$ methods are much slower than the $O(n^{2/3} \log^{-4/3} n)$ method below $10^{13}$.
I have roughly understood the method to calculate the prefix sum in $\tilde{O}(N^{1/2})$ time. However, I still don't understand the method to calculate all $\lfloor N/i\rfloor$-th sum in $\tilde{O}(N^{1/2})$ time. Which part of which resource would be helpful for this method?
In the framework of my method, all you need is to compute exp. After computing an approximation for each sum using exp of power series, use 2.4 of 8 or 4.1 of 9 for error correction.
Ah, I see.
I first understood how to correct errors in summing up to $n$. Now I understand that the method can be applied to calculate all $\lfloor n/i\rfloor$-th sums. thank you.
Problem
Given a multiplicative function $f(x)$, $f(p^e) = ae + bp$. Print $\displaystyle \sum_{i=1}^N f(i) \bmod 469762049$.
Constraint
Solution / Reference
(The titles of Proceedings of the IOI Chinese National Candidate Team are different every year, but they are indeed a series.)
Note
This problem has been uploaded to https://qoj.ac/problem/8327 for experimenting with $\tilde O(\sqrt N)$ methods. This method needs to enumerate factors to fix errors, it's bad implementations may error on specific inputs. So there may be multiple test cases in a single test file. The (badly written) generator is here.
It asks for every $\displaystyle \sum_{i=1}^{\left\lfloor\frac N n\right\rfloor} f(i)$, but some methods can only compute a single partial sum. Also, some methods may be too slow to compute for $N = 10^{13}$. So we may need different versions of this problem (or do not add the $10^{13}$ version?).
I used 469762049 instead of 998244353 because it's easier to compute very long convolutions, which may be needed in $\tilde O(\sqrt N)$ methods.