Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defi ...
分类:
其他好文 时间:
2017-04-29 16:12:05
阅读次数:
123
为什么写这一道呢,,, 因为这一道水啊,基础之基础之中的基础啊,,,,然而很简单啊,,, 简单的一道动态规划,最长上升子序列,,,LIS(Longest Increasing Subsequence) dp[i]表示第i个数结尾的最长上升子序列的长度,,,//这里是数值 初始是dp[i]=1;seg ...
分类:
其他好文 时间:
2017-04-28 23:41:12
阅读次数:
219
4月28号 1 5 Longest Palindromic Substring 分奇偶,找最大 public String longestPalindrome(String s) { int n = s.length(); if (n < 2) return s; String res = ""; ...
分类:
其他好文 时间:
2017-04-28 15:55:23
阅读次数:
178
var text=document.title;//获得页面的标题 var timerID;//定时器 function newtext() { clearTimeout(timerID); document.title=text.substring(1,text.length)+text.subs ...
分类:
Web程序 时间:
2017-04-28 13:34:34
阅读次数:
179
本人在研究Spak,最近看了很多网上的对于SPARK用Java实现二次排序的方法,对于自定义key的做法基本上都是实现Ordered<>接口,重写$greater、$greater$eq、$less、$less$eq、compare、compareTo方法,定义hashCode、equals·····感觉好麻烦,其实我们自定义key只是用..
分类:
编程语言 时间:
2017-04-28 12:01:49
阅读次数:
1000
SELECT ROW_NUMBER() OVER(ORDER BY ordered DESC) AS rownum, ordered FROM Orders ORDER BY rownum DESC ...
分类:
其他好文 时间:
2017-04-26 15:43:18
阅读次数:
106
【题目链接】 http://www.lydsy.com/JudgeOnline/problem.php?id=2225 【题目大意】 给定N个数对(xi,yi),求最长上升子序列的长度。 上升序列定义为{(xi,yi)}满足对i<j有xi<xj且yi<yj。 【题解】 CDQ分治,将每个区间按照a排 ...
分类:
其他好文 时间:
2017-04-25 23:29:14
阅读次数:
229
python调用webservice接口,这里我们使用suds包 如果没有直接cmd命令安装subs包 pip suds install 安装成功会有提示成功字样。 ------------------------------ 首先导入包 先查看一下webservice提供哪些类型及方法,之后我们才 ...
分类:
编程语言 时间:
2017-04-24 14:37:35
阅读次数:
230
521. Longest Uncommon Subsequence I find the longest uncommon subsequence of this group of two strings 解题思路: 因为求的是最长uncommon subsequence的长度,所以,如果ab长度不 ...
分类:
其他好文 时间:
2017-04-24 14:10:17
阅读次数:
146