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

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

http://community.topcoder.com/stat?c=problem_statement&pm=10804

This problem is Member SRM 474 div2 500 problem. Since it is a member SRM, there is no editorial. I cant understand the solution code even. But I am very much interested to understand the solution of this problem and then I will try to solve it.

Please help me understanding the idea of the solution of this problem. I am stuck on this problem.

Теги dp, srm
  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

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

Obviously, you can't store all 50 points, because each point is too large. All you need to do is to find an interval of the travel, [a, b], such that the displacement is zero. So you can bruteforce all pairs a, b to check each coordinate independently. If all coordinates are zero, you visit the same point twice. code1 code2 — faster

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

Displacement !!! right !! thanks a lot... excellent idea !!!