<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[h326301035的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/h326301035</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; h326301035]]></copyright><item><title><![CDATA[二分通用模板]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/130181197</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/130181197</guid><author>h326301035</author><pubDate>Sun, 16 Apr 2023 12:44:51 +0800</pubDate><description><![CDATA[二分通用模板]]></description><category></category></item><item><title><![CDATA[一文搞定常见的链表问题]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/129308079</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/129308079</guid><author>h326301035</author><pubDate>Thu, 02 Mar 2023 20:07:46 +0800</pubDate><description><![CDATA[一文搞定常见的链表问题]]></description><category></category></item><item><title><![CDATA[Codeforces Round #563 (Div. 2) D、Ehab and the Expected XOR Problem]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/90767014</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/90767014</guid><author>h326301035</author><pubDate>Tue, 04 Jun 2019 13:18:39 +0800</pubDate><description><![CDATA[题解：

赛后看题解补做的；

假设c数组为所求数组，a数组为其前缀异或和，即 ai=c1^c2^...^ci；

则c中任意连续子段 [cl, cl+1, ..., cr] 异或和

cl^cl-1^...^cr = al-1^ar;

故只需求出满足一下条件的a数组：

1、ai^aj != 0;

2、ai^aj != x;

然后由a数组求出c数组即可;（可利用 a^b=c; ...]]></description><category></category></item><item><title><![CDATA[scanf、getchar函数 返回值测试]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/84672681</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/84672681</guid><author>h326301035</author><pubDate>Sat, 01 Dec 2018 21:02:53 +0800</pubDate><description><![CDATA[1、scanf() 返回值为 int 型，

成功读入一个数， 返回1，

成功读入两个数，返回2，

以此类推；

读入结束时返回 EOF， 即 -1；

 

2、getchar() 返回值为 int 型，

为用户输入的ASCII码或EOF。

 ...]]></description><category></category></item><item><title><![CDATA[纵横字谜的答案 UVA - 232]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/82817578</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/82817578</guid><author>h326301035</author><pubDate>Sat, 22 Sep 2018 20:58:12 +0800</pubDate><description><![CDATA[题就不复述了;

题解：这道题挺好写的，暴力就行了，输出输出比较个性，输出的序号要占三个格，忽视这个为wa到哭的；


#include &amp;lt;iostream&amp;gt;
#include &amp;lt;cstring&amp;gt;
#include &amp;lt;cstdio&amp;gt;
using namespace std;
char a[15][15];
int b[15][15];
int main()
{
...]]></description><category></category></item><item><title><![CDATA[谜题 UVA - 227]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/82780189</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/82780189</guid><author>h326301035</author><pubDate>Wed, 19 Sep 2018 23:49:37 +0800</pubDate><description><![CDATA[







题解：挺水的一道题，不过有两个坑;

一是输入的数组 空格 如果在行末的时候，是不输出的，如样例2；

二是输入的指令可能分多行输入，如样例2;


#include &amp;lt;iostream&amp;gt;
#include &amp;lt;cstdio&amp;gt;
#include &amp;lt;cstring&amp;gt;
char c, s[10][10];
char cmd[1111];
int mai...]]></description><category></category></item><item><title><![CDATA[isalpha、isupper、islower 函数]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/82765185</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/82765185</guid><author>h326301035</author><pubDate>Tue, 18 Sep 2018 22:20:27 +0800</pubDate><description><![CDATA[一、isalpha

原型：int isalpha（int ch）

头文件：#include &amp;lt;cctype&amp;gt;(C语言使用&amp;lt;ctype.h&amp;gt;)

功能：判断字符ch是否为英文字母，

当ch为英文字母a-z或A-Z时，返回非零值(不一定是1)，否则返回零。

在标准c中相当于使用“ isupper(ch) || islower(ch)”做测试。

 

二、isupper...]]></description><category></category></item><item><title><![CDATA[getchar()函数测试]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/82764489</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/82764489</guid><author>h326301035</author><pubDate>Tue, 18 Sep 2018 21:32:21 +0800</pubDate><description><![CDATA[一、getchar有一个int型的返回值.

当程序调用getchar时.程序就等着用户按键.用户输入的字符被存放在键盘缓冲区中.

直到用户按回车为止(回车字符也放在缓冲区中).

当用户键入回车之后,getchar才开始从stdin流中每次读入一个字符.getchar函数的返回值是用户输入的第一个字符的ASCII码,如出错返回-1,且将用户输入的字符回显到屏幕.

如用户在按回车之前输入了不止...]]></description><category></category></item><item><title><![CDATA[strlen()函数、strcmp()函数 测试]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/82764004</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/82764004</guid><author>h326301035</author><pubDate>Tue, 18 Sep 2018 21:10:38 +0800</pubDate><description><![CDATA[1. strlen()函数测试

——strlen()函数用来计算  字符串的长度；

其原型为：unsigned int strlen (char *s);  s为指定的字符串

测试后可知 strlen()函数遇到 '\0' 时返回结果；

如

--- s[5]=&quot;abcd&quot;;                      strlen(s)=4;

--- s[5]=&quot;abcd&quot;; s[4]=...]]></description><category></category></item><item><title><![CDATA[棋盘问题]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/82751130</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/82751130</guid><author>h326301035</author><pubDate>Tue, 18 Sep 2018 00:27:40 +0800</pubDate><description><![CDATA[在一个给定形状的棋盘（形状可能是不规则的）上面摆放棋子，棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列，请编程求解对于给定形状和大小的棋盘，摆放k个棋子的所有可行的摆放方案C。

Input

输入含有多组测试数据。 
每组数据的第一行是两个正整数，n k，用一个空格隔开，表示了将在一个n*n的矩阵内描述棋盘，以及摆放棋子的数目。 n &amp;lt;= 8 , k &amp;lt;= n...]]></description><category></category></item><item><title><![CDATA[High Score]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/82116668</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/82116668</guid><author>h326301035</author><pubDate>Mon, 27 Aug 2018 17:47:45 +0800</pubDate><description><![CDATA[



 

题解：平方增长更快些，所以大数据的情况下更适合全部累加到一个数上，小数据暴力枚举就行了;


#include&amp;lt;iostream&amp;gt;
#include&amp;lt;algorithm&amp;gt;
using namespace std;
typedef long long LL;
const int maxn=1000;
int T;
LL a, b, c, d;
LL ans;
L...]]></description><category></category></item><item><title><![CDATA[Dunglish]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/82116084</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/82116084</guid><author>h326301035</author><pubDate>Mon, 27 Aug 2018 17:17:18 +0800</pubDate><description><![CDATA[





题解：这道题用 map 做的话是很简单的，构建两个map&amp;lt;string, int &amp;gt;，一个用来储存正确的翻译个数，一个用来储存储存错误的翻译个数，总的和正确的可以轻松求出，错误的就是总的减去正确的。

如果总方案数为1，正确的也为1， 那么就输出正确的翻译和 correct；

否则输出错误的翻译和 incorrect；

 


#include&amp;lt;cstdio&amp;gt...]]></description><category></category></item><item><title><![CDATA[Boss Battle]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/82115478</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/82115478</guid><author>h326301035</author><pubDate>Mon, 27 Aug 2018 16:51:12 +0800</pubDate><description><![CDATA[



题解：

题目描述：有环形的n根柱子，只有一根柱子后面有boss，每次向一根柱子投一个炸弹，炸弹波及范围为那根柱子和相邻的柱子，若boss在这三根柱子后面，则boss被炸死，若boss没有被炸死，则boss会选择原地不动或者走到相邻的柱子，问最坏情况下要用多少个炸弹。

显然：
当n≤3时，答案是1。
但n&amp;gt;3时，观察可得答案是n−2。因为在每次扔完炸弹后，第二次扔在那个炸弹的顺时针...]]></description><category></category></item><item><title><![CDATA[Two strings]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/82023860</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/82023860</guid><author>h326301035</author><pubDate>Fri, 24 Aug 2018 18:34:34 +0800</pubDate><description><![CDATA[You are given two strings a and b. You have to remove the minimum possible number of consecutive (standing one after another) characters from string b in such a way that it becomes a subsequence of st...]]></description><category></category></item><item><title><![CDATA[Minimal string]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/82020981</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/82020981</guid><author>h326301035</author><pubDate>Fri, 24 Aug 2018 16:29:01 +0800</pubDate><description><![CDATA[Petya recieved a gift of a string s with length up to 105 characters for his birthday. He took two more empty strings t and u and decided to play a game. This game has two possible moves:

Extract the...]]></description><category></category></item><item><title><![CDATA[Jam's balance]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/81941786</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/81941786</guid><author>h326301035</author><pubDate>Wed, 22 Aug 2018 12:13:30 +0800</pubDate><description><![CDATA[Jim has a balance and N weights. (1≤N≤20)(1≤N≤20) 
The balance can only tell whether things on different side are the same weight. 
Weights can be put on left side or right side arbitrarily. 
Please t...]]></description><category></category></item><item><title><![CDATA[最短路]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/81913974</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/81913974</guid><author>h326301035</author><pubDate>Tue, 21 Aug 2018 20:26:08 +0800</pubDate><description><![CDATA[Background 
Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cus...]]></description><category></category></item><item><title><![CDATA[最小生成树]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/81913289</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/81913289</guid><author>h326301035</author><pubDate>Tue, 21 Aug 2018 19:41:58 +0800</pubDate><description><![CDATA[The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already constructed a numb...]]></description><category></category></item><item><title><![CDATA[最小生成树]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/81912421</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/81912421</guid><author>h326301035</author><pubDate>Tue, 21 Aug 2018 18:24:09 +0800</pubDate><description><![CDATA[Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course.
Farmer John ordered a high spee...]]></description><category></category></item><item><title><![CDATA[最小生成树]]></title><link>https://blog.youkuaiyun.com/h326301035/article/details/81912347</link><guid>https://blog.youkuaiyun.com/h326301035/article/details/81912347</guid><author>h326301035</author><pubDate>Tue, 21 Aug 2018 18:17:01 +0800</pubDate><description><![CDATA[


The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly,...]]></description><category></category></item></channel></rss>