especially interesting.
https://www.codechef.com/ISCC2017/problems/SEQUA
I consider using group theory, and in this way the complexity is around 1e6 (max{M^2, N/M}). Are there any simpler solutions?
what's the group theory ??
Обсуждают сегодня