
ACM--线段树
布呗之路
每个人都有不同的路,所以每个人都会孤独。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU 6315 Naive Operations
/** G :Naive Operations 链接:http://acm.hdu.edu.cn/showproblem.php?pid=6315 题意:给出一个长度为n初值为0的a数组,以及长度为n的b数组; 接下来q次操作,add(l,r) 使得数组a区间l~r所有元素+1,或者查询l~r区间a[i]/b[i]的和 思路:维护区间的a的最大值和b的最小值,使用lazy标记就不需要更新到每个...原创 2018-08-18 13:17:10 · 333 阅读 · 0 评论 -
POJ - 3468 ZKW 线段树 区间更新+区间求和;
POJ-3468 A Simple Problem with Integers /** POJ - 3468 ZKW 线段树 区间更新+区间求和; */ #include<iostream> #include<algorithm> #include<cstdio> #include<string> #include<map> ...原创 2019-01-24 15:02:20 · 501 阅读 · 1 评论 -
HDU 1166 敌兵布阵
#include <bits/stdc++.h> #define ll long long #define all(x) (x).begin(),(x).end() using namespace std; void scan() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("...原创 2019-08-20 16:11:57 · 192 阅读 · 0 评论 -
HDU 1754 I Hate It
#include <bits/stdc++.h> #define ll long long #define all(x) (x).begin(),(x).end() using namespace std; void scan() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("...原创 2019-08-20 16:23:44 · 192 阅读 · 0 评论 -
HDU 1698 Just a Hook
#include <bits/stdc++.h> #define ll long long #define all(x) (x).begin(),(x).end() using namespace std; void scan() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("...原创 2019-08-20 18:35:15 · 175 阅读 · 0 评论 -
POJ - 3468 A Simple Problem with Integers
题目链接:A Simple Problem with Integers #include <iostream> #include <algorithm> #include <map> #include <stack> #include <queue> #include <set> #include <vector&g...原创 2019-08-20 22:15:51 · 184 阅读 · 0 评论 -
HDU - 4027 Can you answer these queries?
题目链接:Can you answer these queries? #include <iostream> #include <algorithm> #include <map> #include <stack> #include <queue> #include <set> #include <vector&g...原创 2019-08-20 22:41:25 · 208 阅读 · 0 评论 -
HDU - 5306 Gorgeous Sequence
题目链接:Gorgeous Sequence /** * 维护区间最大值,及其个数,再记录一个次大值。 * 感谢jry_2..的论文 * */ #include <bits/stdc++.h> #define ll long long using namespace std; void scan() { #ifndef ONLINE_JUDGE freop...原创 2019-08-21 18:07:29 · 234 阅读 · 0 评论