Background Before Albanian people could bear with the freedom of speech (this story is fully described in the problem "Freedom of speech"), another fr ...
分类:
编程语言 时间:
2017-12-11 11:24:55
阅读次数:
185
11.18 软院新生杯 rank: 1 4道FB,靠着罚时拿第一。。 11.25 计院冬季赛#1 rank: 1 不到4h就AK了23333 11.26 计院冬季赛#2 rank: 2 罚时输给了大二集训队的wcd大佬。。。 12.2 软院选拔赛#1 rank: 2 wl太强了,浙江dalao。。 ...
分类:
其他好文 时间:
2017-12-10 22:47:12
阅读次数:
218
The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same consecutive substrings. For e ...
分类:
编程语言 时间:
2017-12-10 15:16:36
阅读次数:
177
后缀数组 先开始nc了,觉得自动机做法是指数级的,就写了个后缀数组 具体方法是暴力,枚举起点,然后用lcp向后暴力匹配,如果失配就减少一次,我们一共有3次机会,这样每次匹配复杂度是O(1)的,所以总复杂度是O(nlogn+n),然后t掉了,交了发别人代码,bzoj怎么那么慢,洛谷跑的飞快。调了很长时 ...
分类:
其他好文 时间:
2017-12-10 14:46:19
阅读次数:
146
问题: The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his mother is getting ill. Being w ...
分类:
编程语言 时间:
2017-12-10 12:43:11
阅读次数:
226
之前觉得后缀自动机会了,就忽略了后缀数组,现在发现后缀数组+二分的功能很强,而且后缀自动机好像实现不了。 转发一下,方便队友大概看一下。这几天我也尽快恶补一下。 (找不到原博主网站了,失误) 后缀数组解题总结: 1、求单个子串的不重复子串个数。SPOJ 694、SPOJ 705. 这个问题是一个特殊 ...
分类:
编程语言 时间:
2017-12-10 11:17:18
阅读次数:
252
Given a string, we need to find the total number of its distinct substrings. Input T- number of test cases. T<=20;Each test case consists of one strin ...
分类:
编程语言 时间:
2017-12-10 11:17:03
阅读次数:
176
题链: http://www.lydsy.com/JudgeOnline/problem.php?id=4566 题解: 后缀数组,单调栈。把两个串A,B拼接起来,中间用没出现过的字符隔开。然后用倍增算法求出 sa[] rank[] height[]接着用单调栈维护出两个数组 L[],R[],意义如... ...
分类:
其他好文 时间:
2017-12-09 19:32:35
阅读次数:
185
题链: http://www.lydsy.com/JudgeOnline/problem.php?id=4453 题解: 后缀数组,离线询问,栈看了一堆题解才看懂,太弱啦 ~ 如果对于一个区间[l,r]有两个后缀i,j,(令 irank[j],那么i肯定比j优。2).如果rank[i]=r?j+1,... ...
分类:
其他好文 时间:
2017-12-09 19:21:15
阅读次数:
167
Time limit per test: 1.0 seconds Memory limit: 256 megabytes Time limit per test: 1.0 seconds Memory limit: 256 megabytes Time limit per test: 1.0 sec ...
分类:
编程语言 时间:
2017-12-09 14:00:50
阅读次数:
232