<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[华师少女的梦的博客]]></title><description><![CDATA[开开心心每一天]]></description><link>https://blog.youkuaiyun.com/yiwaite</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; yiwaite]]></copyright><item><title><![CDATA[分块查找 确定查找位置]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/128056030</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/128056030</guid><author>yiwaite</author><pubDate>Sat, 26 Nov 2022 20:01:13 +0800</pubDate><description><![CDATA[分块查找 确定位置]]></description><category></category></item><item><title><![CDATA[陈姥姥 dijkstra 算法 小记]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/128036449</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/128036449</guid><author>yiwaite</author><pubDate>Fri, 25 Nov 2022 13:43:01 +0800</pubDate><description><![CDATA[陈越 数据结构 单源最短路 加入v后 为什么只影响一圈邻接点]]></description><category></category></item><item><title><![CDATA[浙江大学计算机与软件学院2021年考研复试上机7-4 Load Balancing (30 分)]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/120187032</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/120187032</guid><author>yiwaite</author><pubDate>Wed, 08 Sep 2021 19:30:33 +0800</pubDate><description><![CDATA[7-4 Load Balancing (30 分)

Load balancing (负载均衡)refers to efficiently distributing incoming network traffic across a group of backend servers. A load balancing algorithm distributes loads in a specific way.

If we can estimate the maximum incoming traffic.]]></description><category></category></item><item><title><![CDATA[表达式转换（中缀表达式转后缀表达式）]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/120159995</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/120159995</guid><author>yiwaite</author><pubDate>Tue, 07 Sep 2021 15:55:11 +0800</pubDate><description><![CDATA[令人讨厌的字符串处理，写完人都不好了。不想写解析了，以后有时间再来补。


#include&lt;cstdio&gt;
#include&lt;cstring&gt;
#include&lt;stack&gt; 
using namespace std;
bool isnum(char c)
{
	if(c&gt;='0'&amp;&amp;c&lt;='9') return true;
	else return false;
}
int priority[128];
void initial()
{
	]]></description><category></category></item><item><title><![CDATA[7-4 Shopping With Coupons (30 分)]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/120003736</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/120003736</guid><author>yiwaite</author><pubDate>Mon, 30 Aug 2021 19:22:20 +0800</pubDate><description><![CDATA[#include&lt;cstdio&gt;
#include&lt;queue&gt;
#include&lt;algorithm&gt;
using namespace std;

const int maxn = 100000;
int item[maxn];
int coupon[maxn];
bool cmp(int a, int b)
{
	return a&gt;b;
}
struct node{
	int i,j;
	friend bool operator &lt; (node a, n.]]></description><category></category></item><item><title><![CDATA[2019浙江大学考研复试上机题 Ambulance Dispatch (30 分) floyd 解法]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/119808974</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/119808974</guid><author>yiwaite</author><pubDate>Thu, 19 Aug 2021 19:09:59 +0800</pubDate><description><![CDATA[多源最短路算法可以采用floyd算法。本题的dijkstra算法可参看本作者之前所写的文章。如果本题采取floyd算法可以拿到26分，无法通过测试点4，测试点4属于大数据测试，floyd算法是o(n^3)的复杂度。但是针对这道仅有0.08的通过率的题目，采取floyd算法会比dijkstra要简明许多，在真实的考场上采用floyd算法会降低程序出错的概率，不失为一种实用的方法。另外，针对PAT考试，400ms基本上对应处理5亿次循环左右。

另外这道题一个需要注意的点是救护点是从A-1 到 A-10，这意.]]></description><category></category></item><item><title><![CDATA[二叉树的非递归遍历]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/119739496</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/119739496</guid><author>yiwaite</author><pubDate>Mon, 16 Aug 2021 18:41:19 +0800</pubDate><description><![CDATA[/* 你的代码将被嵌在这里 */
void InorderTraversal( BinTree BT )
{
	Stack S = CreateStack();
	BinTree T = BT; 
	while(T||!IsEmpty(S))
	{
		while(T){
			Push(S,T);
			T = T-&gt;Left;
		}
		T = Pop(S);
		printf(" %c",T-&gt;Data);
		T = T-&gt;Right;
	}
}
void PreorderTr.]]></description><category></category></item><item><title><![CDATA[深度优先搜索专题]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114983900</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114983900</guid><author>yiwaite</author><pubDate>Thu, 18 Mar 2021 16:56:37 +0800</pubDate><description><![CDATA[这个专题是记录罗勇军《算法竞赛入门到进阶》DFS练习题的做题感悟。

poj 1416 "Shredding Company"

分岔路：以“12346”为例，可能的切割点：0号位置、1号位置、2号位置、3号位置、4号位置共计5个。因此，每次深度优先就以是否在i号位置进行切割为选择。用bool cut[ ]数组来记录是否切割。

终止：当5个位置的切割情况都已经确定后就终止。

注意点：50 12346这个测试数据会出现这两种切割： 0、1、3号切割其余位置不切割得 43 1 2 34 6；

0、1、3、]]></description><category></category></item><item><title><![CDATA[一起动手写个CPU]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114789357</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114789357</guid><author>yiwaite</author><pubDate>Sun, 14 Mar 2021 15:21:07 +0800</pubDate><description><![CDATA[春季PAT结束了，算上这次也是第二次参加PAT了。上次是去年9月份考了89分，这次考试忘记复习区间贪心，成绩没满分白忙活。下次九月份再战吧。鉴于pta上的甲级真题和历年考研保研真题以及教材和实验指导的题库都刷了3遍了，再刷题也只能去ZOJ上去刷了，那数据结构与算法就先停一停吧，反正最基本数据结构和算法也算是比较熟悉了。接下来就开始学习组成原理的知识，学习方式应该就是按照华中科技大学谭志虎老师在mooc的课和实验来进行，这个专栏会更新我学习组原的所有实验和一些值得讨论的知识。到这个专栏结束应该能完成一个单流水]]></description><category></category></item><item><title><![CDATA[进阶实验6-3.5 关键活动 (30 分)]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114700501</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114700501</guid><author>yiwaite</author><pubDate>Fri, 12 Mar 2021 16:55:24 +0800</pubDate><description><![CDATA[#include&lt;cstdio&gt;
#include&lt;vector&gt;
#include&lt;queue&gt;
#include&lt;stack&gt;
#define INF 65535
#define MAXV 105
using namespace std;
int n,m,indegree[MAXV];
int flex[MAXV][MAXV];
struct ENode
{
	int w,weight;
	ENode(int _w, int _weight) : w(_.]]></description><category></category></item><item><title><![CDATA[7-4 Chemical Equation (30 分) （解释详细）]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114579973</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114579973</guid><author>yiwaite</author><pubDate>Tue, 09 Mar 2021 12:37:57 +0800</pubDate><description><![CDATA[7-4 Chemical Equation (30 分)

Achemical equationis the symbolic representation of a chemical reaction in the form of symbols and formulae, wherein the reactant entities are given on the left-hand side and the product entities on the right-hand side. For ..]]></description><category></category></item><item><title><![CDATA[PAT（甲级）2020年春季考试]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114497265</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114497265</guid><author>yiwaite</author><pubDate>Sun, 07 Mar 2021 20:48:53 +0800</pubDate><description><![CDATA[小结：很常规的一套题，每道题前面写一点小提示。

7-1 Prime Day (20 分)



The above picture is from Sina Weibo, showing May 23rd, 2019 as a very cool "Prime Day". That is, not only that the corresponding number of the date20190523is a prime, but all its sub-strings ended at the ..]]></description><category></category></item><item><title><![CDATA[2020浙江大学计算机与软件学院保研上机题（代码简明）]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114435754</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114435754</guid><author>yiwaite</author><pubDate>Sat, 06 Mar 2021 11:26:31 +0800</pubDate><description><![CDATA[小结：这套题比2019年浙大保研上机质量高太多了。考到的知识点有深度优先搜索、并查集、优先级队列（最大最小堆）。第二题是个很有意思的题，我使用了三指针法做，应该是这道题最简单的解法而且时间复杂度是n。这套题的第二题和第四题都在卡时间复杂度，基本上暴力解法和最优解法每题会差10分左右。每个题代码都比较清晰简短所以只给一点小提示，相信能做到这套卷的都应该看得明白。

7-1

Standard Form of Polynomial

(20分)

The standard form of a polynomia]]></description><category></category></item><item><title><![CDATA[浙江大学计算机与软件学院2019年保研上机]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114376396</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114376396</guid><author>yiwaite</author><pubDate>Thu, 04 Mar 2021 19:57:26 +0800</pubDate><description><![CDATA[这套题跟2019年考研上机题难度差了几个数量级，建议完成时间不超过80分钟。

7-1 Happy Numbers (20 分)

Ahappy numberis defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits in base-ten, and repeat the process until t..]]></description><category></category></item><item><title><![CDATA[7-3 Left-View of Binary Tree (25 分)]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114373513</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114373513</guid><author>yiwaite</author><pubDate>Thu, 04 Mar 2021 17:23:34 +0800</pubDate><description><![CDATA[7-3 Left-View of Binary Tree (25 分)

Theleft-viewof a binary tree is a list of nodes obtained by looking at the tree from left hand side and from top down. For example, given a tree shown by the figure, its left-view is { 1, 2, 3, 4, 5 }



Given the ino..]]></description><category></category></item><item><title><![CDATA[7-2 How Many Ways to Buy a Piece of Land (25 分)]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114372658</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114372658</guid><author>yiwaite</author><pubDate>Thu, 04 Mar 2021 16:57:50 +0800</pubDate><description><![CDATA[7-2 How Many Ways to Buy a Piece of Land (25 分)

The land is for sale in CyberCity, and is divided into several pieces. Here it is assumed that each piece of land has exactly two neighboring pieces, except the first and the last that have only one. One can]]></description><category></category></item><item><title><![CDATA[2020秋季甲级PAT 7-4 Professional Ability Test (30 分)]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114371312</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114371312</guid><author>yiwaite</author><pubDate>Thu, 04 Mar 2021 16:19:33 +0800</pubDate><description><![CDATA[7-4 Professional Ability Test (30 分)

Professional Ability Test (PAT) consists of several series of subject tests. Each test is divided into several levels. Level A is aprerequisite (前置要求)of Level B if one must pass Level A with a score no less thanS...]]></description><category></category></item><item><title><![CDATA[2019浙江大学考研复试上机题 Ambulance Dispatch (30 分) ---测试点4]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114334961</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114334961</guid><author>yiwaite</author><pubDate>Wed, 03 Mar 2021 21:19:19 +0800</pubDate><description><![CDATA[总体的解题思路：

利用Dijkstra算法计算Na个救护中心与其余顶点的最短路径(时间上最短)，并且保存救护中心和顶点之间的路径，若有多条也全部保存下来。

当某个顶点v发出救护请求时，对于某个救护中心center，找出顶点v到center的经过街道数最少的路径。然后比较Na个救护中心中符合题意的那个救护中心（若有时间最小就就找时间最小，若时间相等就找车辆更多的救护中心，若时间都是最小且救护车数量都一样就找经过街道数最少的救护中心），当然只考虑还有救护车的救护中心。

按照这个思路（Dijkstra+DF]]></description><category></category></item><item><title><![CDATA[PAT小技巧记录（持续更新）]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114322709</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114322709</guid><author>yiwaite</author><pubDate>Wed, 03 Mar 2021 16:43:13 +0800</pubDate><description><![CDATA[1、sscanf

2、to_string()
]]></description><category></category></item><item><title><![CDATA[2019浙江大学考研复试上机题]]></title><link>https://blog.youkuaiyun.com/yiwaite/article/details/114292824</link><guid>https://blog.youkuaiyun.com/yiwaite/article/details/114292824</guid><author>yiwaite</author><pubDate>Tue, 02 Mar 2021 19:44:56 +0800</pubDate><description><![CDATA[1.


#include&lt;cstdio&gt;
#include&lt;cmath&gt;
#include&lt;string&gt;
#include&lt;vector&gt;
using namespace std;
const int maxn = 20000;
bool isPrime(long long x)
{
	if(x&lt;=1) return false;
	long long sqr = (int)sqrt(1.0*x);
	for(long long i=2; i&lt;]]></description><category></category></item></channel></rss>