- 博客(14)
- 收藏
- 关注
转载 BZOJ 3998 [TJOI2015]弦论
Description对于一个给定长度为N的字符串,求它的第K小子串是什么。Input第一行是一个仅由小写英文字母构成的字符串S 第二行为两个整数T和K,T为0则表示不同位置的相同子串算作一个。T=1则表示不同位置的相同子串算作多个。K的意义如题所述。Output输出仅一行,为一个数字串,为第K小的子串。如果子串数...
2018-02-28 10:04:00 50
转载 SPOJ LCS2 Longest Common Substring II + BZOJ 2946 [Poi2000]公共串
A string is finite sequence of characters over a non-empty finite set Σ. In this problem, Σ is the set of lowercase letters. Substring, also called factor, is a consecut...
2018-02-24 11:40:00 73
转载 SPOJ LCS Longest Common Substring
A string is finite sequence of characters over a non-empty finite set Σ. In this problem, Σ is the set of lowercase letters. Substring, also called factor, is a consecut...
2018-02-23 10:56:00 109
转载 算法详解——后缀自动机
DFADFA,即确定性有限状态自动机,由一个五元组M=(Σ,Q,qs,F,tr)M=(\Sigma,Q,q_s,F,tr)M=(Σ,Q,qs,F,tr)组成,其中:Σ\SigmaΣ为一个有限字符集,其中每个字符ccc称为一个输入符号;QQQ为一个有限状态集合;qs∈Qq_s\in Qqs∈Q为初始状态;F⊆QF\subset...
2018-02-22 17:39:00 90
转载 POJ 1509 Glass Beads
Once upon a time there was a famous actress. As you may expect, she played mostly Antique Comedies most of all. All the people loved her. But she was not interested in the...
2018-02-22 15:04:00 57
转载 Codeforces Round #462 (Div. 2)
由于太菜只能做出前两题……A. A Compatible Pair思路:暴力枚举。 代码:#include <cstdio>#include <algorithm>const int maxn=100;const long long inf=0x3f3f3f3f3f3f3f3f;int ...
2018-02-15 09:52:00 62
转载 BZOJ 1565 [NOI2009]植物大战僵尸
DescriptionInputOutput仅包含一个整数,表示可以获得的最大能源收入。注意,你也可以选择不进行任何攻击,这样能源收入为0。Sample Input3 2 10 0 20 0 -10 0 -5 1 0 0 100 1 2 1 100 0Sample Output25...
2018-02-13 16:44:00 42
转载 BZOJ 2127 happiness
Description高一一班的座位表是个n*m的矩阵,经过一个学期的相处,每个同学和前后左右相邻的同学互相成为了好朋友。这学期要分文理科了,每个同学对于选择文科与理科有着自己的喜悦值,而一对好朋友如果能同时选文科或者理科,那么他们又将收获一些喜悦值。作为计算机竞赛教练的scp大老板,想知道如何分配可以使得全班的喜悦值总和最大。...
2018-02-11 16:07:00 79
转载 浅谈算法——博弈论
转载说明https://www.cnblogs.com/Wolfycz/p/8430991.htmlhttps://www.luogu.org/blog/Wolfycz/qian-tan-suan-fa-bo-yi-lun-zong-ling-kai-shi-di-bo-yi-lun-post以上是原文链接,请大家资瓷原创。网上的...
2018-02-10 11:10:00 862
转载 POJ 2975 Nim
DescriptionNim is a 2-player game featuring several piles of stones. Players alternate turns, and on his/her turn, a player’s move consists of removing one or more stone...
2018-02-06 16:24:00 53
转载 POJ 2154 Color
DescriptionBeads of N colors are connected together into a circular necklace of N beads (N<=1000000000). Your job is to calculate how many different kinds of the neck...
2018-02-06 15:13:00 84
转载 BZOJ 2938 [Poi2000]病毒
题目链接权限题不放题目描述了思路建好AC自动机,用DFS判环。代码#include <cstdio>#include <cstring>const int maxn=30000;struct ac_automaton{ int son[maxn+10][2],cnt,f...
2018-02-02 12:05:00 57
转载 二分图知识点总结
最大匹配:在二分图中,最多的没有公共顶点的边的数量。(用匈牙利算法) 最小点覆盖:在二分图中,所有边至少有一个顶点在一个点集SS中,这样的点集SS的最少元素个数。(最小点覆盖=最大匹配) 最大独立点集:在二分图中,选择一些点,使得这些点两两没有边直接相连。(最大独立点集=总点数-最大匹配) DAG转化成二分图:将一个点拆分成两个点:入...
2018-02-01 17:40:00 149
转载 POJ 2503 Babelfish
DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary t...
2018-02-01 11:56:00 76
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人