CCPC 2021 Online - E Review: Periodic Prefixes and Congruence Classes
Split each time in a cyclic walk into complete cycles and a position within one cycle, then maintain the earliest arrival time in congruence classes modulo the…
Split each time in a cyclic walk into complete cycles and a position within one cycle, then maintain the earliest arrival time in congruence classes modulo the…
A review of a substring-counting problem, moving from brute-force enumeration to counting prefix-difference states and using inclusion–exclusion to handle repe…