<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Hrbust_cx的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Hrbust_cx</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Hrbust_cx]]></copyright><item><title><![CDATA[CodeForces 1093G 、HDU 6435（多维最远曼哈顿距离）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/85251906</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/85251906</guid><author>Hrbust_cx</author><pubDate>Tue, 25 Dec 2018 17:54:51 +0800</pubDate><description><![CDATA[
题目链接
https://codeforces.com/contest/1093/problem/G
http://acm.hdu.edu.cn/showproblem.php?pid=6435

解题思路
将K维曼哈顿距离表达式展开：
∑i=1k∣ax,i−ay,i∣=∑i=1kci(ax,i−ay,i)=∑i=1kciax,i−∑i=1kciay,i\sum_{i = 1}^{k}\left...]]></description><category></category></item><item><title><![CDATA[牛客网暑期ACM多校训练营（第九场）- H. Prefix Sum（树状数组维护k阶前缀和）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/82431567</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/82431567</guid><author>Hrbust_cx</author><pubDate>Wed, 05 Sep 2018 22:00:17 +0800</pubDate><description><![CDATA[

题目大意

有 k + 1 个长度为 n 的序列，记作 a[k][n]； 
a[0] 为原始序列，a[i] 为 a[i - 1] 的前缀和，a[k] 即为 a[0] 的 k 阶前缀和，例如： 
 
两种操作： 
1. 0 x y：原始序列单点加，即 a[0][x] += y； 
2. 1 x ：求原始序列k阶前缀和的单点值，即 a[k][x]； 
1 &amp;lt;= n &amp;lt;= 1e5， 1 ...]]></description><category></category></item><item><title><![CDATA[牛客网暑期ACM多校训练营（第六场）- I. Team Rocket（线段树）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/81434104</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/81434104</guid><author>Hrbust_cx</author><pubDate>Thu, 30 Aug 2018 18:24:35 +0800</pubDate><description><![CDATA[



题目大意

有 n 列左端点为 l ，右端点为 r 的火车，m 次操作，每次给出一个点 x ，炸掉所有 l &amp;amp;amp;lt;= x &amp;amp;amp;lt;= r 的火车，问每次炸掉的火车数和每列火车第一次被炸的时间（强制在线）。

1 &amp;amp;amp;lt;= n, m &amp;amp;amp;lt;= 2e5 
-1e9 &amp;amp;amp;lt;= l &amp;amp;amp;lt;= r &amp;amp;amp;lt;= 1e9 
-1e9 &a]]></description><category></category></item><item><title><![CDATA[Codeforces 923C - Perfect Security（01字典树，最小异或）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/80957990</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/80957990</guid><author>Hrbust_cx</author><pubDate>Sun, 08 Jul 2018 11:40:49 +0800</pubDate><description><![CDATA[

题目链接&amp;amp;amp;&amp;amp;amp;题目大意

http://codeforces.com/contest/923/problem/C

For given AAA and PPP, find the lexicographically smallest message OOO, for which there exists a permutation πππ such that  OiOiOi XO...]]></description><category></category></item><item><title><![CDATA[HRBUST 2386 - 霍冰阔落（主席树）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/80822929</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/80822929</guid><author>Hrbust_cx</author><pubDate>Wed, 27 Jun 2018 00:14:57 +0800</pubDate><description><![CDATA[Description

给出一棵规模为n的有根树代表族谱，1是祖先。对于每个人，我们都知道他的父母是几号。当然除了1。。我们假设1是直接进化来的。。

当然以树为表示的族谱不是生物遗传的那样的，每个点的父亲就是他这个人的父亲，他的所有儿子节点全都是他的孩子。不要纠结男女的问题。。

如果有一天，一个人突然突发奇想，想知道自己的第x代的后代到第y代的后代一共有多少人怎么办QAQ，编程解决这个问题把...]]></description><category></category></item><item><title><![CDATA[HRBUST 2388 - 千方残光剑（尺取法 + 权值线段树）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/80814206</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/80814206</guid><author>Hrbust_cx</author><pubDate>Tue, 26 Jun 2018 13:57:37 +0800</pubDate><description><![CDATA[Description

有n个怪物排成一排，他们的生命值各不相同，asuka有一个叫做“千方残光剑”的技能，可以先秒杀掉y个怪物，然后对任意个怪物造成总量小于等于x点的伤害，但是如果不打死怪物就不会有经验，而asuka又有强迫症，他想保证自己最后杀掉的怪物是相邻的(是一整段的)，那么释放一次技能最多能杀死多少个怪物呢？

Input

第一行输入一个t，t&amp;amp;amp;amp;lt;=5代表数据组数。

对于每一组...]]></description><category></category></item><item><title><![CDATA[2018CCPC黑龙江省赛 - D.A Sequence Game（莫队算法/可持久化线段树）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/80522500</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/80522500</guid><author>Hrbust_cx</author><pubDate>Thu, 31 May 2018 12:54:06 +0800</pubDate><description><![CDATA[题目大意

询问从区间最小值到区间最大值之间的每个数是否至少出现一次。



解题分析

拆成两个问题： 
1.区间最大（最小）值：ST表； 
2.区间种类数： 莫队算法/可持久化线段树； 
若区间最大值 - 区间最小值 + 1 == 区间种类数，YES，否则为NO。 



1.莫队算法 - O（n*sqrt(n)）



#include&amp;amp;lt;cstdio&amp;amp;gt;
#include&amp;amp;lt;c...]]></description><category></category></item><item><title><![CDATA[Codeforces 976D - Resource Distribution（贪心 + 二分）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/80183656</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/80183656</guid><author>Hrbust_cx</author><pubDate>Thu, 03 May 2018 17:41:19 +0800</pubDate><description><![CDATA[



题目链接

http://codeforces.com/contest/967/problem/D





题目大意

能否用n个服务器同时为两个任务分配资源。 
用k个服务器分配任务量为S的任务时，占用每个服务器S/k1的资源。 
每个服务器只能分配到一个任务。





解题思路

降维，优先将大额服务器分配给一个任务，再枚举另一个任务需要的服务器数。

比如，优先将k1个大额的服务...]]></description><category></category></item><item><title><![CDATA[Codeforces 948C - Producing Snow （树状数组）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/79521838</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/79521838</guid><author>Hrbust_cx</author><pubDate>Sun, 11 Mar 2018 23:28:21 +0800</pubDate><description><![CDATA[题目链接

http://codeforces.com/contest/948/problem/C

刚讲完树状数组的第一场cf就遇到了，然而没做出来，次日怒补之，同时写篇题解自省。



题目大意

每天新造一堆体积为v[i]的雪，同时所有的雪堆都融化t[i]的体积，体积&amp;lt;=0时雪堆消失，问每天融掉的雪的总体积。





解题分析

令num[i]为第i天的剩余雪堆数，rem[i]为将在...]]></description><category></category></item><item><title><![CDATA[Codeforces 900C - Remove Extra One（思维好题）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78992253</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78992253</guid><author>Hrbust_cx</author><pubDate>Sat, 06 Jan 2018 22:50:02 +0800</pubDate><description><![CDATA[Remove Extra One 
time limit per test2 seconds 
memory limit per test256 megabytes 
inputstandard input 
outputstandard output

You are given a permutation ppp of length nnn. Remove one element from p...]]></description><category></category></item><item><title><![CDATA[CodeForces 627A : XOR Equation（位运算性质）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78619256</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78619256</guid><author>Hrbust_cx</author><pubDate>Fri, 24 Nov 2017 09:06:22 +0800</pubDate><description><![CDATA[time limit per test2 seconds 
memory limit per test256 megabytes 
input standard input 
output standard output



Two positive integers a and b have a sum of s and a bitwise XOR of x. How many possibl...]]></description><category></category></item><item><title><![CDATA[中国大学MOOC-陈越、何钦铭-数据结构：06-图3 六度空间（链式前向星、BFS）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78266796</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78266796</guid><author>Hrbust_cx</author><pubDate>Tue, 17 Oct 2017 21:43:49 +0800</pubDate><description><![CDATA[作者: DS课程组 
单位: 浙江大学 
时间限制: 2500ms 
内存限制: 64MB 
代码长度限制: 16KB描述“六度空间”理论又称作“六度分隔（Six Degrees of Separation）”理论。这个理论可以通俗地阐述为：“你和任何一个陌生人之间所间隔的人不会超过六个，也就是说，最多通过五个人你就能够认识任何一个陌生人。”如下图所示。“六度空间”理论虽然得到广泛的认同，并且正在得]]></description><category></category></item><item><title><![CDATA[POJ3190：Stall Reservations（贪心）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78175117</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78175117</guid><author>Hrbust_cx</author><pubDate>Sun, 08 Oct 2017 15:11:33 +0800</pubDate><description><![CDATA[Time Limit: 1000MS 
Memory Limit: 65536K 
Special JudgeDescriptionOh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise time interval A..B (1 <]]></description><category></category></item><item><title><![CDATA[POJ3083：Children of the Candy Corn（DFS、BFS）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78172522</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78172522</guid><author>Hrbust_cx</author><pubDate>Sat, 07 Oct 2017 23:34:07 +0800</pubDate><description><![CDATA[Time Limit: 1000MS 
Memory Limit: 65536KDescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the maze facing zombies, chainsaw-wielding ps]]></description><category></category></item><item><title><![CDATA[POJ2488：A Knight's Journey（DFS）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78156874</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78156874</guid><author>Hrbust_cx</author><pubDate>Tue, 03 Oct 2017 23:37:31 +0800</pubDate><description><![CDATA[Time Limit: 1000MS 
Memory Limit: 65536KDescriptionBackgroundThe knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. W]]></description><category></category></item><item><title><![CDATA[POJ1753：Flip Game（BFS、枚举、位运算）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78153116</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78153116</guid><author>Hrbust_cx</author><pubDate>Mon, 02 Oct 2017 23:02:30 +0800</pubDate><description><![CDATA[Time Limit: 1000MS 
Memory Limit: 65536KDescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other o]]></description><category></category></item><item><title><![CDATA[程序设计与算法（二）测验汇总011：最佳加法表达式（DP、高精度）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78077770</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78077770</guid><author>Hrbust_cx</author><pubDate>Sun, 24 Sep 2017 16:44:07 +0800</pubDate><description><![CDATA[总时间限制: 1000ms 内存限制: 65536kB描述给定n个1到9的数字，要求在数字之间摆放m个加号(加号两边必须有数字），使得所得到的加法表达式的值最小，并输出该值。例如，在1234中摆放1个加号，最好的摆法就是12+34,和为36输入有不超过15组数据 
每组数据两行。第一行是整数m，表示有m个加号要放( 0<=m<=50) 
第二行是若干个数字。数字总数n不超过50,且 m <= n-1]]></description><category></category></item><item><title><![CDATA[百练2787：算24（递归）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78061795</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78061795</guid><author>Hrbust_cx</author><pubDate>Fri, 22 Sep 2017 13:06:03 +0800</pubDate><description><![CDATA[总时间限制: 3000ms 内存限制: 65536kB描述给出4个小于10的正整数，你可以使用加减乘除4种运算以及括号把这4个数连接起来得到一个表达式。现在的问题是，是否存在一种方式使得得到的表达式的结果等于24。这里加减乘除以及括号的运算结果和运算的优先级跟我们平常的定义一致（这里的除法定义是实数除法）。比如，对于5，5，5，1，我们知道5 * (5 – 1 / 5) = 24，因此可以得到24。]]></description><category></category></item><item><title><![CDATA[百练2811：熄灯问题（枚举、位运算）]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78061592</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78061592</guid><author>Hrbust_cx</author><pubDate>Fri, 22 Sep 2017 12:16:49 +0800</pubDate><description><![CDATA[总时间限制: 1000ms 内存限制: 65536kB描述有一个由按钮组成的矩阵，其中每行有6个按钮，共5行。每个按钮的位置上有一盏灯。当按下一个按钮后，该按钮以及周围位置(上边、下边、左边、右边)的灯都会改变一次。即，如果灯原来是点亮的，就会被熄灭；如果灯原来是熄灭的，则会被点亮。在矩阵角上的按钮改变3盏灯的状态；在矩阵边上的按钮改变4盏灯的状态；其他的按钮改变5盏灯的状态。在上图中，左边矩阵中用]]></description><category></category></item><item><title><![CDATA[位运算]]></title><link>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78059599</link><guid>https://blog.youkuaiyun.com/Hrbust_cx/article/details/78059599</guid><author>Hrbust_cx</author><pubDate>Fri, 22 Sep 2017 09:46:23 +0800</pubDate><description><![CDATA[进制转换提到位运算，不得不说的是进制的概念。我们在日常生活中使用的往往是十进制，但是在计算机中却是以二进制存储信息。同样常用的有八进制和十六进制。如何进行进制转换呢？ 
首先是从十进制转换成N进制：对这个十进制数进行mod(N)运算直到结果为0，再将得到的模数反过来输出就是结果。 
例如，将十进制的6转换成二进制，6%2=0(6/2=3)，3%2=1(3/2=1)，1%2=1(1/2=0)，逆序输出]]></description><category></category></item></channel></rss>