![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
陈一Kristian
这个作者很懒,什么都没留下…
展开
-
线段树poj3468
Description You haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to...原创 2019-01-16 18:10:40 · 122 阅读 · 0 评论 -
几道关于逆序对、归并排序的题目(有点线段树 的意思)
1、合并有序数组:给定两个排序后的数组A和B,其中A末端有足够的缓冲区间容纳B,编写方法,将B合并入a的排序 思路1: 从前往后构造数组,拿array2中的最前面的元素跟array1中的最前面的元素比较,找到正确的排序 以后插入,然后把array1后面的元素都向后移一位。 时间复杂度太高。 思路2: 新构造一个空数组array3,那array2中的最前面的元素跟array1中的最前面的元素比较,然...原创 2019-04-24 11:46:00 · 122 阅读 · 0 评论 -
线段树裸题hdu1166 敌兵布阵(可做板子)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1166 原来的我的代码,空指针异常, import java.util.Scanner; class test6{ static int T; static int N; static int x = 1; static int a[] = new int[50001]...转载 2019-05-05 09:56:53 · 115 阅读 · 0 评论