摘要:
Description一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w。我们将以下面的形式来要求你对这棵树完成一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节点的最大权值 III. QSUM u v: 询问从点u到... 阅读全文
摘要:
DescriptionAndy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, "Can you... 阅读全文
摘要:
DescriptionDotR (Defense of the Robots) Allstars是一个风靡全球的魔兽地图,他的规则简单与同样流行的地图DotA (Defense of the Ancients) Allstars。DotR里面的英雄只有一个属性——力量。他们需要购买装备来提升自己的力... 阅读全文
摘要:
DescriptionGive a tree with n vertices,each edge has a length(positive integer less than 1001).Define dist(u,v)=The min distance between node u and v.... 阅读全文
摘要:
DescriptionThere is a travel agency in Adelton town on Zanzibar island. It has decided to offer its clients, besides many other attractions, sightseei... 阅读全文