1085 - All Possible Increasing SubsequencesPDF (English)StatisticsForumTime Limit:3 second(s)Memory Limit:64 MBAn increasing subsequence from a sequen...
分类:
编程语言 时间:
2015-04-26 01:19:26
阅读次数:
236
既然这个是资格赛, 时间也比较充裕, 我就讲解一下我做题的过程
Time Limit:2000ms
Case Time Limit:1000ms
Memory Limit:256MB
Description
Given a string, calculate the number of subsequences that are palindrome. ...
分类:
其他好文 时间:
2015-04-18 13:10:38
阅读次数:
162
题意:
给长度为N的字符串,只存在小写字母。
问你山形的子序列有多少种,这里是子序列不是子串。
所谓的山形就是严格的递增到递减。
思路:
dp[i][j][k]代表前i个字母,前面的字母是j的k状态有多少种。
状态0为什么都没,1为上山,2为下山,3为答案状态。
滚动数组维护就好了。
代码:
#include"cstdlib"
#include"cstdio"
#include"...
分类:
其他好文 时间:
2015-04-14 09:56:15
阅读次数:
114
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:
其他好文 时间:
2015-04-10 15:29:31
阅读次数:
161
Mountain Subsequences
Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^
题目描述
Coco is a beautiful ACMer girl living in a very beautiful mountain. There are many trees and flowers on the ...
分类:
其他好文 时间:
2015-04-07 21:42:24
阅读次数:
141
转载请注明出处:http://www.cnblogs.com/fraud/ ——by fraudMountain SubsequencesTime Limit:1 SecMemory Limit:128 MBDescriptionCoco is a beautiful ACMer girl livi...
分类:
其他好文 时间:
2015-04-07 00:37:31
阅读次数:
172
uva 10069 Distinct Subsequences题目大意:给出两个字符串A和B,找出A中所有与B相同的子字符串。解题思路:if(A[j?1]==B[i?1])if(A[j - 1]==B[i - 1]) { dp[i][j]=dp[i][j]+dp[i?1][j?1];dp[i][j] = dp[i][j]+dp[i - 1][j - 1];}import java...
分类:
其他好文 时间:
2015-04-01 22:05:58
阅读次数:
146
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 the original string by deleting some (can be none)...
分类:
其他好文 时间:
2015-03-31 14:42:13
阅读次数:
138
https://leetcode.com/problems/distinct-subsequences/Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a ...
分类:
其他好文 时间:
2015-03-29 17:45:56
阅读次数:
146
Distinct Subsequences问题:Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which...
分类:
其他好文 时间:
2015-03-28 21:45:13
阅读次数:
167