Need help on a difficult problem

Правка en1, от RayPatterson, 2018-08-16 14:45:20

Hi! I encountered this problem recently: https://szkopul.edu.pl/problemset/problem/QT9Um-jnm6-sf8Gerxu1EbkL/site/?key=statement.

I have given it 2 days of thought and still haven't managed to come up with an idea to solve it. I thought to represent the items as a tree, with the dependent of item i being its father. Then we will perform dynamic programming on it. However, I am unable to figure out what to save in the states, and boolean arrays are simply too large to pass.

Теги trees, dp

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский RayPatterson 2018-08-16 14:45:20 512 Initial revision (published)