随笔分类 - 树状数组
摘要:传送门 Problem Statement Problem Statement You are given a tree where each node is labeled from 1 to n. How many similar pairs(S) are there in this tree?
阅读全文
摘要:传送门 时间限制:18000ms单点时限:2000ms内存限制:512MB描述小h拥有$n$位朋友。每位朋友拥有一个数值$V_i$代表他与小h的亲密度。亲密度有可能发生变化。岁月流逝,小h的朋友们形成了一种稳定的树状关系。每位朋友恰好对应树上的一个节点。每次小h想请两位朋友一起聚餐,他都必须把连接两
阅读全文
摘要:传送门 Time Limit: 3 Sec Memory Limit: 128 MB Description Alice likes playing games. So she will take part in the movements of M within N days, and each
阅读全文
摘要:Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description After inventing Turing Tree, 3xian always felt bo
阅读全文
摘要:Description 有一个N个整数的序列(每个数的初值为0)。每个数都是整数。你有M次操作。操作有两种类型: ——Add Di Xi 从第一个数开始每隔Di 个位置增加Xi ——Query Li Ri 回答当前序列Li项到Ri项的和 有一个N个整数的序列(每个数的初值为0)。每个数都是整数。你有
阅读全文

浙公网安备 33010602011771号