<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[while_you的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/while_you</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; while_you]]></copyright><item><title><![CDATA[git命令上传本地项目（gitee为例）]]></title><link>https://blog.csdn.net/while_you/article/details/122607336</link><guid>https://blog.csdn.net/while_you/article/details/122607336</guid><author>while_you</author><pubDate>Thu, 20 Jan 2022 18:27:22 +0800</pubDate><description><![CDATA[右键项目根目录，git bash here

敲入如下命令上传所有文件（需根据仓库名修改命令）
此处仓库名为miaosha
git init 
touch README.md
git add -A
git commit -m "first commit"
git remote add origin https://gitee.com/while_you/miaosha.git
git push -u origin master


...]]></description><category></category></item><item><title><![CDATA[j2ee期末复习]]></title><link>https://blog.csdn.net/while_you/article/details/122153101</link><guid>https://blog.csdn.net/while_you/article/details/122153101</guid><author>while_you</author><pubDate>Tue, 28 Dec 2021 10:50:38 +0800</pubDate><description><![CDATA[整体结构



model / entity
public class Player {
    private Integer id;
    private String name;
    private String sex;
    private Integer age;
    private String address;

    public Integer getId() {
        return id;
    }

    public void setId(Integer]]></description><category></category></item><item><title><![CDATA[bat定时消息提醒器]]></title><link>https://blog.csdn.net/while_you/article/details/121303149</link><guid>https://blog.csdn.net/while_you/article/details/121303149</guid><author>while_you</author><pubDate>Sat, 20 Nov 2021 12:40:36 +0800</pubDate><description><![CDATA[启动程序，到达指定时刻，自动弹出弹窗，此处消息为"sign in class!!!"
h为系统现在小时，m为系统现在分钟
::为注释标记，%此处时间设置%亦为注释标记
/time:6000 为6000秒后自动关闭弹窗

@echo off

:A
set h=%time:~0,2%
set m=%time:~3,2%
::echo %h%
::echo %m%
%此处进行时间设置%
if %h%==17 if %m%==20 (
msg %username% /time:6000 %time% sign .]]></description><category></category></item><item><title><![CDATA[ACM总模板]]></title><link>https://blog.csdn.net/while_you/article/details/119961353</link><guid>https://blog.csdn.net/while_you/article/details/119961353</guid><author>while_you</author><pubDate>Wed, 15 Sep 2021 19:39:10 +0800</pubDate><description><![CDATA[1.字符串
字符串hash
//自然溢出法

//统计前缀出现次数
#define base 131
#define ull unsigned long long
unordered_map&lt;ull,int&gt; mp;
string a;
void hash(char a[]){
	int len=strlen(a);
	ull t=0;
	for(int i=0;i&lt;len;i++){
		t=t*base+a[i]-'a'+1;
		mp[t]++;
	}
}

//统计后缀出现次数
#]]></description><category></category></item><item><title><![CDATA[求树的重心]]></title><link>https://blog.csdn.net/while_you/article/details/118754750</link><guid>https://blog.csdn.net/while_you/article/details/118754750</guid><author>while_you</author><pubDate>Wed, 15 Sep 2021 19:36:40 +0800</pubDate><description><![CDATA[树的重心为f[i]最小的点
// 树的重心：最大子树的结点数最小 
// f[i]:以i为根的最大子树的结点数 
// size[i]:以i为根的子树的结点数 
int f[maxn],size[maxn],all;
vector&lt;int&gt; ve[maxn];
void dfs(int u,int fa){
	size[u]=1;
	for(int v:ve[u]){
		if(v==fa) continue;
		dfs(v,u);
		size[u]+=size[v];
		f[u]=max]]></description><category></category></item><item><title><![CDATA[dp / 容斥原理]]></title><link>https://blog.csdn.net/while_you/article/details/118729648</link><guid>https://blog.csdn.net/while_you/article/details/118729648</guid><author>while_you</author><pubDate>Wed, 15 Sep 2021 19:35:37 +0800</pubDate><description><![CDATA[链接

容斥原理
奇加偶减
A∪B∪C=A+B+C−A∩B−A∩C−B∩C+A∩B∩CA∪B∪C=A+B+C-A∩B-A∩C-B∩C+A∩B∩CA∪B∪C=A+B+C−A∩B−A∩C−B∩C+A∩B∩C

枚举：采用二进制（全排列）
#include &lt;bits/stdc++.h&gt;
#define int long long
using namespace std;
const int maxn=1e6+5;
const int mod=1e9+7;
const int inf=1e18;
in]]></description><category></category></item><item><title><![CDATA[最短路dij模板（堆优化）]]></title><link>https://blog.csdn.net/while_you/article/details/118651688</link><guid>https://blog.csdn.net/while_you/article/details/118651688</guid><author>while_you</author><pubDate>Wed, 15 Sep 2021 19:34:53 +0800</pubDate><description><![CDATA[// 点数，边数，源点到各点最短距离，起点，访问标记，链式head 
int n,m,dist[maxn],s,vis[maxn],head[maxn];
struct edge{
	int to,val,ne;
}edge[maxn];
struct node{
	int val,pos;
	friend bool operator &lt;(struct node a,struct node b){
		return a.val&gt;b.val;
	}
};
priority_queue&lt;nod]]></description><category></category></item><item><title><![CDATA[java连接mysql数据库]]></title><link>https://blog.csdn.net/while_you/article/details/118307495</link><guid>https://blog.csdn.net/while_you/article/details/118307495</guid><author>while_you</author><pubDate>Wed, 15 Sep 2021 19:33:50 +0800</pubDate><description><![CDATA[Code

MySQL 8.0 以上版本（高版本）

/* 此处以mysql中book数据库为例 */

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class JdbcUtils {
    private static String driver = "com.mysql.cj.jdbc.Driver";
    private static String]]></description><category></category></item><item><title><![CDATA[【模板】最长上升子序列]]></title><link>https://blog.csdn.net/while_you/article/details/117552220</link><guid>https://blog.csdn.net/while_you/article/details/117552220</guid><author>while_you</author><pubDate>Wed, 15 Sep 2021 19:32:54 +0800</pubDate><description><![CDATA[核心代码
//dp[i]:前i个串对应的最长上升子序列长度

for(int i=1;i&lt;cnt;i++){
		string now=a[i];
		if(!tot||now&gt;tmp[tot]) tmp[++tot]=now,dp[i]=tot;
		else{
			int l=1,r=tot;
			//第一个比now大的 
			while(l&lt;r){
				int m=(l+r)&gt;&gt;1;
				if(tmp[m]&lt;=now) l=m+1;
				else ]]></description><category></category></item><item><title><![CDATA[Remember the Word，uva 1401 （trie+dp）]]></title><link>https://blog.csdn.net/while_you/article/details/117135124</link><guid>https://blog.csdn.net/while_you/article/details/117135124</guid><author>while_you</author><pubDate>Sat, 22 May 2021 00:18:34 +0800</pubDate><description><![CDATA[Link
算法竞赛经典训练指南p209
题意
给定一些单词，和一个长串，问这个长串拆分成已有单词，能拆分成几种方式
#include &lt;bits/stdc++.h&gt;
using namespace std;
#define int long long
const int maxn=1e6+5;
const int mod=20071027;
const int inf=1e18;
/************/
char a[maxn],b[5005][105];
int n,go=1,len,d]]></description><category></category></item><item><title><![CDATA[点分治]]></title><link>https://blog.csdn.net/while_you/article/details/116617144</link><guid>https://blog.csdn.net/while_you/article/details/116617144</guid><author>while_you</author><pubDate>Wed, 12 May 2021 11:11:15 +0800</pubDate><description><![CDATA[问题

给定一棵树和一个整数 k ，求树上等于 k 的路径有多少条？

点分治解决形似如上的问题，像是求树上所有的路径中满足某种条件的路径数
思想
根据目前所学的来看，点分治像一种思想，思想如下

考虑一颗树，从树的根（显然应是重心）到所有结点的


...]]></description><category></category></item><item><title><![CDATA[Tire——01字典树应用（异或最大）]]></title><link>https://blog.csdn.net/while_you/article/details/116525722</link><guid>https://blog.csdn.net/while_you/article/details/116525722</guid><author>while_you</author><pubDate>Sat, 08 May 2021 14:43:30 +0800</pubDate><description><![CDATA[问题1
给定n个数，从中选出两个数a,b，使得a^b最大
问题2
给定n个数，求一个区间[l,r]，使得区间异或和最大

]]></description><category></category></item><item><title><![CDATA[数论推论【扩展欧几里得】]]></title><link>https://blog.csdn.net/while_you/article/details/115740564</link><guid>https://blog.csdn.net/while_you/article/details/115740564</guid><author>while_you</author><pubDate>Thu, 15 Apr 2021 21:34:32 +0800</pubDate><description><![CDATA[结论：
已知n个整数（ai&gt;0a_i&gt;0ai​&gt;0），从中任选两个数a，b相加，每个数使用次数不限。令a+b=ca+b=ca+b=c，若有两个数互质，则有[x，inf)[x，inf)[x，inf)，使得c可取该区间任一整数

]]></description><category></category></item><item><title><![CDATA[nth_element【STL】]]></title><link>https://blog.csdn.net/while_you/article/details/115597515</link><guid>https://blog.csdn.net/while_you/article/details/115597515</guid><author>while_you</author><pubDate>Sun, 11 Apr 2021 13:44:45 +0800</pubDate><description><![CDATA[求区间第k小：
nth_element(a,a+k,a+n)
求区间第k大：
nth_element(a,a+n-k,a+n)
复杂度：O(n)
k范围：[0,n-1]
/*
求区间[a[0],a[4]]的第0小值，此出输出1
*/
int a[5]={3,2,1,4,5};
signed main()
{
	nth_element(a,a+0,a+5);
	cout&lt;&lt;a[0];
	return 0;
}

参考：Link

...]]></description><category></category></item><item><title><![CDATA[矩阵快速幂加速递推]]></title><link>https://blog.csdn.net/while_you/article/details/115592862</link><guid>https://blog.csdn.net/while_you/article/details/115592862</guid><author>while_you</author><pubDate>Sun, 11 Apr 2021 13:06:18 +0800</pubDate><description><![CDATA[参考：Link

]]></description><category></category></item><item><title><![CDATA[悬线法【动态规划】]]></title><link>https://blog.csdn.net/while_you/article/details/115555034</link><guid>https://blog.csdn.net/while_you/article/details/115555034</guid><author>while_you</author><pubDate>Fri, 09 Apr 2021 17:17:29 +0800</pubDate><description><![CDATA[2019 ICPC 银川 K.Largest Common Submatrix
悬线法参考

]]></description><category></category></item><item><title><![CDATA[第十一届蓝桥杯省赛第二场 I.子串分值和【简单dp】]]></title><link>https://blog.csdn.net/while_you/article/details/115528328</link><guid>https://blog.csdn.net/while_you/article/details/115528328</guid><author>while_you</author><pubDate>Thu, 08 Apr 2021 19:23:15 +0800</pubDate><description><![CDATA[Link
分析

暴力的话是O(n2)O(n^2)O(n2)，考虑如何优化为O(n)O(n)O(n)
观察计算过程

发现有非常多的重复部分
令dp[i]为以第i号字符为结尾的所有值之和
则有dp[1]所对应子串有a
dp[2]:b、ab
dp[3]:a、ba、aba
即dp[i]对应子串为：dp[i-1]所对应所有的子串+a[i]
因计算的是不同字符数，故一字符出现后相同字符出现将不再对答案有贡献。所以对于字符a[i]，需知道其上一次出现的位置，即pre[a[i]]。那么由于a[i]的影响，本次贡献为 上]]></description><category></category></item><item><title><![CDATA[2019 ICPC 银川 G.Pot!!【线段树】]]></title><link>https://blog.csdn.net/while_you/article/details/115499371</link><guid>https://blog.csdn.net/while_you/article/details/115499371</guid><author>while_you</author><pubDate>Thu, 08 Apr 2021 13:18:59 +0800</pubDate><description><![CDATA[Link
前置
线段树的RMQ模板（区间查询，区间修改）
int tree[maxn],lazy[maxn];
void push_up(int u){
	int v1=u*2,v2=u*2+1;
	tree[u]=max(tree[v1],tree[v2]);
}
void push_down(int u){
	int v1=u*2,v2=u*2+1;
	tree[v1]+=lazy[u];
	tree[v2]+=lazy[u];
	lazy[v1]+=lazy[u];
	lazy[v2]+=lazy[u]]></description><category></category></item><item><title><![CDATA[第 45 届国际大学生程序设计竞赛（ICPC）亚洲区域赛（昆明）I.Simone and graph coloring【最长下降子序列 / 树状数组】]]></title><link>https://blog.csdn.net/while_you/article/details/115417875</link><guid>https://blog.csdn.net/while_you/article/details/115417875</guid><author>while_you</author><pubDate>Tue, 06 Apr 2021 18:10:55 +0800</pubDate><description><![CDATA[Link
树状数组	/	最长下降子序列
题意
给定n个数字，对所有的逆序对建边，构成一个无向图，现对所有的点进行染色，求一种染色方案，使得相邻结点颜色不同，且使用颜色数最少
分析

若模拟情况，会发现逆序对数最多是n2n^2n2数量级，所以建边的话会炸时空，显然考虑找性质规律
任找两组数据进行模拟
4 3 2 1    —&gt;  1 2 3 4
5 4 3 1 2  —&gt;  1 2 3 4 4
发现第i号数的答案为以i为结尾的最长下降子序列
考虑两种方法
用数据结构，即树状数组：对于第i号数，找到]]></description><category></category></item><item><title><![CDATA[2020牛客暑期多校训练营（第二场） A.All with Pairs【KMP / 字符串hash】]]></title><link>https://blog.csdn.net/while_you/article/details/115216200</link><guid>https://blog.csdn.net/while_you/article/details/115216200</guid><author>while_you</author><pubDate>Tue, 06 Apr 2021 18:08:17 +0800</pubDate><description><![CDATA[Link
KMP / 字符串hash
题意
给定n个字符串s1,s2...sns_1,s_2...s_ns1​,s2​...sn​，求∑i=1n∑j=1nf(si,sj)2(mod998244353)\sum\limits_{i=1}^n\sum\limits_{j=1}^nf(s_i,s_j)^2(mod998244353)i=1∑n​j=1∑n​f(si​,sj​)2(mod998244353)
f(si,sj)f(s_i,s_j)f(si​,sj​)表示sis_isi​的前缀与sjs_jsj​的后缀相]]></description><category></category></item></channel></rss>