<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Tgotp的博客]]></title><description><![CDATA[蒟蒻...]]></description><link>https://blog.csdn.net/Tgotp</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; Tgotp]]></copyright><item><title><![CDATA[OI回忆录]]></title><link>https://blog.csdn.net/Tgotp/article/details/101809912</link><guid>https://blog.csdn.net/Tgotp/article/details/101809912</guid><author>Tgotp</author><pubDate>Tue, 01 Oct 2019 02:09:18 +0800</pubDate><description><![CDATA[原本是不打算这时候写的，计划是高考以后再写的，但是今天（2019.9.30）看到yxq写了，并且国庆刚好有时间，我也总结一下，写上我高中这一段对于我所处环境来说算是特殊的经历吧，主要也就是高中这一段竞赛经历。
序
我本来是不知道竞赛这么一回事的，初三的毕业的时候，由于当时非常喜欢班主任，学校那么一洗脑，坚定了呆在广外念书的想法，印象里是毕业那天，班主任在班里说，学校现在很厉害，组织了学生可以在暑假...]]></description><category></category></item><item><title><![CDATA[NOI2019退役记]]></title><link>https://blog.csdn.net/Tgotp/article/details/96459384</link><guid>https://blog.csdn.net/Tgotp/article/details/96459384</guid><author>Tgotp</author><pubDate>Thu, 18 Jul 2019 21:54:02 +0800</pubDate><description><![CDATA[NOI2019退役记
DAY-1:
到了广二，结果发现一大堆东西没有买，然后和xtx打车去买了一堆东西ｑｗｑ，晚上打摆
DAY0:
​	上午开幕式，下午笔试＋试机，笔试毫无悬念的100，晚上打摆
DAY1:
​	花了两个半小时写了t1,然后想到了t3正解，花了一个半小时写wa 了，最后一个小时写完了两个暴力
​	去查分的路上别人说t1大样例很水，一度很慌，最后发现t1是最思博的，放mq过不知道出题...]]></description><category></category></item><item><title><![CDATA[#2479. 「九省联考 2018」制胡窜]]></title><link>https://blog.csdn.net/Tgotp/article/details/89010099</link><guid>https://blog.csdn.net/Tgotp/article/details/89010099</guid><author>Tgotp</author><pubDate>Thu, 04 Apr 2019 07:58:14 +0800</pubDate><description><![CDATA[写起来复杂，但是说起来并不复杂的一道题。。。
首先这题如果直接考虑满足条件的会发现极为毒瘤。
反过来考虑用总方案-不满足条件的就会友好的多。
考虑如何求不满足条件的。
发现实际上本质就是用两条线穿过所有的串sl,rs_{l,r}sl,r​
设现在有mmm个串，第iii串的左右端点为li,ril_i,r_ili​,ri​
那么在不考虑离r1r_1r1​最近的lil_ili​时，答案为∑(ri+1−r...]]></description><category></category></item><item><title><![CDATA[THUWC2019滚粗记]]></title><link>https://blog.csdn.net/Tgotp/article/details/86616073</link><guid>https://blog.csdn.net/Tgotp/article/details/86616073</guid><author>Tgotp</author><pubDate>Wed, 23 Jan 2019 19:16:11 +0800</pubDate><description><![CDATA[菜鸡是永远不可能翻盘的。
以下流水账警告。
DAY 0:
坐高铁到了广州，热的一比，换了一套衣服，找xtx面基，然后回去找psj打了一场cf，就睡觉了。
DAT 1：
带了一点东西就匆忙去了广二，发了一些东西吃过午饭就马上去体育场打了第一场比赛。
听说往年打完暴力一等约很稳?考之前一直想着策略，但是事实上最后并没有用到。
上来看T1，感觉挺可做的，yy了个菜鸡莫队，加了玄学参数搞了63，就已经过去...]]></description><category></category></item><item><title><![CDATA[5104: Fib数列]]></title><link>https://blog.csdn.net/Tgotp/article/details/84936432</link><guid>https://blog.csdn.net/Tgotp/article/details/84936432</guid><author>Tgotp</author><pubDate>Mon, 10 Dec 2018 10:48:52 +0800</pubDate><description><![CDATA[首先发现递推是解决不了这个问题的.
考虑用通项公式解决.
有公式fn=15((1+52)n−(1−52)n)f_n=\frac{1}{\sqrt 5}((\frac{1+\sqrt 5}{2})^n-(\frac{1-\sqrt 5}{2})^n)fn​=5​1​((21+5​​)n−(21−5​​)n)
那么即求解:
a≡15((1+52)n−(1−52)n)(mod&amp;amp;ThinSpace...]]></description><category></category></item><item><title><![CDATA[noip2018游记]]></title><link>https://blog.csdn.net/Tgotp/article/details/84592577</link><guid>https://blog.csdn.net/Tgotp/article/details/84592577</guid><author>Tgotp</author><pubDate>Wed, 28 Nov 2018 21:11:49 +0800</pubDate><description><![CDATA[骗点访问量（好久之前写的）
添加链接描述

]]></description><category></category></item><item><title><![CDATA[#6398. 「THUPC2018」生生不息 / Lives]]></title><link>https://blog.csdn.net/Tgotp/article/details/84573480</link><guid>https://blog.csdn.net/Tgotp/article/details/84573480</guid><author>Tgotp</author><pubDate>Tue, 27 Nov 2018 21:03:58 +0800</pubDate><description><![CDATA[放一份爆搜代码(能跑过所有数据，5 5 在十分钟左右？）：
#include&amp;amp;lt;bits/stdc++.h&amp;amp;gt;
#define rep(i,x,y) for(register int i = x;i &amp;amp;lt;= y; ++ i)
#define repd(i,x,y) for(register int i = x;i &amp;amp;gt;= y; -- i)
using namespace std;
...]]></description><category></category></item><item><title><![CDATA[5372: [Pkusc2018]神仙的游戏]]></title><link>https://blog.csdn.net/Tgotp/article/details/80644767</link><guid>https://blog.csdn.net/Tgotp/article/details/80644767</guid><author>Tgotp</author><pubDate>Sun, 10 Jun 2018 21:01:17 +0800</pubDate><description><![CDATA[这题务必用fft写，反正ntt我bzoj一直tle，loj 8s

做这题首先要知道一个性质，如果选取长度为len的串，那么该串可行，一定满足不存在一对 01，其距离相差len 
（X而不是一开始我想的类似 另外一个fft的题… 
那么如果存在一对01其距离差为len,那么对于所有k|len的串都不可行。 
考虑首先求出所有01串的差值len， 暴力n^2肯定不行 
考虑两个数组a,b，若s[i]...]]></description><category></category></item><item><title><![CDATA[4237: 稻草人]]></title><link>https://blog.csdn.net/Tgotp/article/details/80532994</link><guid>https://blog.csdn.net/Tgotp/article/details/80532994</guid><author>Tgotp</author><pubDate>Fri, 01 Jun 2018 09:01:36 +0800</pubDate><description><![CDATA[考虑两个点x,yx,yx,y不能构成一个合法方案， 
必须满足对于存在点zzz 满足 
 a[x].x&amp;lt;a[z].x&amp;lt;a[y].xa[x].x&amp;lt;a[z].x&amp;lt;a[y].x a[x].x &lt; a[z].x &lt; a[y].x  和a[x].y&amp;lt;a[z].y&amp;lt;a[y].ya[x].y&amp;lt;a[z].y&amp;lt;a[y].ya[x].y &lt; a[z].y &lt; a[y]....]]></description><category></category></item><item><title><![CDATA[F. Isomorphic Strings]]></title><link>https://blog.csdn.net/Tgotp/article/details/80412303</link><guid>https://blog.csdn.net/Tgotp/article/details/80412303</guid><author>Tgotp</author><pubDate>Tue, 22 May 2018 21:40:41 +0800</pubDate><description><![CDATA[仔细读题后发现就是每个字母对应的f都要相同。 
那么就把每个字母单独提出来处理即可。 
然后找到第一个该字符所匹配的字母，然后看两串是否相同 
hash即可 
c++代码如下：



#include&amp;lt;bits/stdc++.h&amp;gt;
#define lowbit(x) (x &amp;amp; -x)
#define rep(i,x,y) for(register int i = x ;i &amp;l...]]></description><category></category></item><item><title><![CDATA[G. Team Players]]></title><link>https://blog.csdn.net/Tgotp/article/details/80412225</link><guid>https://blog.csdn.net/Tgotp/article/details/80412225</guid><author>Tgotp</author><pubDate>Tue, 22 May 2018 21:35:42 +0800</pubDate><description><![CDATA[直接上容斥， 
然后暴力判断。 
搞定… 
c++ 代码如下：

#include&amp;lt;bits/stdc++.h&amp;gt;
#define lowbit(x) (x &amp;amp; -x)
#define rep(i,x,y) for(register int i = x ;i &amp;lt;= y; ++ i)
#define repd(i,x,y) for(register int i = x ; i...]]></description><category></category></item><item><title><![CDATA[2811: [Apio2012]Guard]]></title><link>https://blog.csdn.net/Tgotp/article/details/80398642</link><guid>https://blog.csdn.net/Tgotp/article/details/80398642</guid><author>Tgotp</author><pubDate>Mon, 21 May 2018 21:53:45 +0800</pubDate><description><![CDATA[花了一天时间颓废这道题（颓废才是重点。。。） 
贪心的想，从左望右，对于可以放的位置，放在最后一定能得到最优解，反之亦然 
那么先考虑处理掉所有0的区间，然后离散化。 
然后处理出对于每个区间最少花多少代价处理出来。（前缀 ，后缀） 
那么容易想到，如果离散化后只有k个点，那么直接输出答案即可。 
并且 如果区间大小为1 也必须直接输出。 
除此之外，所有输出的点一定是当前区间的右端点。 
那么考...]]></description><category></category></item><item><title><![CDATA[#484 F. The Meeting Place Cannot Be Changed]]></title><link>https://blog.csdn.net/Tgotp/article/details/80372124</link><guid>https://blog.csdn.net/Tgotp/article/details/80372124</guid><author>Tgotp</author><pubDate>Sat, 19 May 2018 10:28:46 +0800</pubDate><description><![CDATA[异常暴力的算法. 
就是枚举每个点当作答案，然后判断当前点是否可行。。。 
不过要按照每个点的度数先来排序。 
就这样… 
c++代码如下：

#include&amp;lt;bits/stdc++.h&amp;gt;
#define rep(i,x,y) for(register int i = x ; i &amp;lt;= y; ++ i)
#define repd(i,x,y) for(register int ...]]></description><category></category></item><item><title><![CDATA[Codeforces Round #484 (Div. 2) E. Billiard]]></title><link>https://blog.csdn.net/Tgotp/article/details/80364452</link><guid>https://blog.csdn.net/Tgotp/article/details/80364452</guid><author>Tgotp</author><pubDate>Fri, 18 May 2018 14:54:06 +0800</pubDate><description><![CDATA[首先容易想到暴力枚举，，， 
代码:



#include&amp;lt;bits/stdc++.h&amp;gt;
#define PI acos(-1)
#define rep(i,x,y) for(register int i = x; i &amp;lt;= y; ++ i)
#define repd(i,x,y) for(register int i = x; i &amp;gt;= y; -- i)
#define...]]></description><category></category></item><item><title><![CDATA[3569: DZY Loves Chinese II]]></title><link>https://blog.csdn.net/Tgotp/article/details/80244818</link><guid>https://blog.csdn.net/Tgotp/article/details/80244818</guid><author>Tgotp</author><pubDate>Tue, 08 May 2018 19:54:30 +0800</pubDate><description><![CDATA[三倍经验… 
这个给边随机化我似乎在那里见过？ 
…大概就是给边分为树边和非树边，非树边的值是随机的，树边的边是子树的非树边的异或和 
然后线性基搞一搞就好了 
c++代码如下：

#include&amp;lt;bits/stdc++.h&amp;gt;
#define rep(i,x,y) for(register int i = x ;i &amp;lt;= y; ++ i)
#define repd(i,x,y)...]]></description><category></category></item><item><title><![CDATA[5312: 冒险]]></title><link>https://blog.csdn.net/Tgotp/article/details/80236125</link><guid>https://blog.csdn.net/Tgotp/article/details/80236125</guid><author>Tgotp</author><pubDate>Tue, 08 May 2018 10:43:38 +0800</pubDate><description><![CDATA[题解：链接 
c++代码如下：

#include&amp;lt;bits/stdc++.h&amp;gt;
#define rep(i,x,y) for(register int i = x ;i &amp;lt;= y; ++ i)
#define repd(i,x,y) for(register int i = x ; i &amp;gt;= y; -- i)
using namespace std;
typedef lo...]]></description><category></category></item><item><title><![CDATA[5313: 新Fib数列]]></title><link>https://blog.csdn.net/Tgotp/article/details/80231482</link><guid>https://blog.csdn.net/Tgotp/article/details/80231482</guid><author>Tgotp</author><pubDate>Mon, 07 May 2018 20:59:21 +0800</pubDate><description><![CDATA[很明显在%5的意义下只会有 0 1 2 3 4 这几个取值

且由于fib数列由前两项推出，那么很显然打个表就行了，，，

c++代码如下：



#define rep(i,x,y) for(register int i = x; i &amp;lt;= y; ++ i)
using namespace std;
template&amp;lt;typename T&amp;gt;inline void read(T&amp;...]]></description><category></category></item><item><title><![CDATA[2396: 神奇的矩阵]]></title><link>https://blog.csdn.net/Tgotp/article/details/80221357</link><guid>https://blog.csdn.net/Tgotp/article/details/80221357</guid><author>Tgotp</author><pubDate>Mon, 07 May 2018 09:34:17 +0800</pubDate><description><![CDATA[一开始想了个fft 时间复杂度O(t∗n2log&amp;nbsp;n2)O(t∗n2log&amp;nbsp;n2) O( t * n^2 log\ {n^2}) 应该超时了… 
然后看了题解… 随机化… 
c++代码如下：




#include&amp;lt;bits/stdc++.h&amp;gt;
#define rep(i,x,y) for(register int i = x ; i &amp;lt;= y; ++ i)...]]></description><category></category></item><item><title><![CDATA[3670: [Noi2014]动物园]]></title><link>https://blog.csdn.net/Tgotp/article/details/80206976</link><guid>https://blog.csdn.net/Tgotp/article/details/80206976</guid><author>Tgotp</author><pubDate>Sat, 05 May 2018 16:25:42 +0800</pubDate><description><![CDATA[仔细看完题以后，发现肯定和kmp有关，先搞出 next 数组

然后发现答案就是某一个next &amp;lt; i/2时的值

但是这个样子的话极限情况时n^2，发现瓶颈在于找next，然后考虑倍增一下就出来了.

注意卡常

c++代码如下：



#include&amp;lt;bits/stdc++.h&amp;gt;
#define rep(i,x,y) for(register int i = x ; i &amp;...]]></description><category></category></item><item><title><![CDATA[3083: 遥远的国度]]></title><link>https://blog.csdn.net/Tgotp/article/details/80202803</link><guid>https://blog.csdn.net/Tgotp/article/details/80202803</guid><author>Tgotp</author><pubDate>Sat, 05 May 2018 09:48:05 +0800</pubDate><description><![CDATA[唔，没初始化 wa了一次… 
思路很一眼。 
就是说 考虑 树剖 
如果 查询点是首都的祖先，那么查询点构成的子树就是 整个树除了 查询点包含 首都的儿子以外所有点。 
那么 知道一个子树在树剖上是连续一段区间， 即 现在需要求 出 包含首都的那棵子树的根， 
用类似倍增lca的方法即可。 
对于查询点不是首都的祖先的情况，答案直接为 查询点这棵子树 的答案 
搞定 
c++代码如下：

#inc...]]></description><category></category></item></channel></rss>