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

Автор codingp110, история, 6 месяцев назад, По-английски

Hi all! Please provide some hints for this problem: https://mirror.codeforces.com/gym/524325/problem/C. I am able to come up with a recursive solution for this problem but that is ofcourse giving TLE and I think memoization cannot be done seeing the bounds on the coordinates. I would be very grateful if you could point me to questions which would help build the intuition for solving this one.

Question Summary:

Given coordinates of Alice and Bob and N falling apples we need to calculate the minimum distance(Manhattan) to be covered by Alice and Bob in total to catch all apples. The apples must be caught sequentially that is apple at i+1th index cannot be caught before catching apple at index i. Assume Bob and Alice can cover distances instantaneously. The number of test cases can be at max 10 , apples at max 2000 and coordinates are non negative and bounded by 1e9.

Полный текст и комментарии »

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