- 博客(8)
- 收藏
- 关注
原创 记录我的Sam模板
const int maxn = 100005;struct Sam { int next[maxn << 1][26]; int link[maxn <&amp
2018-08-28 12:45:54 428 2
原创 2018 Multi-University Training Contest 10 E. TeaTree(dfs + 启发式合并)
Recently, TeaTree acquire new knoledge gcd (Greatest Common Divisor), now she want to test you. As we know, TeaTree is a tree and her root is node 1, she have n nodes and n-1 edge, for each node i, ...
2018-08-22 21:33:59 221
原创 我终于学会了后缀自动机。
3个月前就说要学,结果真实拖到今天。 有些东西火候不到是真的学不会………….网上的教程不算多,而且大部分都是翻译作品,对自动机内各个部位的叫法五花八门,比如自动机里虚边,就有叫link(后缀链接),pre指针,fa数组(我真的不知道fa是什么的缩写)的,记录步数的有叫len的,step的(这俩倒是好理解),状态转移的有叫next的,叫trans的还有叫ch数组的(再次对大佬的起名能力感到震惊...
2018-08-15 23:46:07 5753 20
原创 崩坏3rd逆熵小说成就脚本,10秒全成就
首先感谢@povsister大佬写的脚本,技术宅拯救世界,我只是在github上偶然看到了这个脚本,忍不住想安利给更多人。我是搬运工,大佬永远是大佬。下面来介绍这个脚本的用法,实际非常简单….几句话就说完了。首先第一步,进入网址:https://github.com/povsister/bh3_antiEntropy,点击界面右上角的“star”。如果你没有github账号,就注册...
2018-08-13 19:01:49 24996 6
原创 2018 Multi-University Training Contest 5 E.Everything Has Changed(余弦定理)
Edward is a worker for Aluminum Cyclic Machinery. His work is operating mechanical arms to cut out designed models. Here is a brief introduction of his work. Assume the operating plane as a two-dimen...
2018-08-06 23:49:48 201
原创 Codeforces Round #501 (Div. 3) B.Obtaining the String
这题我不会做…..打的时候想破头也没想出怎么做。补题,研究了一下cf的ac代码,发现只需要暴力把不一样的字符换过来就好了……什么都不用去考虑…………呃,原来这样就可以了么?那就这样吧,是我脑子坏了……ac代码:#include<bits/stdc++.h>using namespace std;int main() { int n, index =...
2018-08-05 22:04:45 171
原创 2018 Multi-University Training Contest 4 A.Ascending Rating(滑窗单调队列)
题目太长了就不贴了。题目大意是给你前k个数,让你用题目给的公式生成后n - k个数,形成一个长度为n的数列。 之后在上面滑动一个长度为m的区间(窗口),对每个区间求两个东西: 1、区间最大值 2、第一个数后有多少个数比它大。 最后分别输出每个区间上述两个值与区间编号i之间异或后的和。经典的滑窗问题,需要倒着维护一个递减的单调队列。 单调队列的队头就是要找的最大的元素,而要求的第二...
2018-08-04 23:56:48 186
原创 POJ - 2777 Count Color(线段树 + 状压)
There is a very long board with length L centimeter, L is a positive integer, so we can evenly divide the board into L segments, and they are labeled by 1, 2, … L from left to right, each is 1 centime...
2018-08-02 16:58:00 270
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人