Amazing problem on binary search and number theory...

Revision en1, by rover1, 2019-11-02 11:34:00

Hi everyone, can someone explain the solution for this problem Link https://www.codechef.com/COX2019/problems/CHESHCYC It seems that this problem needs inclusion exclusion principle and binary search but i can't figure it out... If anyone is interested to see the accepted solution link https://www.codechef.com/viewsolution/27600843 Please help...

Tags #binary search, inclusion-exclusion, observation

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rover1 2019-11-02 11:34:00 407 Initial revision (published)