码迷,mamicode.com
首页 >  
搜索关键字:poj3468    ( 72个结果
POJ3468
POJ3468 题目链接 POJ3468 题目概述 给出一个包含有$N$个元素的数组$a$,然后是$m$次操作,操作有以下两种类型: Q x y($x \leq y)\(计算\)\sum_^y a[i]$ C x y d$(x \leq y)\(将区间\)[x,y]$内部的每一个$a[i]$加上$d ...
分类:其他好文   时间:2020-08-05 19:43:49    阅读次数:75
A Simple Problem with Integers-POJ3468
题意: 给你n个数和2个操作,C操作是将一个区间内的每个数都加上k,Q操作是询问一个区间的和 链接:http://poj.org/problem?id=3468 思路: 线段树区间修改+区间查询 代码: #include <iostream> #include <stdio.h> #include ...
分类:其他好文   时间:2020-01-21 20:09:42    阅读次数:82
线段树模板
https://oi wiki.org/ds/seg/ poj3468 区间增减值,区间和。 线段树思想:利用二叉树将每一个区间所需要的值都记录下来。 lazy思想:延迟对叶子节点的修改,要用到的时候才真的去修改,lazy数组记录修改的值。 ...
分类:其他好文   时间:2019-11-27 00:35:48    阅读次数:61
POJ3468 A Simple Problem with Integers 分块
POJ3468 A Simple Problem with Integers ...
分类:其他好文   时间:2019-10-26 22:33:52    阅读次数:93
线段树模板加模板题POJ3468
POJ - 3468 整理了个新的线段树的模板,暑期集训的时候学长给的模板,每个节点单单存了自己所要维护的内容,还是少了点。导致在写pushdown的时候,len我会有点难写。所以就整理个新的模板。 每个节点还存了l,r,lazy,len,写起来思路清晰多了。 #include<iostream> ...
分类:其他好文   时间:2019-10-06 22:09:50    阅读次数:93
POJ3468 a simple problem with integers 分块
题解:分块 解题报告: 是个板子题呢qwq 先占坑,今天会写,over ...
分类:其他好文   时间:2018-11-24 15:43:06    阅读次数:208
简单线段树
一、单点更新 hdu1166区间和 二、区间更新 POJ3468区间和,Lazy标记只有当操作到该节点时才将标价下放; 三、线段树+离散化 poj2528 离散化:有些数据本身很大, 自身无法作为数组的下标保存对应的属性。如果这时只是需要这堆数据的相对属性, 那么可以对其进行离散化处理。当数据只与它 ...
分类:其他好文   时间:2018-09-18 14:55:09    阅读次数:222
A Simple Problem with Integers
"来源poj3468" You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to ...
分类:其他好文   时间:2018-09-16 21:07:37    阅读次数:178
poj3468 A Simple Problem with Integers (树状数组做法)
题目传送门 A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 142198 Accepted: 44136 Case Time Limit: 2000MS Descri ...
分类:编程语言   时间:2018-08-30 13:18:35    阅读次数:236
POJ3468 A Simple Problem with Interger [树状数组,差分]
题目传送门 A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 130735 Accepted: 40585 Case Time Limit: 2000MS Descri ...
分类:编程语言   时间:2018-05-17 20:38:12    阅读次数:209
72条   1 2 3 4 ... 8 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!