随笔分类 - ACM-树分治
摘要:bobo has a tree, whose vertices are conveniently labeled by 1,2,…,n. At the very begining, the i-th vertex is assigned with weight w i.There are q ope
阅读全文
摘要:The country Tom living in is famous for traveling. Every year, many tourists from all over the world have interests in traveling there. There are n pr
阅读全文
摘要:After the success of 2nd anniversary (take a look at problem FTOUR for more details), this 3rd year, Travel Agent SPOJ goes on with another discount t
阅读全文
摘要:There is a skyscraping tree standing on the playground of Nanjing University of Science and Technology. On each branch of the tree is an integer (The
阅读全文
摘要:给一个包含n个点,m条边的无向连通图。从顶点1出发,往其余所有点分别走一次并返回。 往某一个点走时,选择总长度最短的路径走。若有多条长度最短的路径,则选择经过的顶点序列字典序最小的那条路径(如路径A为1,32,11,路径B为1,3,2,11,路径B字典序较小。注意是序列的字典序的最小,而非路径中节点
阅读全文