Блог пользователя mbrc

Автор mbrc, 11 лет назад, По-английски

I am a beginner in algorithms and coding contests. Can anyone tell me how to solve 259E - Little Elephant and LCM. I am completely ignorant of a suitable solution. Please help me by telling me the details. Thanks in advance!

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

»
11 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Suppose t is the max value of sequence b. Then we know that all the elements in b are t's factors, and at least one element's value is t.

Now, think about it :)