
分块
文章平均质量分 74
elijahqi
这个作者很懒,什么都没留下…
展开
-
bzoj2002 [Hnoi2010]Bounce 弹飞绵羊
http://www.elijahqi.win/2018/02/12/bzoj2002/ Description某天,Lostmonkey发明了一种超级弹力装置,为了在他的绵羊朋友面前显摆,他邀请小绵羊一起玩个游戏。游戏一开始,Lostmonkey在地上沿着一条直线摆上n个装置,每个装置设定初始弹力系数ki,当绵羊达到第i个装置时,它会往后弹ki步,达到第i+ki个装置,若不存在第i+k...原创 2018-02-12 02:36:32 · 650 阅读 · 0 评论 -
bzoj 1086 [SCOI2005]王室联邦
http://www.elijahqi.win/archives/3440 Description “余”人国的国王想重新编制他的国家。他想把他的国家划分成若干个省,每个省都由他们王室联邦的一个成 员来管理。他的国家有n个城市,编号为1..n。一些城市之间有道路相连,任意两个不同的城市之间有且仅有一条 直接或间接的道路。为了防止管理太过分散,每个省至少要有B个城市,为了能有效的管理,每...原创 2018-05-22 14:41:33 · 260 阅读 · 0 评论 -
bzoj3236 [Ahoi2013]作业
http://www.elijahqi.win/archives/3158 题目描述此时己是凌晨两点,刚刚做了Codeforces的小A掏出了英语试卷。英语作业其实不算多,一个小时刚好可以做完。然后是一个小时可以做完的数学作业,接下来是分别都是一个小时可以做完的化学,物理,语文……小A压力巨大。这是小A碰见了一道非常恶心的数学题,给定了一个长度为n的数列和若干个询问,每个询问是关于数列的...原创 2018-04-22 10:32:39 · 209 阅读 · 0 评论 -
bzoj3834 [Poi2014]Solar Panels
http://www.elijahqi.win/archives/2956 DescriptionHaving decided to invest in renewable energy, Byteasar started a solar panels factory. It appears that he has hit the gold as within a few days cl...原创 2018-04-07 23:24:33 · 184 阅读 · 0 评论 -
BJ 集训测试8 Problem C 插线板
http://www.elijahqi.win/archives/2762 题意:1~n号插线板 每个插线板有一个存在的时间每个人有一个使用时间 问插在哪个插线板可以挪动次数最少 每次一个插线板的插入和取走都只会对他后面的一个产生影响将每个人的操作拆成两个 然后预处理succ表示我操作这个之后会对后面的哪个插线板产生挪动次数的贡献然后分块 表示这段时间之前到所有点的区间挪动最优值处理出...原创 2018-03-22 16:51:06 · 248 阅读 · 0 评论 -
loj 6284 数列分块入门 8
http://www.elijahqi.win/2018/03/05/loj-6284/ 题目描述给出一个长为 nnn 的数列,以及 nnn 个操作,操作涉及区间询问等于一个数 ccc 的元素,并将这个区间的所有元素改为 ccc。输入格式第一行输入一个数字 nnn。第二行输入 nnn 个数字,第 i 个数字为 aia_iai,以空格隔开。接下来输入 nnn 行询问,每...原创 2018-03-05 20:35:48 · 282 阅读 · 0 评论 -
codeforces 342E Xenia and Tree
http://www.elijahqi.win/2018/03/04/codeforces-342e-xenia-and-tree/ 题目描述Xenia the programmer has a tree consisting ofn n nodes. We will consider the tree nodes indexed from 1 ton n . We will ...原创 2018-03-04 09:52:08 · 345 阅读 · 0 评论 -
codeforces 103D Time to Raid Cowavans
http://www.elijahqi.win/2018/03/02/codeforces-103d/ 题目描述As you know, the most intelligent beings on the Earth are, of course, cows. This conclusion was reached long ago by the Martian aliens, as...原创 2018-03-02 14:03:31 · 345 阅读 · 0 评论 -
codeforces 348C Subset Sums
http://www.elijahqi.win/2018/03/02/codeforces-348c-subset-sums/ You are given an array a1, a2, …, an and m sets S1, S2, …, Sm of indices of elements of this array. Let’s denote Sk = {Sk, i} (1 ≤ i ≤...原创 2018-03-02 11:17:36 · 268 阅读 · 0 评论 -
bzoj3343 教主的魔法
http://www.elijahqi.win/2018/03/02/bzoj3343/ Description教主最近学会了一种神奇的魔法,能够使人长高。于是他准备演示给XMYZ信息组每个英雄看。于是N个英雄们又一次聚集在了一起,这次他们排成了一列,被编号为1、2、……、N。 每个人的身高一开始都是不超过1000的正整数。教主的魔法每次可以把闭区间[L, R](1≤L≤R≤N)内的英雄的...原创 2018-03-02 08:33:18 · 146 阅读 · 0 评论 -
codeforces 785E Anton and Permutation
http://www.elijahqi.win/2018/03/02/codeforces-785e/ Anton likes permutations, especially he likes to permute their elements. Note that a permutation of n elements is a sequence of numbers {a1, a2, …...原创 2018-03-02 08:30:25 · 287 阅读 · 0 评论 -
codeforces 13E holes
http://www.elijahqi.win/2018/03/02/codeforces-13e-holes/ 题意翻译 有N个洞,每个洞有相应的弹力,能把这个球弹到i+power[i] 位置。当球的位置>N时即视为被弹出 输入: 第一行两个正整数N,M,下面N个数代表初始的power[i] 之后M行分别代表M个操作 共有两种操作: 0 a b 把a位置的弹力改成b 1 a 在a处...原创 2018-03-01 23:53:54 · 337 阅读 · 0 评论 -
codeforces 455D Serega and Fun
http://www.elijahqi.win/2018/03/02/codeforces-455d/ Serega loves fun. However, everyone has fun in the unique manner. Serega has fun by solving query problems. One day Fedor came up with such a prob...原创 2018-03-01 23:48:16 · 6000 阅读 · 0 评论 -
bzoj3809 Gty的二逼妹子序列
http://www.elijahqi.win/2018/03/01/bzoj3809/ DescriptionAutumn和Bakser又在研究Gty的妹子序列了!但他们遇到了一个难题。对于一段妹子们,他们想让你帮忙求出这之内美丽度∈[a,b]的妹子的美丽度的种类数。为了方便,我们规定妹子们的美丽度全都在[1,n]中。给定一个长度为n(1<=n<=100000)的正...原创 2018-03-01 11:33:06 · 261 阅读 · 0 评论 -
codeforces 576C Points on Plane
http://www.elijahqi.win/2018/03/08/codeforces-576c-points-on-plane 题目描述On a plane arenn points (x_{i}xi ,y_{i}yi ) with integer coordinates between00 and10^{6}106 . The dista...原创 2018-03-08 22:35:35 · 491 阅读 · 0 评论 -
codeforces 616E Sum of Remainders
http://www.elijahqi.win/2018/03/08/codeforces-616e/ 题目描述Calculate the value of the sum:nn mod11 +nn mod22 +nn mod33 + … +nn modmm . As the result can be very larg...原创 2018-03-08 16:26:39 · 198 阅读 · 0 评论 -
codeforces 436F Banners
http://www.elijahqi.win/2018/03/07/codeforces-436f-banners/ All modern mobile applications are divided into free and paid. Even a single application developers often release two versions: a paid ver...原创 2018-03-07 19:01:37 · 288 阅读 · 0 评论 -
bzoj 4765 普通计算姬
http://www.elijahqi.win/archives/3696 Description “奋战三星期,造台计算机”。小G响应号召,花了三小时造了台普通计算姬。普通计算姬比普通计算机要厉害一些 。普通计算机能计算数列区间和,而普通计算姬能计算树中子树和。更具体地,小G的计算姬可以解决这么个问题 :给定一棵n个节点的带权树,节点编号为1到n,以root为根,设sum[p]表示以点...原创 2018-06-14 09:35:23 · 263 阅读 · 0 评论