Tagged “number-theory”
1 post. All tags
2026-06-19
GCDARR2. GCD Arrays (Hard) CodeChef fix g as the interior GCD, count interior sequences with Möbius inversion, count valid endpoint pairs with inclusion-exclusion — O(M log M + M log N) per test case