Is there an algorithm that solves this problem for any $$$k$$$? https://codeforces.me/problemset/gymProblem/101806/X.
Any complexity is allowed, if it solves the problem for $$$k\leq5$$$ with the original constraints.
Spoiler
Is there any general algorithm?
Is there an algorithm that solves this problem for any $$$k$$$? https://codeforces.me/problemset/gymProblem/101806/X.
Any complexity is allowed, if it solves the problem for $$$k\leq5$$$ with the original constraints.
| Rev. | Lang. | By | When | Δ | Comment | |
|---|---|---|---|---|---|---|
| en3 |
|
i_love_sqrt_decomp | 2025-05-05 12:48:24 | 5 | Tiny change: 'g at most O(m) iteration' -> 'g at most $m$ iteration' | |
| en2 |
|
i_love_sqrt_decomp | 2025-05-05 12:48:12 | 32 | Tiny change: 'th problem, which is' -> 'th problem using at most O(m) iterations, which is' | |
| en1 |
|
i_love_sqrt_decomp | 2025-05-05 12:45:19 | 391 | Initial revision (published) |