摘要:
我很弱,但是我要坚强!绝不让那些为我付出过的人失望图的存储结构之邻接表(详解)之前我们介绍过图的邻接矩阵存储法,它的空间和时间复杂度都是N2,现在我来介绍另外一种存储图的方法:邻接表,这样空间和时间复杂度就都是M。对于稀疏图来说,M要远远小于N2。先上数据,如下。12... 阅读全文
摘要:
A New Year party is not a New Year party without lemonade! As usual, you are expecting a lot of guests, and buying lemonade has alread... 阅读全文
摘要:
You are preparing for an exam on scheduling theory. The exam will last for exactly Tmilliseconds and will consist of n problems. You can either solve 阅读全文
摘要:
There are n pearls in a row. Let's enumerate them with integers from 1 to n from the left to the right. The pearl number i has the typ... 阅读全文
摘要:
You have a rooted tree consisting of n vertices. Each vertex of the tree has some color. We will assume that the tree vertices are numbered by integer 阅读全文