码迷,mamicode.com
首页 >  
搜索关键字:spoj balnum balanced    ( 1777个结果
2018 Multi-University Training Contest 1 - B Balanced Sequence (贪心)
题意:对N个由(,)组成的字符串,求拼接后得到的最大的balance序列的长度。balance序列:空串/ A+B(A,B都是b序列)/ (+A+),A为b序列。此三种情况。 分析:在读入N每个字符串时,先将单独一个字符串中的b序列长度提取出来,记录其没有被使用的左弧L和右弧R的数目。因为要使其最后 ...
分类:其他好文   时间:2018-07-24 17:57:46    阅读次数:131
D-query SPOJ - DQUERY(莫队)统计不同数的数量
Given a sequence of n numbers a1, a2, ..., an and a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, j), you have ...
分类:其他好文   时间:2018-07-24 17:44:36    阅读次数:218
杭电多校第一场补题-1002 Balanced Sequence
1002: Balanced Sequence 题意:给定n个字符串,n的大小在1e5左右,字符串的长度也是1e5,字符串仅由‘(’或‘)’组成,合法串可以不是连续的,将这n个串按照一定的顺序排列起来,使得组合之后的字符串的合法串的长度最长。n*len的大小是1e6 思路:首先n*len的处理出来每 ...
分类:其他好文   时间:2018-07-23 23:38:46    阅读次数:317
SPOJ GSS 系列
来怒做GSS系列了; GSS1:https://www.luogu.org/problemnew/show/SP1043 这题就是维护一个 sum , mx , lmx , rmx,转移时用结构体就好了。 代码如下: GSS2:https://www.luogu.org/problemnew/sho ...
分类:其他好文   时间:2018-07-22 11:27:11    阅读次数:133
HDU 3709 Balanced Number (数位DP)
A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each digit as a box wi ...
分类:其他好文   时间:2018-07-21 14:56:30    阅读次数:122
SPOJ - DQUERY
D-query Given a sequence of n numbers a1, a2, ..., an and a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, j), ...
分类:其他好文   时间:2018-07-21 14:54:14    阅读次数:159
SPOJ - SUBST1 D - New Distinct Substrings
D - New Distinct Substrings 题目大意:求一个字符串中不同子串的个数。 裸的后缀数组 ...
分类:其他好文   时间:2018-07-20 22:27:43    阅读次数:139
SPOJ LCS2
LCS2 - Longest Common Substring II 链接 题意: 求N(N<=10)个串的最长公共子串。 分析: poj2774上那道题,对一个串建立后缀自动机,另一个在上面匹配。 这道题是对多个串求。那么同样,让每个串在后缀自动机上匹配,然后记录在后缀自动机的每个节点上记录,当前 ...
分类:其他好文   时间:2018-07-19 16:19:25    阅读次数:129
【Stanford Online】Engineering: Algorithms1 NO.13 Balanced binary search trees
...
分类:其他好文   时间:2018-07-16 23:48:31    阅读次数:365
SPOJ - AMR11A
Thanks a lot for helping Harry Potter in finding the Sorcerer's Stone of Immortality in October. Did we not tell you that it was just an online game ? ...
分类:其他好文   时间:2018-07-13 16:17:03    阅读次数:173
1777条   上一页 1 ... 25 26 27 28 29 ... 178 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!