随笔分类 - 数据结构-线段树
摘要:题目连接http://poj.org/problem?id=2777Count ColorDescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3530SubsequenceDescriptionThere is a sequence of integers. Your task is to find the longest subsequence ...
阅读全文
摘要:题目连接http://poj.org/problem?id=2299Ultra-QuickSortDescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm process...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1556Color the ballDescription$N$个气球排成一排,从左到右依次编号为$1,2,3....N.$每次给定2个整数$a\ b(a \leq b)$,lele便为骑上他的“小飞鸽"牌电...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1698Just a HookDescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4027Can you answer these queries?DescriptionProblem DescriptionA lot of battleships of evil are arranged...
阅读全文
摘要:题目连接http://poj.org/problem?id=2823Sliding WindowDescriptionAn array of sizen≤ 106is given to you. There is a sliding window of sizekwhich is moving fr...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3074Minimum Inversion NumberDescriptionTired of playing computer games, alpc23 is planning to play a gam...
阅读全文
摘要:原题链接:http://ac.jobdu.com/problem.php?pid=1407线段树,区间更新,查询区间最小值。注意区间更新,查询的时候,区间$\begin{align*}[L,R] \end{align*}$$\begin{align*}L \end{align*}$都可能大于$\be...
阅读全文
摘要:原题链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1798线段树区间更新: 1. 区间同同时加上一个数 2. 区间同时乘以一个数 1 #include 2 #include 3 #include 4 #include 5 #define lc ...
阅读全文
摘要:原题链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1012线段树,单点更新。。 1 #include 2 #include 3 #include 4 #include 5 #define lc root r || pos = r) {20 ...
阅读全文
摘要:原题链接:http://ac.jobdu.com/problem.php?pid=1544RMQ线段树。。。如下: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using std::min; 7 const int Max_N =...
阅读全文

浙公网安备 33010602011771号