A problem that I've been stuck on for a long while now

Правка en1, от Alex7, 2016-05-22 16:40:19

You're given a rooted tree with N nodes and Q queries in each query you have an integer K and you want to delete the nodes of the tree the only restriction of deleting some node is that it must be either the root or its parent must be deleted and you can delete at most K nodes each second, what is the minimum time for deleting all nodes?

N <= 10^6 Q <= 10^6

Problem Link

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Alex7 2016-05-22 16:40:19 476 Initial revision (published)