<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Legend4ever的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Legend4ever</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Legend4ever]]></copyright><item><title><![CDATA[线筛]]></title><link>https://blog.youkuaiyun.com/Legend4ever/article/details/83275127</link><guid>https://blog.youkuaiyun.com/Legend4ever/article/details/83275127</guid><author>Legend4ever</author><pubDate>Mon, 22 Oct 2018 16:53:04 +0800</pubDate><description><![CDATA[
#include&amp;lt;cstdio&amp;gt;
#include&amp;lt;cstring&amp;gt;
using namespace std;
const int N = 1000000;
int prime[N],bz[N];//prime素数数组  bz[i] i是否素数 
int n,cnt = 0; 
void pri(int x){
	for(int i = 2;i &amp;lt; x;i++){
...]]></description><category></category></item><item><title><![CDATA[JZOJ1609 幻灯片 离散化+模拟]]></title><link>https://blog.youkuaiyun.com/Legend4ever/article/details/82895045</link><guid>https://blog.youkuaiyun.com/Legend4ever/article/details/82895045</guid><author>Legend4ever</author><pubDate>Sat, 29 Sep 2018 11:26:56 +0800</pubDate><description><![CDATA[https://jzoj.net/junior/#main/show/1609

 

数据说明：

对于50%的数据，0&amp;lt;=X1,Y1,X2,Y2&amp;lt;=10^2。

对于100%的数据，0&amp;lt;=X1,Y1,X2,Y2&amp;lt;=10^9。

此题直接暴力只能得50分，通过观察100%数据可看出，虽然坐标的范围达到10^9，但数量N ≤ 100，即x，y坐标最多200个，根据题意可看出...]]></description><category></category></item><item><title><![CDATA[A - B]]></title><link>https://blog.youkuaiyun.com/Legend4ever/article/details/80397202</link><guid>https://blog.youkuaiyun.com/Legend4ever/article/details/80397202</guid><author>Legend4ever</author><pubDate>Mon, 21 May 2018 20:30:38 +0800</pubDate><description><![CDATA[出题是一件痛苦的事情！

    题目看多了也有审美疲劳，于是我舍弃了大家所熟悉的A+B Problem，改用A-B了哈哈！

    好吧，题目是这样的：给出一串数以及一个数字C，要求计算出所有A-B=C的数对的个数。（不同位置的数字一样的数对算不同的数对）]]></description><category></category></item><item><title><![CDATA[链式前向星存图 spfa]]></title><link>https://blog.youkuaiyun.com/Legend4ever/article/details/80374703</link><guid>https://blog.youkuaiyun.com/Legend4ever/article/details/80374703</guid><author>Legend4ever</author><pubDate>Sat, 19 May 2018 15:41:59 +0800</pubDate><description><![CDATA[1.链式前向星存图链式前向星存图相对邻接矩阵存图 能更有效的利用空间。包含两个结构struct node{
	int to,val,next;
}e[M];

/*e[i]为第i条边的信息
  e[i].to 为该边的终点
  e[i].val 为该边的边权
  e[i].next 为以该边起点为起点，最近存入的边的编号 
*/

st[N] //st[i] 以i为起点，最近存入的边的编号  
 ...]]></description><category></category></item><item><title><![CDATA[线段树]]></title><link>https://blog.youkuaiyun.com/Legend4ever/article/details/78726983</link><guid>https://blog.youkuaiyun.com/Legend4ever/article/details/78726983</guid><author>Legend4ever</author><pubDate>Wed, 06 Dec 2017 09:17:55 +0800</pubDate><description><![CDATA[线段树的概念 应用 建立 查询 修改


https://www.cnblogs.com/TheRoadToTheGold/p/6254255.html]]></description><category></category></item><item><title><![CDATA[POJ 3984 迷宫问题（BFS+STL queue）]]></title><link>https://blog.youkuaiyun.com/Legend4ever/article/details/78684830</link><guid>https://blog.youkuaiyun.com/Legend4ever/article/details/78684830</guid><author>Legend4ever</author><pubDate>Fri, 01 Dec 2017 11:35:48 +0800</pubDate><description><![CDATA[题目： POJ 3984 迷宫问题 


 传送门


经典的BFS求图的最短路径题目，从起点开始，按题目要求，对当前节点(x,y)向4个方向进行拓展，判断拓展的节点是否满足条件（是否越界，是否有被访问过，是否能走）


若满足条件，将这些节点push() 入队，(x,y)拓展完成后pop()出队，继续取队列中的头节点为当前节点继续拓展，直到拓展到中点，即按节点中储存的前驱节点信]]></description><category></category></item><item><title><![CDATA[高精度减法]]></title><link>https://blog.youkuaiyun.com/Legend4ever/article/details/78560527</link><guid>https://blog.youkuaiyun.com/Legend4ever/article/details/78560527</guid><author>Legend4ever</author><pubDate>Fri, 17 Nov 2017 14:01:38 +0800</pubDate><description><![CDATA[#include
#include
#include
#include
using namespace std;
const int N=1000;
char x[N+10],y[N+10]; 
void jianfa(char s1[],char s2[])
{
	char temp[N+10];
	int a[N+10],b[N+10],c[N+10],len1,len2,sign=0;
	l]]></description><category></category></item><item><title><![CDATA[高精度加法]]></title><link>https://blog.youkuaiyun.com/Legend4ever/article/details/78551229</link><guid>https://blog.youkuaiyun.com/Legend4ever/article/details/78551229</guid><author>Legend4ever</author><pubDate>Thu, 16 Nov 2017 14:57:15 +0800</pubDate><description><![CDATA[高精度算法就是当我们需要将超出我们能用整数类型表示的数字进行运算的时候所需要用到的算法。
其本质就是用字符串将数储存，然后根据算法的规则进行逐位运算。
以下为高精度加法的代码：]]></description><category></category></item><item><title><![CDATA[CAIOJ1034 二叉树的后序遍历（经典递归）]]></title><link>https://blog.youkuaiyun.com/Legend4ever/article/details/78424725</link><guid>https://blog.youkuaiyun.com/Legend4ever/article/details/78424725</guid><author>Legend4ever</author><pubDate>Thu, 02 Nov 2017 14:39:53 +0800</pubDate><description><![CDATA[http://caioj.cn/problem.php?id=1034


这题就是已知一棵二叉树的前序遍历和中序遍历，求这棵树的后序遍历。


做这题之前先要了解二叉树到底是什么，这里就不作赘述，直接搬上度娘的链接  二叉树-百度百科


二叉树的遍历分3种，没错就是题中的前序遍历（也叫做先序遍历），中序遍历，后序遍历。


前序遍历遵循的规则是：根左右（就是我有根就优先]]></description><category></category></item><item><title><![CDATA[SXOJ854 连续子序列的和]]></title><link>https://blog.youkuaiyun.com/Legend4ever/article/details/78368061</link><guid>https://blog.youkuaiyun.com/Legend4ever/article/details/78368061</guid><author>Legend4ever</author><pubDate>Fri, 27 Oct 2017 19:09:12 +0800</pubDate><description><![CDATA[http://119.23.35.203/oj/contest/196/problems/2


这个题目涉及到算法——尺取法，贴一篇神犇关于尺取法的博文 
尺取法
尺取法就像是在数列上放一条蜷着身体的毛毛虫，
当满足条件时取值区间（毛毛虫）的l指针和r指针发生改变，就像一条在蠕动的毛毛虫一样，所以我觉得叫毛毛虫爬法才更形象（雾）


这个题目的做法就是先求各项的前缀和，然后对前]]></description><category></category></item><item><title><![CDATA[SXOJ843 迷失的奶牛]]></title><link>https://blog.youkuaiyun.com/Legend4ever/article/details/78322810</link><guid>https://blog.youkuaiyun.com/Legend4ever/article/details/78322810</guid><author>Legend4ever</author><pubDate>Mon, 23 Oct 2017 20:19:08 +0800</pubDate><description><![CDATA[#include
#include
using namespace std;
int fam,cow,dis,tot;
bool dir; 
int main()
{
	scanf("%d %d",&fam,&cow);
	dis=1;tot=0;dir=1;
	while(1)
	{
			if(dir==1)
			{
				if((fam+dis>=cow) && (fam<cow))]]></description><category></category></item><item><title><![CDATA[SXOJ844 牛的基因组]]></title><link>https://blog.youkuaiyun.com/Legend4ever/article/details/78318720</link><guid>https://blog.youkuaiyun.com/Legend4ever/article/details/78318720</guid><author>Legend4ever</author><pubDate>Mon, 23 Oct 2017 14:44:30 +0800</pubDate><description><![CDATA[http://119.23.35.203/oj/contest/194/problems/2


题目的解述其实有点混乱，实际上就是在前n行有污点的奶牛任选三个序号，
对应到后n行没有污点的奶牛的该序号上看是否相同，如果没有一只无污点的奶牛的基因片段与之匹配，
可能的方案数就要增加1.
该题目数据比较水，暴力枚举的话也有人能够拿到80分，但是如果数据较大的时候，就需要用到数据优化来减少]]></description><category></category></item></channel></rss>