300. Longest Increasing Subsequence https://leetcode.com/problems/longest-increasing-subsequence/solution/ Solution 1: dp Time O(n^ 2) Solution 2: bin ...
分类:
其他好文 时间:
2018-08-28 22:01:15
阅读次数:
146
Description A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence ( a1, a2, ..., aN) be any seq ...
分类:
其他好文 时间:
2018-08-26 15:42:02
阅读次数:
161
Description A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) ar ...
分类:
其他好文 时间:
2018-08-25 14:09:00
阅读次数:
131
原题如下: Subsequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 21032 Accepted: 8975 Description A sequence of N positive integers (10 < ...
分类:
其他好文 时间:
2018-08-21 10:41:38
阅读次数:
162
Given a sequence of K integers { N~1~, N~2~, ..., N~K~ }. A continuous subsequence is defined to be { N~i~, N~i+1~, ..., N~j~ } where 1 <= i <= j <= K ...
分类:
其他好文 时间:
2018-08-21 01:04:37
阅读次数:
186
尺取法 Subsequence(POJ 3061) 原题如下: Subsequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20969 Accepted: 8948 Description A sequence of ...
分类:
其他好文 时间:
2018-08-20 23:52:27
阅读次数:
402
Codeforces Round #504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) A. Single Wildcard Pattern Matching 题意就是匹配字符的题目,打比赛的时候没有看到只有一个" * ",然后就写挫了, ...
分类:
其他好文 时间:
2018-08-19 18:02:21
阅读次数:
217
Time limit2000 ms Memory limit65536 kB A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence ( ...
分类:
其他好文 时间:
2018-08-19 00:49:54
阅读次数:
153
"题目链接" 题目大意 给你几个字符串$(1 Solution 区间DP。 比较典型的例题。 状态定义: 令 $f[i][j]$ 表示 $i$ 到 $j$ 的回文序列个数,$s$ 为给出的字符串. 状态转移: 1. $s[i]\neq s[j]$ 那么此时 $f[i][j]$ 即为$f[i][j 1 ...
分类:
其他好文 时间:
2018-08-12 21:40:10
阅读次数:
146
一道比较套路的题,看到 数据范围 就差不多有想法了吧。 题目大意:给一个数列和$m$,在数列任选若干个数,使得他们的和对$m$取模后最大 取膜最大,好像不能DP/贪心/玄学乱搞啊。$n\le35$?果断 meet in middle 考虑我们已经搜出了序列前一半的解,那么怎么根据后面的结果合并出结果 ...
分类:
其他好文 时间:
2018-08-05 20:22:34
阅读次数:
237