Codeforces и Polygon могут быть недоступны в период с 6 декабря, 22:00 (МСК) по 7 декабря, 00:00 (МСК) в связи с проведением технических работ. ×

Help required on a dp problem

Правка en4, от codingp110, 2024-05-23 20:14:58

Hi all! Please provide some hints for this problem: https://codeforces.net/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.

Теги dp problem, need help

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский codingp110 2024-05-23 20:14:58 73
en3 Английский codingp110 2024-05-23 19:11:43 3 Tiny change: 'on Summary\nGiven co' -> 'on Summary:\n\nGiven co'
en2 Английский codingp110 2024-05-23 19:11:03 485
en1 Английский codingp110 2024-05-23 17:23:07 419 Initial revision (published)