<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[泰勒猫的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/interestingddd</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; interestingddd]]></copyright><item><title><![CDATA[夜中小记(完结)]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/127505074</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/127505074</guid><author>interestingddd</author><pubDate>Mon, 24 Oct 2022 23:55:35 +0800</pubDate><description><![CDATA[好久没在这个号写文章了，世事无常，我的阵地也早已转移，这个号见证了我的开端，以后的路还是交给我的另一个账号吧。这是一个很有用的平台，我可以学习知识、做笔记、遇到很多我所仰慕的大牛，我的成长还在继续，只希望几年后的自己，可以成为岗位上真正意义上的佼佼者吧。
讲给自己：浪子回头，为时未晚！

]]></description><category></category></item><item><title><![CDATA[二分提升--搜索插入位置]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/120829078</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/120829078</guid><author>interestingddd</author><pubDate>Mon, 18 Oct 2021 16:31:04 +0800</pubDate><description><![CDATA[class Solution {
public:
    int searchInsert(vector&lt;int&gt;&amp; nums, int target) {
        int h=nums.size()-1,l=0;
        if(nums[h]&lt;target) return h+1;
        while(l&lt;h){
            int m=(h-l)/2+l;//取 ceiling
            if(nums[m]&lt;t..]]></description><category></category></item><item><title><![CDATA[Wall（凸包）]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119303262</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119303262</guid><author>interestingddd</author><pubDate>Sun, 01 Aug 2021 20:52:04 +0800</pubDate><description><![CDATA[Wall
Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King’s castle. The King was so greedy, that he would not listen to his Architect’s proposals to build a beautiful brick wall with a perfect shape and n]]></description><category></category></item><item><title><![CDATA[Fishnet]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119303040</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119303040</guid><author>interestingddd</author><pubDate>Sun, 01 Aug 2021 20:36:35 +0800</pubDate><description><![CDATA[Fishnet
A fisherman named Etadokah awoke in a very small island. He could see calm, beautiful and blue sea around the island. The previous night he had encountered a terrible storm and had reached this uninhabited island. Some wrecks of his ship were sprea]]></description><category></category></item><item><title><![CDATA[Building a Space Station]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119302786</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119302786</guid><author>interestingddd</author><pubDate>Sun, 01 Aug 2021 20:20:17 +0800</pubDate><description><![CDATA[Building a Space Station
You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to complete the task.
The space station is made up with a numb]]></description><category></category></item><item><title><![CDATA[Big Number]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119302709</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119302709</guid><author>interestingddd</author><pubDate>Sun, 01 Aug 2021 20:02:46 +0800</pubDate><description><![CDATA[Big Number
In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are given a number, you have to determine the number of digits in the ]]></description><category></category></item><item><title><![CDATA[Area（几何）]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119302507</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119302507</guid><author>interestingddd</author><pubDate>Sun, 01 Aug 2021 19:55:44 +0800</pubDate><description><![CDATA[Area
Being well known for its highly innovative products, Merck would definitely be a good target for industrial espionage. To protect its brand-new research and development facility the company has installed the latest system of surveillance robots patrol]]></description><category></category></item><item><title><![CDATA[Pie（二分）]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119302360</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119302360</guid><author>interestingddd</author><pubDate>Sun, 01 Aug 2021 19:39:01 +0800</pubDate><description><![CDATA[Pie
My birthday is coming up and traditionally I’m serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my party and each of them gets a piece of pie. This should be one piece o]]></description><category></category></item><item><title><![CDATA[Find them, Catch them]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119272525</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119272525</guid><author>interestingddd</author><pubDate>Sat, 31 Jul 2021 11:18:04 +0800</pubDate><description><![CDATA[Find them, Catch them

考察并查集，大意是说城市里有两个帮派，每个人都有特定的编号（从 1 开始），输入中 D 表示后面的两个人属于不同的帮派，若碰到 A，则要求我们根据已知的i信息判断出这两个人是否在同一个帮派，这里我们创建树，对于每一个人，初始化父节点是自己，然后开一个说明当前下标的敌对势力的数组 differ[ ]，对于输入的 D 中的两个人 a 和 b，有 differ[a]=b（反之亦如此），对于所有的人（包括编号 x 与 differ[x]），进行根节点的归类（帮派归类），]]></description><category></category></item><item><title><![CDATA[Collecting Beepers]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119236628</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119236628</guid><author>interestingddd</author><pubDate>Fri, 30 Jul 2021 09:29:00 +0800</pubDate><description><![CDATA[Collecting Beepers

一道别样的搜索题，给你起点和几个目标点，求从起点途经所有目标点再回到起点的最短路径长度，虽然是搜索，但是我们只是需要搜索那几个目标点，因为很容易知道两个目标点之间的最短路就是abs(x1-x2)+abs(y1-y2)（题目要求一次只能左右走或者上下走一格），这样其实比一般的深搜题还水了。。：
//我愿称之为对指定目标的搜索（DFS）,而不是胡子眉毛一把抓（逐个搜索） 
#include&lt;iostream&gt;
#include&lt;cstdio&gt;
#i]]></description><category></category></item><item><title><![CDATA[Channel Allocation]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119189465</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119189465</guid><author>interestingddd</author><pubDate>Wed, 28 Jul 2021 20:45:20 +0800</pubDate><description><![CDATA[Channel Allocation


经典的图着色问题的变形，其实就是换了一个情境，有“公式”可以套，但是提交时没有通过，显示 Wrong Answer，但是样例是过了，时间问题就不再深究了，这里我只要求明白算法的思想：
//经典着色问题
#include&lt;iostream&gt;
#include&lt;cstdio&gt;
#include&lt;cstring&gt;
#include&lt;string&gt;
#define inf 1000//对 color 数组初始化为“无穷大”
u]]></description><category></category></item><item><title><![CDATA[Image Perimeters（真让人无语。。）]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119183303</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119183303</guid><author>interestingddd</author><pubDate>Wed, 28 Jul 2021 16:34:45 +0800</pubDate><description><![CDATA[Image Perimeters

求连通块的周长，这里用的深搜实现，做了一些深搜的题了，还是感觉深搜没有广搜那么自然，因为涉及到递归，理解起来更加困难一些，还是需要加强该方面的训练！
这一道题卡了不少时间，先看代码：
//深搜；求连通块的周长（输入保证没有“空心”）
#include&lt;iostream&gt;
#include&lt;cstdio&gt;
#include&lt;cstring&gt;
using namespace std;
int n, m, a, b;
struct g {//]]></description><category></category></item><item><title><![CDATA[Road Construction（转载）]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119169937</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119169937</guid><author>interestingddd</author><pubDate>Wed, 28 Jul 2021 09:38:08 +0800</pubDate><description><![CDATA[Road Construction

卡了一天多，我决定先放一放，主要是对 Tarjan 的代码实现还不是很理解，所以这道题只能转载一个讲得清楚的题解了：【图的连通性】建造道路Road Construction
然后下面是里面的 AC 代码（自己写了一遍）：
#include&lt;iostream&gt;
#include&lt;cstdio&gt;
#include&lt;cstring&gt;
using namespace std;
int head[1200], cnt, index1, ans;]]></description><category></category></item><item><title><![CDATA[【转载优质文章】强连通算法--Tarjan个人理解+详解]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119146005</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119146005</guid><author>interestingddd</author><pubDate>Tue, 27 Jul 2021 15:54:06 +0800</pubDate><description><![CDATA[原文传送入口

]]></description><category></category></item><item><title><![CDATA[分割垃圾文]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119144291</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119144291</guid><author>interestingddd</author><pubDate>Tue, 27 Jul 2021 15:02:46 +0800</pubDate><description><![CDATA[分割线来啦！！
——————————————————————————
入坑图了，好多好多我不知道的东西，不过好消息是我的假期又有新的东西可以捣鼓了~先一点一点入门吧，加油！！


...]]></description><category></category></item><item><title><![CDATA[Knight Moves]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119117538</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119117538</guid><author>interestingddd</author><pubDate>Mon, 26 Jul 2021 20:20:10 +0800</pubDate><description><![CDATA[Knight Moves

依葫芦画瓢，葫芦在这里：
Dungeon Master
代码几乎一样的套路吧~再注意两点：

注意行列与自己设的 x y 坐标的关系！！（竖 x 横 y）
注意每一次循环将队列清空：while(!q.empty()) q.pop();否则会报错：Runtime error!

//比葫芦画瓢 （高仿 Dungeon Master） 
//还是注意分清坐标与行列的关系！！ 
#include&lt;iostream&gt;
#include&lt;cstdio&gt;
#inclu]]></description><category></category></item><item><title><![CDATA[Dungeon Master]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119116682</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119116682</guid><author>interestingddd</author><pubDate>Mon, 26 Jul 2021 19:33:43 +0800</pubDate><description><![CDATA[Dungeon Master

经典！经典！！经典！！！
广搜题，一开始自己尝试解决没能成功，后来看了题解我大为震撼，包含了不少我需要具备的思想，值得细细品味这道题：
//我愿意称之为搜索的典型例题！！！（太经典了） 
//认真吸收里面的思想！！ 
//广搜解法 
#include&lt;iostream&gt;
#include&lt;cstdio&gt;
#include&lt;cstring&gt;
#include&lt;queue&gt;
using namespace std;
int l, r]]></description><category></category></item><item><title><![CDATA[Prime Path]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119103164</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119103164</guid><author>interestingddd</author><pubDate>Mon, 26 Jul 2021 10:07:26 +0800</pubDate><description><![CDATA[Prime Path

题目大意：每次输入两个四位素数m，n，求由 m 变到 n 需要的最少变化次数，规定每次变化一位数，并且经过的数都为素数，我们用广度优先搜索来求最小次数（最短路径）：
//以结构体为节点的队列（类比链表）
#include&lt;iostream&gt;
#include&lt;cstdio&gt;
#include&lt;cstring&gt;
#include&lt;cmath&gt;
#include&lt;queue&gt;
using namespace std;
int t]]></description><category></category></item><item><title><![CDATA[Find The Multiple]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119086684</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119086684</guid><author>interestingddd</author><pubDate>Sun, 25 Jul 2021 20:24:09 +0800</pubDate><description><![CDATA[Find The Multiple

一道搜索题，首先我们得搞明白几种长整型：
long long：[-2^63 ,2^63-1]，也就是 -9223372036854775808~9223372036854775807（19位）
usigned long long：[0,2^64-1]：0~18446744073709551615（20位），
这一道题用搜索来做，设置成 long long 过不了，ull 却可以了，卡的那么死么？？
正好复习一下搜索：
dfs:
#include&lt;iostream&]]></description><category></category></item><item><title><![CDATA[Robot Motion]]></title><link>https://blog.youkuaiyun.com/interestingddd/article/details/119082414</link><guid>https://blog.youkuaiyun.com/interestingddd/article/details/119082414</guid><author>interestingddd</author><pubDate>Sun, 25 Jul 2021 15:22:59 +0800</pubDate><description><![CDATA[Robot Motion

一开始还以为是模拟，没想到是搜索，考察递归的使用：
//还是感觉不够深刻：递归实现移动（搜索）
#include&lt;iostream&gt;
#include&lt;cstdio&gt;
#include&lt;cstring&gt;
using namespace std;
int Y, X, start;
char map[15][15];
int steps[15][15];//记录对应下标的格子用的步数 
void move(int step, int x, int ]]></description><category></category></item></channel></rss>