Given an integer array, your task is to find all the different possible increasing subsequences of the given array, and the length of an increasing su ...
分类:
其他好文 时间:
2017-02-10 23:36:25
阅读次数:
221
https://leetcode.com/problems/distinct-subsequences/ Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequen ...
分类:
其他好文 时间:
2017-01-06 23:47:19
阅读次数:
232
115. Distinct Subsequences 96. Unique Binary Search Trees ...
分类:
其他好文 时间:
2016-12-16 08:00:28
阅读次数:
189
http://acm.hdu.edu.cn/showproblem.php?pid=2227 用dp[i]表示以第i个数为结尾的nondecreasing串有多少个。 那么对于每个a[i] 要去找 <= a[i]的数字那些位置,加上他们的dp值即可。 可以用树状数组维护 #include <cstd ...
分类:
编程语言 时间:
2016-12-08 09:33:52
阅读次数:
228
http://www.lightoj.com/volume_showproblem.php?problem=1085 题意:求一个序列的递增子序列个数。 思路:找规律可以发现,某个数作为末尾数的种类数为所有比它小的数的情况+1。使用树状数组查找即可。 C++11 的auto在Lightoj上不能用/ ...
分类:
编程语言 时间:
2016-12-02 02:17:35
阅读次数:
195
Given a string S and a string T, count the number of distinct subsequences of T in S. (Hard) A subsequence of a string is a new string which is formed ...
分类:
其他好文 时间:
2016-11-17 23:44:23
阅读次数:
208
Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from t ...
分类:
编程语言 时间:
2016-11-02 07:26:55
阅读次数:
221
D. Friends and Subsequences 题目链接: http://codeforces.com/problemset/problem/689/D 代码: ...
分类:
其他好文 时间:
2016-09-27 13:28:40
阅读次数:
127
题目链接 http://codeforces.com/problemset/problem/689/D 代码 ...
分类:
其他好文 时间:
2016-09-26 21:44:46
阅读次数:
199
Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from t ...
分类:
其他好文 时间:
2016-09-24 17:24:21
阅读次数:
124