<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[lhh的博客]]></title><description><![CDATA[ACM路遥且艰]]></description><link>https://blog.youkuaiyun.com/lhhnb</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; lhhnb]]></copyright><item><title><![CDATA[解决OpenCv Manager在Android手机上的配置问题]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/94896434</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/94896434</guid><author>lhhnb</author><pubDate>Sat, 06 Jul 2019 21:07:04 +0800</pubDate><description><![CDATA[背景：
做实训选的车标识别app,需要用的OpenCv，配置环境就用了好久，然后写了个简单灰度处理的程序，结果在手机上运行的时候，提示需要下载OpenCv Manager，结果根本不行，后来在网上查了一下，其实OpenCv库函数已经打包成APK了，但是他不识别，所以还需要下载OpenCv Manager 没有这个使用的库函数就用不了。
首先：
加上下边这段代码，下边这两个方法就是判断是否已经存在O...]]></description><category></category></item><item><title><![CDATA[python小说信息爬取并保存成txt]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/94889628</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/94889628</guid><author>lhhnb</author><pubDate>Sat, 06 Jul 2019 20:07:50 +0800</pubDate><description><![CDATA[小说网站爬虫]]></description><category></category></item><item><title><![CDATA[ALPHA_8、ARGB_4444、ARGB_8888和RGB_565的区别]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/91358940</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/91358940</guid><author>lhhnb</author><pubDate>Sun, 09 Jun 2019 23:15:18 +0800</pubDate><description><![CDATA[在Android的Bitmap.Config中有四个枚举类型：ALPHA_8、ARGB_4444、ARGB_8888和RGB_565
下面是这四种类型的详细解释：
ALPHA_8：每个像素都需要1（8位）个字节的内存，只存储位图的透明度，没有颜色信息
ARGB_4444：A(Alpha)占4位的精度，R(Red)占4位的精度，G(Green)占4位的精度，B（Blue）占4位的精度，加起来一共是1...]]></description><category></category></item><item><title><![CDATA[Android studio配置OpenCV环境]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/89705989</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/89705989</guid><author>lhhnb</author><pubDate>Tue, 30 Apr 2019 11:28:15 +0800</pubDate><description><![CDATA[第一步：下载OpenCV的Android–sdk
下载链接这个是4.1版本。下载好之后进行解压。

解压好的目录。
sample：opencv提供的一些简单例子。
sdk：目录即是我们开发opencv所需要的类库；
第二步：将OpenCV引入Android Studio
在工程里面import 一个model

第三步：更新build.gradle信息
把openCVLibrary410的grad...]]></description><category></category></item><item><title><![CDATA[OpenJudge 4116:拯救行动]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88887882</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88887882</guid><author>lhhnb</author><pubDate>Fri, 29 Mar 2019 11:49:26 +0800</pubDate><description><![CDATA[公主被恶人抓走，被关押在牢房的某个地方。牢房用N*M (N, M <= 200)的矩阵来表示。矩阵中的每项可以代表道路（@）、墙壁（#）、和守卫（x）。 
英勇的骑士（r）决定孤身一人去拯救公主（a）。我们假设拯救成功的表示是“骑士到达了公主所在的位置”。由于在通往公主所在位置的道路中可能遇到守卫，骑士一旦遇到守卫，必须杀死守卫才能继续前进。 
现假设骑士可以向上、下、左、右四个方向移动，每移动一个位置需要1个单位时间，杀死一个守卫需要花费额外的1个单位时间。同时假设骑士足够强壮，有能力杀死所有的守卫。]]></description><category></category></item><item><title><![CDATA[广度优先搜索思想讲解]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88809321</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88809321</guid><author>lhhnb</author><pubDate>Mon, 25 Mar 2019 23:35:50 +0800</pubDate><description><![CDATA[什么是广度优先搜索？
从起始点，找距离他为 i （i=1,2,…n）的点，直到找到目标节点，然后只要记录每个节点的父节点指针，就能反推得到最优路径。
适用于求最小步数的题。广搜需要维护一个大小难以估计的队列，空间需求远大于深搜。但是广搜有可能比深搜快。一般广搜会用到队列。
广搜一般会让你找最短路径，或者路径。

...]]></description><category></category></item><item><title><![CDATA[OpenJudge 4001:抓住那头牛]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88809287</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88809287</guid><author>lhhnb</author><pubDate>Mon, 25 Mar 2019 23:34:02 +0800</pubDate><description><![CDATA[题目链接
题解：
这个题可以用广搜来解决，从农夫到牛的走法每次都有三种选择，定义一个队列，把农夫的节点加进队列，然后以这三种走法找牛，队列先进先出，按顺序直到找到牛的位置。
代码：
#include&lt;iostream&gt;
#include&lt;stdio.h&gt;
#include&lt;queue&gt;
#include&lt;cstring&gt;
using namespac...]]></description><category></category></item><item><title><![CDATA[OpenJudge 2815:城堡问题]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88767241</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88767241</guid><author>lhhnb</author><pubDate>Sat, 23 Mar 2019 20:01:14 +0800</pubDate><description><![CDATA[图1是一个城堡的地形图。请你编写一个程序，计算城堡一共有多少房间，最大的房间有多大。城堡被分割成mn(m≤50，n≤50)个方块，每个方块可以有0~4面墙。]]></description><category></category></item><item><title><![CDATA[深度优先搜索的思想，剪枝，常见形式]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88767093</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88767093</guid><author>lhhnb</author><pubDate>Sat, 23 Mar 2019 19:52:17 +0800</pubDate><description><![CDATA[什么是深度优先搜索？
深度优先搜索，递归，栈。一条路走到头，并且没到达目标， 就往回退一个，走其他的路 ，直到走到目标节点 。 但是这时候就有很多种可能，所以复杂度很高，这时候就用到剪枝了。
深搜关键在于剪枝，常见的有两种剪枝方式:可行性剪枝、最优性剪枝 ：
1. 可行性剪枝：
及早发现正在探索的路径已经走不到终点 ，不在往下走。
2. 最优性剪枝：
走到节点V时发现此时付出的代价，比当前最有代价...]]></description><category></category></item><item><title><![CDATA[OpenJudge 4144:畜栏保留问题]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88766844</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88766844</guid><author>lhhnb</author><pubDate>Sat, 23 Mar 2019 19:36:18 +0800</pubDate><description><![CDATA[农场有N头牛，每头牛会在一个特定的时间区间[A, B]（包括A和B）在畜栏里挤奶，且一个畜栏里同时只能有一头牛在挤奶。现在农场主希望知道最少几个畜栏能满足上述要求，并要求给出每头牛被安排的方案。对于多种可行方案，主要输出一种即可。]]></description><category></category></item><item><title><![CDATA[OpenJudge 1042:Gone Fishing]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88763466</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88763466</guid><author>lhhnb</author><pubDate>Sat, 23 Mar 2019 16:33:20 +0800</pubDate><description><![CDATA[John is going on a fishing trip. He has h hours available (1 <= h <= 16), and there are n lakes in the area (2 <= n <= 25) all reachable along a single, one-way road. John starts at lake 1, but he can finish at any lake he wants. He can only travel from on]]></description><category></category></item><item><title><![CDATA[OpenJudge 4110:圣诞老人的礼物-Santa Clau’s Gifts]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88762214</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88762214</guid><author>lhhnb</author><pubDate>Sat, 23 Mar 2019 15:41:24 +0800</pubDate><description><![CDATA[圣诞节来临了，在城市A中圣诞老人准备分发糖果，现在有多箱不同的糖果，每箱糖果有自己的价值和重量，每箱糖果都可以拆分成任意散装组合带走。圣诞老人的驯鹿最多只能承受一定重量的糖果，请问圣诞老人最多能带走多大价值的糖果。]]></description><category></category></item><item><title><![CDATA[OpenJ 4143:和为给定数]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88761579</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88761579</guid><author>lhhnb</author><pubDate>Sat, 23 Mar 2019 15:12:48 +0800</pubDate><description><![CDATA[给出若干个整数，询问其中是否有一对数的和等于给定的数。

输入
共三行：
第一行是整数n(0 < n <= 100,000)，表示有n个整数。
第二行是n个整数。整数的范围是在0到10^8之间。
第三行是一个整数m（0 <= m <= 2^30)，表示需要得到的和。]]></description><category></category></item><item><title><![CDATA[OpenJu 4134:查找最接近的元素]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88758453</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88758453</guid><author>lhhnb</author><pubDate>Sat, 23 Mar 2019 11:54:29 +0800</pubDate><description><![CDATA[在一个非降序列中，查找与给定值最接近的元素。
输入
第一行包含一个整数n，为非降序列长度。1 <= n <= 100000。
第二行包含n个整数，为非降序列各元素。所有元素的大小均在0-1,000,000,000之间。]]></description><category></category></item><item><title><![CDATA[OpenJudge 2456：Aggressive cows]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88758040</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88758040</guid><author>lhhnb</author><pubDate>Sat, 23 Mar 2019 11:31:44 +0800</pubDate><description><![CDATA[Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi <= 1,000,000,000).]]></description><category></category></item><item><title><![CDATA[OpenJudge 3441:Values whose Sum is 0]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88757653</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88757653</guid><author>lhhnb</author><pubDate>Sat, 23 Mar 2019 11:11:09 +0800</pubDate><description><![CDATA[The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D are such that a + b + c + d = 0 . In the following, we assume that all lists have the same size n .]]></description><category></category></item><item><title><![CDATA[OpenJudge2749：分解因数]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88757227</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88757227</guid><author>lhhnb</author><pubDate>Sat, 23 Mar 2019 10:45:23 +0800</pubDate><description><![CDATA[描述：
给出一个正整数a，要求分解成若干个正整数的乘积，即a = a1 * a2 * a3 * … * an，并且1 &lt; a1 &lt;= a2 &lt;= a3 &lt;= … &lt;= an，问这样的分解的种数有多少。注意到a = a也是一种分解。
输入：
第1行是测试数据的组数n，后面跟着n行输入。每组测试数据占1行，包括一个正整数a (1 &lt; a &lt; 32768)
输出...]]></description><category></category></item><item><title><![CDATA[OpenJudge 2754:八皇后]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88750714</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88750714</guid><author>lhhnb</author><pubDate>Fri, 22 Mar 2019 21:02:30 +0800</pubDate><description><![CDATA[会下国际象棋的人都很清楚：皇后可以在横、竖、斜线上不限步数地吃掉其他棋子。如何将8个皇后放在棋盘上（有8 * 8个方格），使它们谁也不能被吃掉！这就是著名的八皇后问题。 
对于某个满足要求的8皇后的摆放方法，定义一个皇后串a与之对应，即a=b1b2...b8，其中bi为相应摆法中第i行皇后所处的列数。已经知道8皇后问题一共有92组解（即92个不同的皇后串）。]]></description><category></category></item><item><title><![CDATA[解决DEV C++调试问题]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88750028</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88750028</guid><author>lhhnb</author><pubDate>Fri, 22 Mar 2019 20:28:44 +0800</pubDate><description><![CDATA[以前用dev没用过调试，不喜欢用dev，一般用cb多一点，调试很方便，结果今天想用dev调试一下，结果出来输入框，输入数据，没什么反应，也不能单步执行，去网上找了解决方案，最后结合了两个才解决了。下边我写一下具体方法。

——————————————————————分割线—————————————————————————
第一步
1.
点工具===&gt;点编译选项，然后进入这里把产生调试信息改...]]></description><category></category></item><item><title><![CDATA[openjudge:1724Roads]]></title><link>https://blog.youkuaiyun.com/lhhnb/article/details/88701638</link><guid>https://blog.youkuaiyun.com/lhhnb/article/details/88701638</guid><author>lhhnb</author><pubDate>Wed, 20 Mar 2019 22:10:59 +0800</pubDate><description><![CDATA[N cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it : the road length and the toll that needs to be paid for the road (expressed in the number of coins).]]></description><category></category></item></channel></rss>