<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Annmike的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Annmike</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Annmike]]></copyright><item><title><![CDATA[Codeforces Round #529  (Div. 3)]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/87446406</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/87446406</guid><author>Annmike</author><pubDate>Sat, 16 Feb 2019 15:31:54 +0800</pubDate><description><![CDATA[https://codeforces.com/contest/1095/problem/A

题意：给定一个长度为n的加密过的字符串，找到他的原来的序列，加密的过程就是第一个字符输出一个，第二个字符输出两个，第三个输出三个，依次；

思路：设置一个标志位每次递增，输出相应的字符。


#include&amp;lt;bits/stdc++.h&amp;gt;
int main()
{
    int n;
   ...]]></description><category></category></item><item><title><![CDATA[Codeforces Round #536 (Div. 2)]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/87433354</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/87433354</guid><author>Annmike</author><pubDate>Sat, 16 Feb 2019 13:24:17 +0800</pubDate><description><![CDATA[https://codeforces.com/contest/1106/problem/A

题意：给定一个n*n的字符串，看能由x组成几个 “X”。

思路：直接遍历一遍，然后将能够组成的X的找出来


#include&amp;lt;bits/stdc++.h&amp;gt;
#define ll long long
using namespace std;

int main()
{
    char ch...]]></description><category></category></item><item><title><![CDATA[Codeforces Round #531 (Div. 3)]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/86715118</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/86715118</guid><author>Annmike</author><pubDate>Sat, 02 Feb 2019 21:22:28 +0800</pubDate><description><![CDATA[https://codeforces.com/contest/1102/problem/A

题意：给定一个数n，将1-n分成两组，使得两组数的差值最小，输出最小差值。

思路：根据推理发现，随着n的增大，是有规律出现的，跟4的倍数有关系。


#include&amp;lt;bits/stdc++.h&amp;gt;
#include&amp;lt;iostream&amp;gt;
using namespace std;
#...]]></description><category></category></item><item><title><![CDATA[Codeforces Round #535 (Div. 3）]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/86695743</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/86695743</guid><author>Annmike</author><pubDate>Tue, 29 Jan 2019 21:35:32 +0800</pubDate><description><![CDATA[https://codeforces.com/contest/1108/problem/A

这个题的意思就是给你两个区间，在第一个区间中找一个点a,使l1&amp;lt;=a&amp;lt;=r1,在第二个区间中找一个点b,使l2&amp;lt;=b&amp;lt;=r2。

很简单，直接把两个区间的左端点输出就行了，如果两个区间的左端点相同，则把第二个区间的右端点输出。


#include&amp;lt;bits/stdc++.h...]]></description><category></category></item><item><title><![CDATA[小乐乐下象棋]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/84843255</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/84843255</guid><author>Annmike</author><pubDate>Wed, 05 Dec 2018 21:20:59 +0800</pubDate><description><![CDATA[链接：https://ac.nowcoder.com/acm/contest/301/F

题目描述

小乐乐一天天就知道玩，这一天又想玩象棋。
我们都知道马走日。
现在给定一个棋盘，大小是n*m,把棋盘放在第一象限，棋盘的左下角是(0,0),右上角是(n - 1, m - 1);
小乐乐想知道，一个马从左下角(0, 0)开始，走了k步之后，刚好走到右上角(n - 1, m - 1)的方案数。

...]]></description><category></category></item><item><title><![CDATA[小乐乐搭积木]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/84842505</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/84842505</guid><author>Annmike</author><pubDate>Wed, 05 Dec 2018 20:51:37 +0800</pubDate><description><![CDATA[链接：https://ac.nowcoder.com/acm/contest/301/B

题目：小乐乐想要给自己搭建一个积木城堡。积木城堡我们假设为n*m的平面矩形。小乐乐现在手里有1*2，2*1两种地砖。小乐乐想知道自己有多少种组合方案。

 

输入描述:


第一行输入整数n,m。(1&amp;lt;=n,m&amp;lt;=10)

输出描述:


输出组合方案数。

示例1



输入


2 3

...]]></description><category></category></item><item><title><![CDATA[BSGS（拔山盖世算法），北上广深算法]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81636319</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81636319</guid><author>Annmike</author><pubDate>Mon, 13 Aug 2018 20:39:24 +0800</pubDate><description><![CDATA[1.引入

BSGS算法又名拔山盖世算法，也叫北上广深算法，也叫大步小步算法，总之就是名字很多了，但是实际上他就是一个解决同余方程 给定a,b,p，求最小的非负整数x，满足  ax ≡ b(mod p)。

2.过程

先令 x = i*m-j，其中 m=ceil(sqrt(p))，ceil是向上取整。

这样原式就变为     ai*m-j = b (mod p)，

移项就变成了       ...]]></description><category></category></item><item><title><![CDATA[莫队！ 莫队！]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81625403</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81625403</guid><author>Annmike</author><pubDate>Mon, 13 Aug 2018 11:03:04 +0800</pubDate><description><![CDATA[1.传说中能够解决一切区间问题的算法，其实就是一种优化了的暴力解法。

当知道一个区间的[L,R]的范围，你就可以求出[L-1,R],[L,R-1],[L-1,R-1],区间的范围，莫队算法的实质是通过将询问排序，每个询问均由前一个询问（排序后的）转移得来，通过一定的排序优化时间复杂度。往往可以有O(N，√N)的效果，显然对于两次询问L,R和L′,R′，知道了L,R的答案,就可以暴力计算|L−L′...]]></description><category></category></item><item><title><![CDATA[异或序列]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81532101</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81532101</guid><author>Annmike</author><pubDate>Thu, 09 Aug 2018 10:34:47 +0800</pubDate><description><![CDATA[题目描述

已知一个长度为n的整数数列a1,a2,…,an，给定查询参数l、r，问在al,al+1,…,ar区间内，有多少子序列满足异或和等于k。也就是说，对于所有的x,y(l≤x≤y≤r)，满足ax⊕ax+1⊕⋯⊕ay=k的x,y有多少组。

 

输入

输入第一行为3个整数n,m,k。第二行为空格分开的n个整数，即a1,a2,…,an。接下来m行，每行两个整数lj,rj，代表一次查询。

 ...]]></description><category></category></item><item><title><![CDATA[HDU6000 洗衣服]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81510991</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81510991</guid><author>Annmike</author><pubDate>Wed, 08 Aug 2018 19:39:27 +0800</pubDate><description><![CDATA[洗衣服

时间限制: 2 Sec  内存限制: 128 MB
提交: 53  解决: 15
[提交] [状态] [讨论版] [命题人:admin]

题目描述

你现在要洗L件衣服。你有n台洗衣机和m台烘干机。由于你的机器非常的小，因此你每次只能洗涤(烘干)一件衣服。
第i台洗衣机洗一件衣服需要wi分钟，第i台烘干机烘干一件衣服需要di分钟。请问把所有衣服洗干净并烘干，最少需要多少时间？假设衣服在...]]></description><category></category></item><item><title><![CDATA[C++ pair用法]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81510105</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81510105</guid><author>Annmike</author><pubDate>Wed, 08 Aug 2018 16:40:21 +0800</pubDate><description><![CDATA[pair相当于是包含有两个变量的struct，同样类型的pair变量可以直接赋值，这里比struct要方便，写的时候也很简单，确实很好用，而且first和second可以直接调出里面的两个元素。

1.定义。

创建一个新的pair对象：pair&amp;lt;T1,T2&amp;gt; p1; 创建好的p1他的两个元素分别为T1，T2类型的。并且p1.first代表p1中的第一个元素，p1.second代表第二...]]></description><category></category></item><item><title><![CDATA[拓扑排序]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81434286</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81434286</guid><author>Annmike</author><pubDate>Sun, 05 Aug 2018 20:53:44 +0800</pubDate><description><![CDATA[1、 拓扑排序解释

　　我们起床穿裤子和鞋子时，相信大部分人的顺序是这样的，先穿上内裤，然后再穿上裤子，再穿上袜子，然后才是鞋子。  那么，我们把这些步骤分解：

(1)穿内裤

(2)穿裤子

(3)穿袜子

(4)穿鞋子

我们把这四个步骤，按照上述的顺序 给排一下，这就是所谓的拓扑排序。

当然这个排序的顺序是唯一的，如果你先进行(2)然后(1)(3)(4)，哦，不，你不是超人，请不要这样...]]></description><category></category></item><item><title><![CDATA[Milking Order]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81414615</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81414615</guid><author>Annmike</author><pubDate>Sat, 04 Aug 2018 19:57:27 +0800</pubDate><description><![CDATA[题目描述

Farmer John's N cows (1≤N≤105), numbered 1…N as always, happen to have too much time on their hooves. As a result, they have worked out a complex social hierarchy related to the order in which F...]]></description><category></category></item><item><title><![CDATA[Small Multiple]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81411839</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81411839</guid><author>Annmike</author><pubDate>Sat, 04 Aug 2018 15:56:16 +0800</pubDate><description><![CDATA[Find the smallest possible sum of the digits in the decimal notation of a positive multiple of K.
Constraints
2≤K≤105
K is an integer.

 

 

输入

Input is given from Standard Input in the following fo...]]></description><category></category></item><item><title><![CDATA[Built?]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81408144</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81408144</guid><author>Annmike</author><pubDate>Sat, 04 Aug 2018 11:01:52 +0800</pubDate><description><![CDATA[There are N towns on a plane. The i-th town is located at the coordinates (xi,yi). There may be more than one town at the same coordinates.
You can build a road between two towns at coordinates (a,b) ...]]></description><category></category></item><item><title><![CDATA[Fennec VS. Snuke]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81394166</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81394166</guid><author>Annmike</author><pubDate>Fri, 03 Aug 2018 20:47:17 +0800</pubDate><description><![CDATA[题目描述

Fennec and Snuke are playing a board game.
On the board, there are N cells numbered 1 through N, and N−1 roads, each connecting two cells. Cell ai is adjacent to Cell bi through the i-th road. E...]]></description><category></category></item><item><title><![CDATA[链式前向星]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81366715</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81366715</guid><author>Annmike</author><pubDate>Thu, 02 Aug 2018 20:50:05 +0800</pubDate><description><![CDATA[之前我们介绍过图的邻接矩阵存储法，它的空间和时间复杂度都是N2，现在我来介绍另外一种存储图的方法：邻接表，这样空间和时间复杂度就都是M。对于稀疏图来说，M要远远小于N2。先上数据，如下。

 




4 5
1 4 9
4 3 8
1 2 5
2 4 6
1 3 7

 

        第一行两个整数n m。n表示顶点个数（顶点编号为1~n），m表示边的条数。接下来m行表示，每行有3个数x ...]]></description><category></category></item><item><title><![CDATA[问题 I: Sandglass]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81320596</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81320596</guid><author>Annmike</author><pubDate>Tue, 31 Jul 2018 20:59:31 +0800</pubDate><description><![CDATA[ 

题目描述

We have a sandglass consisting of two bulbs, bulb A and bulb B. These bulbs contain some amount of sand. When we put the sandglass, either bulb A or B lies on top of the other and becomes the...]]></description><category></category></item><item><title><![CDATA[cpu  Restoring Road Network]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81320005</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81320005</guid><author>Annmike</author><pubDate>Tue, 31 Jul 2018 20:28:02 +0800</pubDate><description><![CDATA[In Takahashi Kingdom, which once existed, there are N cities, and some pairs of cities are connected bidirectionally by roads. The following are known about the road network:
People traveled between c...]]></description><category></category></item><item><title><![CDATA[LDU 个人训练赛二 I Interesting Integers]]></title><link>https://blog.youkuaiyun.com/Annmike/article/details/81287983</link><guid>https://blog.youkuaiyun.com/Annmike/article/details/81287983</guid><author>Annmike</author><pubDate>Mon, 30 Jul 2018 17:05:20 +0800</pubDate><description><![CDATA[Undoubtedly you know of the Fibonacci numbers. Starting with F1 = 1 and F2 = 1, every next number is the sum of the two previous ones. This results in the sequence 1, 1, 2, 3, 5, 8, 13, . . .. Now let...]]></description><category></category></item></channel></rss>