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

Автор EvenImage, история, 9 лет назад, По-английски

I accepted this problem during the training using a solution.

When I read the model solutions submitted by Mike, I found they are brute force too. And It will failed on a easy case n = 218 - 1, ai = i, bi = i + 1.

Only my solution and Los_Angelos_Laycurse's solution pass this case.

I think we implemented more clever brute force solutions.

But I don't know how to prove my solution is right or construct some hard cases to make my solution TLE.

I really want to know: Is there any provable solution to solve this problem?

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

»
9 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится -99 Проголосовать: не нравится

.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -47 Проголосовать: не нравится

Come! On! Stop solving every single problem under the sun. I will never reach you guys this way.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +41 Проголосовать: не нравится

As far as I know, the intended solution is and the problem author is ilyakor.