Minimum number of days required to solve a list of questions

前端 未结 4 549
死守一世寂寞
死守一世寂寞 2020-12-05 21:59

There are N problems numbered 1..N which you need to complete. You\'ve arranged the problems in increasing difficulty order, and the ith problem has estimated difficulty lev

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-05 22:31

    The minimum number of days required will be the same as the length of the longest path in the complementary (undirected) graph of G (DAG). This can be solved using Dilworth's theorem.

提交回复
热议问题