??
题意 求母串中子串出现的次数(长度不超过1后面100个0 显然要用大数了)
令a为子串 b为母串 d[i][j]表示子串前i个字母在母串前j个字母中出现的次数 当a[i]==b[j]&&d[i-1][j-1]!=0时 d[i][j]=d[i-1][j-1]+d[i][j-1]
(a[i]==b[j]时 子串前i个字母在母串前j个字母中出现的次数 等于 子串前i-1个字母在母串前j...
分类:
其他好文 时间:
2014-08-25 12:00:04
阅读次数:
127
Goffi and Squary Partition
Problem Description
Recently, Goffi is interested in squary partition of integers.A set X of k distinct positive integers is called squary partition of n if and ...
分类:
其他好文 时间:
2014-08-25 11:52:45
阅读次数:
208
关于access的应用笔记20140822基本完成access数据库的搭建,并且尝试了查重,不匹配项目查找,以及上传新数据等功能,表现良好。记录一下目前研究出来的sql语句:1)去除重复项Select Distinct [字段]2)选择重复项GROUP BY 字段,字段HAVING ( ( (字段)...
分类:
数据库 时间:
2014-08-24 22:04:43
阅读次数:
277
You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you cli...
分类:
其他好文 时间:
2014-08-24 22:00:03
阅读次数:
220
Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not c...
分类:
其他好文 时间:
2014-08-23 15:11:00
阅读次数:
153
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) are given. Write a program to find the minimal length of the sub...
分类:
其他好文 时间:
2014-08-23 11:22:40
阅读次数:
198
参考并转载 http://www.cnblogs.com/bhtfg538/archive/2008/11/25/1341016.htmlFirst:(8)SELECT(9)DISTINCT(11)(1)FROM(3)JOIN(2)ON(4)WHERE(5)GROUPBY(6)WITH{CUBE|R...
分类:
数据库 时间:
2014-08-23 09:57:20
阅读次数:
193
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2-...
分类:
其他好文 时间:
2014-08-22 22:22:09
阅读次数:
233
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...
分类:
其他好文 时间:
2014-08-22 21:06:19
阅读次数:
203
题目:uva10069 - Distinct Subsequences(大数+DP)
题目大意:给出字符串A , B。问能够在A中找到多少子串B,可以不连续。
解题思路:dp【i】【j】 代表从i位开始的B串在从j位开始的A串中能够找到多少种。
B【i】 == A【j】 dp【i】【j】 = dp【i - 1】【j - 1】 + dp【i】【...
分类:
其他好文 时间:
2014-08-22 12:55:38
阅读次数:
200