树链剖分
KinFungYu
前SCAU ACM校队队员
展开
-
fzu 2082 过路费(树链剖分,询问两点距离)
Problem 2082 过路费 Accept: 158 Submit: 630 Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description 有n座城市,由n-1条路相连通,使得任意两座城市之间可达。每条路有过路费,要交过路费才能通过。每条路的过路费经常会更新,现问你,当前情况下,从城市a到城市b最原创 2014-08-12 21:59:32 · 703 阅读 · 0 评论 -
spoj 375 Query on a tree(树链剖分模版)
Query on a tree Time Limit: 5000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu [Submit] [Go Back] [Status] Description You are given a tree (an ac原创 2014-08-12 20:54:18 · 767 阅读 · 0 评论