随笔分类 - 树状数组
摘要:三维偏序(陌上花开) 题目背景 这是一道模板题 可以使用bitset,CDQ分治,K-DTree等方式解决。 题目描述 有 n 个元素,第 i 个元素有 ai、bi、ci 三个属性,设 f(i) 表示满足 aj≤ai 且 bj≤bi 且 cj≤ci 的 j 的数量。 对于 d∈[0
阅读全文
摘要:Split The Tree 题目描述 You are given a tree with n vertices, numbered from 1 to n. ith vertex has a value wiWe define the weight of a tree as the number
阅读全文
摘要:Different Integers Given a sequence of integers a1, a2, ..., an and q pairs of integers (l1, r1), (l2, r2), ..., (lq, rq), find count(l1, r1), count(l
阅读全文

浙公网安备 33010602011771号