随笔分类 -  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 阅读全文
posted @ 2019-09-13 11:18 StarHai 阅读(306) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2019-08-13 22:55 StarHai 阅读(338) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2019-05-26 16:45 StarHai 阅读(330) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2019-05-25 21:26 StarHai 阅读(247) 评论(0) 推荐(0) 编辑
摘要:给一个包含n个点,m条边的无向连通图。从顶点1出发,往其余所有点分别走一次并返回。 往某一个点走时,选择总长度最短的路径走。若有多条长度最短的路径,则选择经过的顶点序列字典序最小的那条路径(如路径A为1,32,11,路径B为1,3,2,11,路径B字典序较小。注意是序列的字典序的最小,而非路径中节点 阅读全文
posted @ 2019-05-25 19:25 StarHai 阅读(396) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示