1500B — Two chandeliers problem.

Revision en1, by Dec0Dedd, 2021-08-25 22:19:43

Hey! Recently, I have tried 1500B - Two chandeliers and after few hours I gave up and opened the editorial. The problem is, I don't quite understand author's solution. I have 3 questions about it.

  • Why in the second congruence, there is $$$y$$$ instead of $$$x$$$?

  • What is the point of finding the number of solutions to that pair of congruences? How does it correlate with number of $$$a_i \neq b_i$$$ in prefix of size $$$x$$$?

  • The problem states that all $$$a_i$$$ are different (same goes for all $$$b_i$$$). Why does it matter?

Thanks in advance!

Tags #problem

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Dec0Dedd 2021-08-25 22:19:43 610 Initial revision (published)