primitive root and square decomposition problem

Правка en1, от omar_amer47, 2024-06-01 20:17:05

I'm trying to solve https://www.codechef.com/problems/COOLSBST on codechef, I tried to think of solution that involves precomuting and square decomposition or sorting the test cases based on L and R but couldn't figure it out. can somebody explain how to solve it using square decomposition? thanks in advance.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский omar_amer47 2024-06-01 20:17:05 357 Initial revision (published)