摘要:
2.1 LAWS OF COMPOSITION Def. (Laws of Composition) Any rule combining pairs of element of \(S\) to get another element of \(S\): \(S\times S \to S\). 阅读全文
摘要:
纯数据结构题,没有思维难度。直接用线段树求最大子段和的方法完成树上路径的合并。注意链上合并顺序要符合序列的前后顺序。 #include <cstdio> #include <cstring> #define cd w<<1 const int S=200030; int n,Q,h[S],v[S], 阅读全文