
线段树
文章平均质量分 91
m0_51864047
这个作者很懒,什么都没留下…
展开
-
SPOJ-GSS3 Can you answer these queries III(线段树)
Can you answer these queries III题目链接You are given a sequence A of NNN (N≤50000N \leq 50000N≤50000) integers between −10000-10000−10000 and 100001000010000. On this sequence you have to apply MMM (M≤50000M \leq 50000M≤50000) operations:modify the i-th el原创 2021-07-16 21:33:49 · 79 阅读 · 0 评论 -
Simone and Graph Coloring(思维,线段树,二分)
题目描述链接Simone, a student of Graph Coloring University, is interested in permutation. Now she is given a permutation of length nnn, and she finds that if she connects each inverse pair, she will get a graph. Formally, for the given permutation, if i<ji&原创 2021-09-21 20:05:34 · 180 阅读 · 0 评论 -
Integers Have Friends(线段树,双指针,GCD)
链接British mathematician John Littlewood once said about Indian mathematician Srinivasa Ramanujan that “every positive integer was one of his personal friends.”It turns out that positive integers can also be friends with each other! You are given an array原创 2021-08-13 11:27:18 · 516 阅读 · 0 评论 -
杭电ACM-LCY算法进阶培训班-专题训练(线段树)
杭电ACM-LCY算法进阶培训班-专题训练(线段树)传送门张煊的金箍棒(2)Problem Description张煊的金箍棒升级了!升级后的金箍棒是由几根相同长度的金属棒连接而成(最开始都是铜棒,从1到N编号);张煊作为金箍棒的主人,可以对金箍棒施以任意的变换,每次变换操作就是将一段连续的金属棒(从X到Y编号)改为铜棒,银棒或金棒。金箍棒的总价值计算为N个金属棒的价值总和。其中,每个铜棒价值为1;每个银棒价值为2;每个金棒价值为3。现在,张煊想知道多次执行操作后的金箍棒总价值。Input原创 2021-03-28 09:16:53 · 767 阅读 · 0 评论 -
POJ1151 Atlantis(扫描线、线段树)
AtlantisDescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the island. But unfortunately, these maps describe different regions of Atlantis. Your fri原创 2021-07-18 20:26:49 · 230 阅读 · 0 评论