原题链接在这里:https://leetcode.com/problems/shortest-way-to-form-string/ 题目: From any string, we can form a subsequence of that string by deleting some numb ...
分类:
其他好文 时间:
2020-01-17 10:01:32
阅读次数:
91
"?? ?? ??" 题意:一个字符串s,t个字符串p, 判断p是不是s的子序列 预处理 出对于字符串s, 每个位置i之后第一个字母x的位置 ,匹配子序列的时候就相当于在母串上往后跳,如果跳到母串末尾,子序列还没有结束,匹配失败。 然而!超时了QAQ,只能过八组样例,网上也只能找到过九组的,,,希望 ...
分类:
其他好文 时间:
2020-01-16 22:24:31
阅读次数:
106
题目 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$. The ...
分类:
其他好文 时间:
2020-01-16 17:22:49
阅读次数:
63
link to problem Description: Given two strings text1 and text2, return the length of their longest common subsequence. A subsequence of a string is a ...
分类:
其他好文 时间:
2020-01-06 09:54:55
阅读次数:
84
题目: 输入两个正整数 n < m < 10^6 , 输出 1 / n2 + 1 / (n + 1)2 + ...+ 1 / m2,保留5位小数。输入包含多组数据,结束标记为 n = m = 0 。提示:本题有陷阱。 样例输入: 2 4 65536 655360 0 0 样例输出: Case 1: ...
分类:
其他好文 时间:
2019-12-31 00:51:38
阅读次数:
76
1007 Maximum Subsequence Sum (25分) Given a sequence of K integers { N?1??, N?2??, ..., N?K?? }. A continuous subsequence is defined to be { N?i??, N?i ...
分类:
其他好文 时间:
2019-12-26 17:53:37
阅读次数:
90
链接:https://leetcode-cn.com/problems/longest-common-subsequence 给定两个字符串 text1 和 text2,返回这两个字符串的最长公共子序列。 一个字符串的 子序列 是指这样一个新的字符串:它是由原字符串在不改变字符的相对顺序的情况下删除 ...
分类:
其他好文 时间:
2019-12-24 13:28:39
阅读次数:
57
Description Description Given an integer matrix. Find the longest increasing continuous subsequence in this matrix and return the length of it. The lo ...
分类:
其他好文 时间:
2019-12-21 23:04:41
阅读次数:
169
Description Description Given two strings S and T. Count the number of distinct subsequences of S which equals T. A subsequence of a string is a new s ...
分类:
其他好文 时间:
2019-12-21 22:46:20
阅读次数:
101
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. The Max ...
分类:
其他好文 时间:
2019-12-21 22:45:36
阅读次数:
72