<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[macesuted的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/macesuted</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; macesuted]]></copyright><item><title><![CDATA[Luogu P6187 [NOI Online 提高组]最小环]]></title><link>https://blog.csdn.net/macesuted/article/details/104732831</link><guid>https://blog.csdn.net/macesuted/article/details/104732831</guid><author>macesuted</author><pubDate>Sun, 08 Mar 2020 14:47:56 +0800</pubDate><description><![CDATA[题面
对于题面我们很容易发现，我们可以将n个数分成若干个长度相同的环。
通过样例我们就可以发现，对于每个环，我会把最大的数都放在里面，我会在最大的边上放次大的和更次大的。
如果你无法理解，我们看样例解释
样例1中给出的是1 2 3 4 5 6这几个数
k=1
我们的方案是{3,1,2,4,6,5}\{3,1,2,4,6,5\}{3,1,2,4,6,5}，我们能看见，在最大的6左边放了5，右边放了4...]]></description><category></category></item><item><title><![CDATA[Luogu P6186 [NOI Online 提高组]冒泡排序]]></title><link>https://blog.csdn.net/macesuted/article/details/104732773</link><guid>https://blog.csdn.net/macesuted/article/details/104732773</guid><author>macesuted</author><pubDate>Sun, 08 Mar 2020 14:46:01 +0800</pubDate><description><![CDATA[题面
大意就是给定一个序列，对其进行两个操作，交换相邻的两个数，或者对全序列进行一遍冒泡排序。
观察题面可以发现

当ti=1时我们需要交换相邻的两个数
当ti=2时我们需要对全序列进行冒泡排序

由于数据量极大，显然暴力的模拟一定不行
我们记录第i位数前面比它大的数的数量为before[i]before[i]before[i]，显然，当前序列的总逆序对数量就是所有的beforebeforebef...]]></description><category></category></item><item><title><![CDATA[博客索引]]></title><link>https://blog.csdn.net/macesuted/article/details/104072617</link><guid>https://blog.csdn.net/macesuted/article/details/104072617</guid><author>macesuted</author><pubDate>Wed, 22 Jan 2020 21:03:21 +0800</pubDate><description><![CDATA[算法

Trie

题解
NOI/NOI+/CTSC

Luogu P2482 [SDOI2010]猪国杀(题解已被Luogu采纳)

提高+/省选-

CF1181B Split a Number(题解已被Luogu采纳)
Luogu P2014 选课(题解已被Luogu采纳)
Luogu P2278 [HNOI2003]操作系统(题解已被Luogu采纳)

入门

P5735 距离函数(题解已...]]></description><category></category></item><item><title><![CDATA[Luogu P2482 Code]]></title><link>https://blog.csdn.net/macesuted/article/details/104072611</link><guid>https://blog.csdn.net/macesuted/article/details/104072611</guid><author>macesuted</author><pubDate>Wed, 22 Jan 2020 21:02:41 +0800</pubDate><description><![CDATA[P2482
#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;vector&gt;
#include &lt;cstdlib&gt;

using std::cout;
using std::endl;
using std::cin;
using std::ios;

#define CANNOT_USE_THIS_CA...]]></description><category></category></item><item><title><![CDATA[Luogu P2278 Code]]></title><link>https://blog.csdn.net/macesuted/article/details/104072607</link><guid>https://blog.csdn.net/macesuted/article/details/104072607</guid><author>macesuted</author><pubDate>Wed, 22 Jan 2020 21:02:10 +0800</pubDate><description><![CDATA[P2278
#include &lt;cstdio&gt;
#include &lt;queue&gt;

struct task
{
	int number;
	int need;
	int get;
	int grade;
	inline bool operator &lt; (const task &amp;b) const
	{
		return this-&gt;grade&lt;b.g...]]></description><category></category></item><item><title><![CDATA[Luogu P2014 Code]]></title><link>https://blog.csdn.net/macesuted/article/details/104072605</link><guid>https://blog.csdn.net/macesuted/article/details/104072605</guid><author>macesuted</author><pubDate>Wed, 22 Jan 2020 21:01:32 +0800</pubDate><description><![CDATA[P2014
#include &lt;bits/stdc++.h&gt;
using namespace std;

vector&lt;vector&lt;int&gt; &gt; graph;
vector&lt;int&gt; cost;
int n,m;

int f[2005][2005];

int dfs(int node)
{
	int sum=0;
	f[node][1]=cos...]]></description><category></category></item><item><title><![CDATA[Luogu P5735 距离函数]]></title><link>https://blog.csdn.net/macesuted/article/details/104072574</link><guid>https://blog.csdn.net/macesuted/article/details/104072574</guid><author>macesuted</author><pubDate>Wed, 22 Jan 2020 20:57:51 +0800</pubDate><description><![CDATA[题面
这只是道水水的入门题。
平面直角坐标系中两点间距离为
dis=(x1−x2)2+(y1−y2)2dis=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}dis=(x1​−x2​)2+(y1​−y2​)2​
所以三角形的周长就是
C=(x1−x2)2+(y1−y2)2+(x1−x3)2+(y1−y3)2+(x2−x3)2+(y2−y3)2C=\sqrt{(x_1-x_2)^2+(y...]]></description><category></category></item><item><title><![CDATA[Luogu P2278 [HNOI2003]操作系统]]></title><link>https://blog.csdn.net/macesuted/article/details/104072568</link><guid>https://blog.csdn.net/macesuted/article/details/104072568</guid><author>macesuted</author><pubDate>Wed, 22 Jan 2020 20:57:21 +0800</pubDate><description><![CDATA[题面
原来是道大水题，但是它的题面有点意思，于是我就手残把它加进了解题计划中。
题面描述
对于操作系统，我们只拥有一个CPU，只能同时处理一个任务。现在有很多任务需要操作系统解决，它们将按照产生时间输入。
每个任务都需要一定时间完成，并且每个任务都有一个优先级和产生时间。当它们产生时，如果CPU空闲，那么会直接处理这个任务，如果CPU忙碌但当前正在执行的任务的优先级没有它高，会中断当前任务的执行，...]]></description><category></category></item><item><title><![CDATA[Luogu P2014 选课]]></title><link>https://blog.csdn.net/macesuted/article/details/104072566</link><guid>https://blog.csdn.net/macesuted/article/details/104072566</guid><author>macesuted</author><pubDate>Wed, 22 Jan 2020 20:56:51 +0800</pubDate><description><![CDATA[题面
对于这道题，我们考虑在树形dp上套背包。我们会非常自然的采用dfs扫描整棵树，然后对树上的每个节点都进行一次背包。
计dp[i][j]dp[i][j]dp[i][j]为在以第iii号节点为根结点的子树中，用题目中选法选取jjj项的最大值。
我们在dfs的过程中，采用递归的方式，在子节点都处理完之后，便考虑将所有子节点的答案综合，得到当前节点的答案。
很显然，就是在容量为jjj的01背包中放下...]]></description><category></category></item><item><title><![CDATA[CF1181B Split a Number]]></title><link>https://blog.csdn.net/macesuted/article/details/104072518</link><guid>https://blog.csdn.net/macesuted/article/details/104072518</guid><author>macesuted</author><pubDate>Wed, 22 Jan 2020 20:51:53 +0800</pubDate><description><![CDATA[题面
主要思想
很明显，题面就是让你将一串数割开，使得隔开后的两数总和最小。
稍微分析一下后我们会想到：对于这里隔开后的两个数，他们的总位数一定，显然他们的位数越相近，总和就有机会越小。所以我们尝试从这串数的正中央着手割开，使用高精度进行操作。
我们从这串数的最中央开始分割，先尝试向左移动，找到该过程中第一个符合题意要求的方案，记录结果。然后再尝试向右移动，再找到该过程中第一个符合题意要求的方案，...]]></description><category></category></item><item><title><![CDATA[Luogu P2482 [SDOI2010]猪国杀]]></title><link>https://blog.csdn.net/macesuted/article/details/104072509</link><guid>https://blog.csdn.net/macesuted/article/details/104072509</guid><author>macesuted</author><pubDate>Wed, 22 Jan 2020 20:51:23 +0800</pubDate><description><![CDATA[Pig Country Kill
很古怪的翻译，不过它确实叫猪(Pig)国(Country)杀(Kill)。
我们来好好整理一下这道题目。题面虽较长，但内容基本清晰，只是有部分很Pig的操作部分，很容易让第一次看见这道题目的人百思不得其解。
先整理一下这道长长的题面。

First：人物
四位玩家，初始四张手牌，血量上限444，初始血量444，会告诉你整个牌堆的牌，每位玩家每个回合从牌堆顶部抽走两...]]></description><category></category></item><item><title><![CDATA[Trie]]></title><link>https://blog.csdn.net/macesuted/article/details/104072483</link><guid>https://blog.csdn.net/macesuted/article/details/104072483</guid><author>macesuted</author><pubDate>Wed, 22 Jan 2020 20:48:44 +0800</pubDate><description><![CDATA[不需要前置技能。
是AC自动机的前置技能。


Trie，又称单词查找树，Trie树，是一种树形结构，是一种哈希树的变种。典型应
用是用于统计，排序和保存大量的字符串（但不仅限于字符串），所以经常被搜索
引擎系统用于文本词频统计。它的优点是：利用字符串的公共前缀来减少查询时
间，最大限度地减少无谓的字符串比较，查询效率比哈希树高。	——百度百科


Trie树是一种性能优异的哈希树，是一种常用的树...]]></description><category></category></item></channel></rss>