<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[浅笑~如夏]]></title><description><![CDATA[今天会有好事发生吗]]></description><link>https://blog.csdn.net/wanherun</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; wanherun]]></copyright><item><title><![CDATA[Gym102769I Interstellar Hunter]]></title><link>https://blog.csdn.net/wanherun/article/details/114477252</link><guid>https://blog.csdn.net/wanherun/article/details/114477252</guid><author>wanherun</author><pubDate>Sun, 07 Mar 2021 10:34:59 +0800</pubDate><description><![CDATA[初始位置在 (0,0) 点，现在有两种操作：

操作 1 ：你获得一种能力向量 (x,y) ，你可以从当前位置 (a,b) 出发，沿着这个能力向量方向移动任意整数个单位，即可以从 (a,b) 移动至 (a+dx,b+dy) ；
操作 2 ：在二维平面上的某一点 (x,y) 上出现了一个价值为 w 的物品，如果你可以通过你当前拥有的能力向量移动至 (x,y) 就可以获得该物品。
问最终你可以获得的最大价值是多少？

简单分析即可发现，对于一个出现地物品，如果当前我能够取取得，就一定回去取，因为这对之后的操作没]]></description><category></category></item><item><title><![CDATA[bzoj5055]]></title><link>https://blog.csdn.net/wanherun/article/details/78108110</link><guid>https://blog.csdn.net/wanherun/article/details/78108110</guid><author>wanherun</author><pubDate>Tue, 25 Aug 2020 10:15:18 +0800</pubDate><description><![CDATA[题目令人恐惧的一道题233。时间的力量。。。。其实我是不想写的，但看在AC人怎么少，而且还没题解，写一发吧。先枚举每一个数，看它前面有几个比它小，算一下和为sum1，后面有几个比它大，算一下和为sum2，对答案的贡献为A[i]*sum1*sum2。离散化后，树状数组就可以了。#include<bits/stdc++.h>
#define N 300000
using namespace std;
i]]></description><category></category></item><item><title><![CDATA[bzoj5016 [Snoi2017]一个简单的询问]]></title><link>https://blog.csdn.net/wanherun/article/details/79520451</link><guid>https://blog.csdn.net/wanherun/article/details/79520451</guid><author>wanherun</author><pubDate>Sun, 11 Mar 2018 21:26:25 +0800</pubDate><description><![CDATA[题目首先，可以确定的是，这一定是一道数据结构的题，但是，题目询问的式子过于复杂，我们要先考虑化简一下。首先，吧get(l,r,x)变成get(r,x)−get(l−1,x)是非常显然的，新的get(n,x)，表示1…n有几个x首先，吧get(l,r,x)变成get(r,x)-get(l-1,x)是非常显然的，新的get(n,x)，表示1\dots n 有几个xget(l1,r1,x)get(l2,r]]></description><category></category></item><item><title><![CDATA[bzoj5018 [Snoi2017]英雄联盟]]></title><link>https://blog.csdn.net/wanherun/article/details/79404767</link><guid>https://blog.csdn.net/wanherun/article/details/79404767</guid><author>wanherun</author><pubDate>Wed, 28 Feb 2018 19:51:26 +0800</pubDate><description><![CDATA[题目嗯，其实吧，还是算比较显然的dp。 
f[i][j]表示前i个英雄，用了j元钱的最多方案数，最后答案就是满足f[n][j]≥m最小的j了。f[i][j]表示前i个英雄，用了j元钱的最多方案数，最后答案就是满足f[n][j]\ge m最小的j了。 
转移方法，首先，肯定要枚举i,然后枚举当前买几个皮肤j，再枚举l表示f[i][l]从什么转移过来。注意，每次l的上界是当前买所有皮肤的价格。转移方法，]]></description><category></category></item><item><title><![CDATA[WC2018 游记]]></title><link>https://blog.csdn.net/wanherun/article/details/79301914</link><guid>https://blog.csdn.net/wanherun/article/details/79301914</guid><author>wanherun</author><pubDate>Mon, 12 Feb 2018 15:04:09 +0800</pubDate><description><![CDATA[有到了一年一度的ccf冬令营了，我也有幸参加了这次冬令营。

其实去年也是来过的，但无奈暴力写挂了，与]]></description><category></category></item><item><title><![CDATA[bzoj4916 神犇和蒟蒻]]></title><link>https://blog.csdn.net/wanherun/article/details/79236101</link><guid>https://blog.csdn.net/wanherun/article/details/79236101</guid><author>wanherun</author><pubDate>Fri, 02 Feb 2018 10:26:24 +0800</pubDate><description><![CDATA[题目首先，由μ\mu的性质知道，第一问的答案一定为1。考虑第二问。 
φ(i2)=iφ(i)\varphi(i^2)=i\varphi(i) 
令Φ(i)=∑ni=1iφ(i)\Phi(i)=\sum_{i=1}^{n}i\varphi(i) 
则发现 
    ∑ni=1iΦ([ni])=∑ni=1i∑[ni]j=1jφ(j)\sum_{i=1}^{n}i\Phi([\frac{n}{i}])=\]]></description><category></category></item><item><title><![CDATA[loj125 杜教筛]]></title><link>https://blog.csdn.net/wanherun/article/details/79235921</link><guid>https://blog.csdn.net/wanherun/article/details/79235921</guid><author>wanherun</author><pubDate>Fri, 02 Feb 2018 10:14:41 +0800</pubDate><description><![CDATA[题目由题目猜算法系列。已知f(n)=∑d|ng(d)与g(n)=2n2+3n+5,求∑ni=1f(i)已知f(n)=\sum_{d|n}g(d)与g(n)=2n^2+3n+5,求\sum_{i=1}^{n}f(i) 
令F(i)=∑ni=1f(i)F(i)=\sum_{i=1}^{n}f(i) 
则发现（前面的系数需要凑一凑） 
∑ni=1μ(i)F([ni])=∑ni=1μ(i)∑[ni]j=1f]]></description><category></category></item><item><title><![CDATA[bzoj3944 Sum]]></title><link>https://blog.csdn.net/wanherun/article/details/79235742</link><guid>https://blog.csdn.net/wanherun/article/details/79235742</guid><author>wanherun</author><pubDate>Fri, 02 Feb 2018 10:01:53 +0800</pubDate><description><![CDATA[题目杜教筛第一题。数学推导过程详见这里具体实现的时候要用一个hash表或者map存一下，其实感觉两个东西差不多快。想要提高速度应该调一调M的大小，可以三分试一试呀。#include<bits/stdc++.h>
#define ll long long 
#define M 4500000
using namespace std;
int prime[M+5],notp[M+5],cnt;
ll m]]></description><category></category></item><item><title><![CDATA[杜教筛学习笔记]]></title><link>https://blog.csdn.net/wanherun/article/details/79230218</link><guid>https://blog.csdn.net/wanherun/article/details/79230218</guid><author>wanherun</author><pubDate>Thu, 01 Feb 2018 19:23:21 +0800</pubDate><description><![CDATA[考虑求解以下问题： 
∑ni=1μ(i)\sum^{n}_{i=1}\mu(i) 
∑ni=1φ(i)\sum^{n}_{i=1}\varphi(i) 
∑n(i=1)μ(i)ik\sum^{n}_(i=1)\mu(i)i^k

令M(i)=∑ni=1μ(i)M(i)=\sum^{n}_{i=1}\mu(i) 
发现 
∑ni=1M([ni])=∑ni=1∑[ni]j=1μ(j)\sum^{n}_]]></description><category></category></item><item><title><![CDATA[莫比乌斯函数学习笔记]]></title><link>https://blog.csdn.net/wanherun/article/details/79228590</link><guid>https://blog.csdn.net/wanherun/article/details/79228590</guid><author>wanherun</author><pubDate>Thu, 01 Feb 2018 16:07:00 +0800</pubDate><description><![CDATA[(1) 
定义 
e(n)=⟮1 n=10 n≠1e(n)=\lgroup^{1\ n=1}_{0\ n\neq1} 
I(n)=1I(n)=1 
id(n)=nid(n)=n 
σ0(n)因子个数\sigma_{0}(n) 因子个数 
σ1(n)因数和\sigma_{1}(n)因数和 
μ(n)莫比乌斯函数\mu(n)莫比乌斯函数 
φ(n)欧拉函数\varphi(n)欧拉函数 
(2)]]></description><category></category></item><item><title><![CDATA[bzoj3529 [Sdoi2014]数表]]></title><link>https://blog.csdn.net/wanherun/article/details/79227909</link><guid>https://blog.csdn.net/wanherun/article/details/79227909</guid><author>wanherun</author><pubDate>Thu, 01 Feb 2018 14:17:34 +0800</pubDate><description><![CDATA[题目如果不考虑a的限制，这道题就简化了一下。令f(x)f(x)表示x的约数和，g(x)=∑ni=1∑mj=1[gcd(i,j)==x]g(x)=\sum^{n}_{i=1}\sum^{m}_{j=1}[gcd(i,j)==x] 
那么，ans=∑ni=1f(i)g(i)ans=\sum^{n}_{i=1}f(i)g(i),由某道题可得g(i)g(i)的表达式。 
YY的GCD 
g(i)=∑i|dμ]]></description><category></category></item><item><title><![CDATA[bzoj2440 [中山市选2011]完全平方数]]></title><link>https://blog.csdn.net/wanherun/article/details/79227195</link><guid>https://blog.csdn.net/wanherun/article/details/79227195</guid><author>wanherun</author><pubDate>Thu, 01 Feb 2018 13:36:52 +0800</pubDate><description><![CDATA[题目首先，直接得出答案貌似不太可能，我们可以先二分一个答案，这样就成了计数问题了，就是求前n个数中，有多少个数没有平方因子。很显然的一点，就是μ\mu值不为0的数有多少个，但是，这样是算不出来的，因为太大了，所以我们就要想一想办法。考虑容斥原理，发现前面的系数刚好为μ\mu值，最后我们只需要算一个求和式子∑x√i=1[xi2]\sum^{\sqrt{x}}_{i=1}[\frac{x}{i^2}]就]]></description><category></category></item><item><title><![CDATA[bzoj2820 YY的GCD]]></title><link>https://blog.csdn.net/wanherun/article/details/79226314</link><guid>https://blog.csdn.net/wanherun/article/details/79226314</guid><author>wanherun</author><pubDate>Thu, 01 Feb 2018 11:49:25 +0800</pubDate><description><![CDATA[题目这肯定要用卷积的，我们来推一推公式。我们先令n=min(n,m)n=min(n,m),m=max(m,n)m=max(m,n)则 
ans=∑p∑ni=1∑mj=1gcd(i,j)==pans=\sum^{}_{p}\sum^{n}_{i=1}\sum^{m}_{j=1}gcd(i,j)==p 
ans=∑p∑[np]i=1∑[mp]j=1gcd(i,j)==1ans=\sum^{}_{p}\s]]></description><category></category></item><item><title><![CDATA[poj3683 Priest John's Busiest Day]]></title><link>https://blog.csdn.net/wanherun/article/details/79178211</link><guid>https://blog.csdn.net/wanherun/article/details/79178211</guid><author>wanherun</author><pubDate>Sat, 27 Jan 2018 08:56:07 +0800</pubDate><description><![CDATA[题目2-sat问题，要求要输出方案。先考虑建模，把每个婚礼都拆成两个部分。对于两个婚礼，A，B，用A，B表示开始，A’，B’表示结束，如果A与B,B’都冲突的话，A就不能选，连向A’，否则只有一个冲突的话，A连B’,A’连B。这样图就建好了，那么如何输出方案呢，一般tarjan后跑一个拓扑序就好了，但是有更好的方案，tarjan相当于就是一个拓扑了，最后只要A与A’谁的强连通分量编号小就选谁就好了。]]></description><category></category></item><item><title><![CDATA[loj6157 A^B Problem]]></title><link>https://blog.csdn.net/wanherun/article/details/79178158</link><guid>https://blog.csdn.net/wanherun/article/details/79178158</guid><author>wanherun</author><pubDate>Sat, 27 Jan 2018 08:38:18 +0800</pubDate><description><![CDATA[题目树上一条路径上边权的异或，显然相当于两个到根的异或再异或起来。 
这样，相当于我们每次都知道到根的异或值。这样我们就可以并查集处理了，记录到根的异或值，每次判断一下就好了。#include<bits/stdc++.h>
#define N 500000 
using namespace std;
int T,n,m,x,y,f[N+5],w[N+5],z,flg;
int u[N+5],v[N+]]></description><category></category></item><item><title><![CDATA[bzoj1467 Pku3243 clever Y]]></title><link>https://blog.csdn.net/wanherun/article/details/79178135</link><guid>https://blog.csdn.net/wanherun/article/details/79178135</guid><author>wanherun</author><pubDate>Sat, 27 Jan 2018 08:24:48 +0800</pubDate><description><![CDATA[题目扩展BSGS，模数改成任意数了，本质和一般的还是一样的，只是需要把X与K推一推公式让他们互质就好了。具体细节在代码中有体现。#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll a,b,p;
ll gcd(ll a,ll b)
{
    return b?gcd(b,a%b):a;
}
ll BSGS(ll a]]></description><category></category></item><item><title><![CDATA[bzoj3331 [BeiJing2013]压力]]></title><link>https://blog.csdn.net/wanherun/article/details/79178116</link><guid>https://blog.csdn.net/wanherun/article/details/79178116</guid><author>wanherun</author><pubDate>Sat, 27 Jan 2018 08:17:12 +0800</pubDate><description><![CDATA[题目显然，如果两个点之间要有一个必须到达的点，这个点必须是割点。只要我们求出点双联通分量，然后对图重构，在新得到的树上做就好了。我们在树上就可以差分了，最后求一个子树和就好了。#include<bits/stdc++.h>
#define N 500000 
using namespace std;
int first[N+5],nxt[N+5],to[N+5],siz;
int First[N+5]]></description><category></category></item><item><title><![CDATA[bzoj3337 ORZJRY I]]></title><link>https://blog.csdn.net/wanherun/article/details/79176577</link><guid>https://blog.csdn.net/wanherun/article/details/79176577</guid><author>wanherun</author><pubDate>Sat, 27 Jan 2018 08:08:58 +0800</pubDate><description><![CDATA[题目

哇，好繁琐的一道数据结构题，居然有11个丧心病狂的操作。

据说正解是块状链表，但写起来特别麻烦，要接近400行才能写完，而且有些操作比较难维护。

这个时候，就要用一些黑科技了，叫odt，，全名是什么我也不太清楚，在处理随机意义下的含区间覆盖操作的数据结构有奇效，大概思路就是用STL把相同值的一串合并在一起算。

typedef pairint,int> pii;
struct line]]></description><category></category></item><item><title><![CDATA[bzoj3028 食物]]></title><link>https://blog.csdn.net/wanherun/article/details/79137986</link><guid>https://blog.csdn.net/wanherun/article/details/79137986</guid><author>wanherun</author><pubDate>Tue, 23 Jan 2018 14:01:52 +0800</pubDate><description><![CDATA[题目母函数，数学题，大概就是推公式吧。承德汉堡:1+x2+x4+⋯=11−x21+x^2+x^4+\dots=\frac{1}{1-x^2} 
可乐:1+x1+x 
鸡腿:1+x+x21+x+x^2 
蜜桃多:x+x3+x5+⋯=x1−x2x+x^3+x^5+\dots=\frac{x}{1-x^2} 
鸡块:1+x4+x8+⋯=11−x41+x^4+x^8+\dots=\frac{1}{1-x^4]]></description><category></category></item><item><title><![CDATA[bzoj3969 [WF2013]Low Power]]></title><link>https://blog.csdn.net/wanherun/article/details/79125026</link><guid>https://blog.csdn.net/wanherun/article/details/79125026</guid><author>wanherun</author><pubDate>Mon, 22 Jan 2018 07:53:00 +0800</pubDate><description><![CDATA[题目看见最大值最小，明显可以看出这是一道二分答案的题。如何判断呢。首先，我们先对原数组排序，这样每次的差最小一定会在两个相邻的数之间。所以排好序之后，判断的时候，只要从前往后扫，只要相邻两个数的差小于二分的答案x，就把它们放入一个电池，然后把剩下的电池依次放入，判断每个时刻是否可行就好了。#include<bits/stdc++.h>
#define N 1000005
using namespac]]></description><category></category></item></channel></rss>