Your intuition would tell you that there's a O(n) solution. Actually it is another stack-based problem to solve.class Solution {public: struct Rec ...
分类:
其他好文 时间:
2014-08-06 14:37:41
阅读次数:
186
function checkImgType(this_){ var filepath=$(this_).val(); var extStart=filepath.lastIndexOf("."); var ext=filepath.substring(extStart,filepat...
分类:
Web程序 时间:
2014-08-06 14:31:11
阅读次数:
200
public void GetDown(String Url) { string StringFileName = Url.Substring(Url.LastIndexOf("/") + 1); string StringFilePath ...
分类:
其他好文 时间:
2014-08-06 14:21:31
阅读次数:
173
本文将对 Wi-Fi 对等技术进行评估。 Wi-Fi 对等(P2P)支持具备适当应用的 Android 4.0 或更高版本在没有接入点的情况下通过 Wi-Fi 彼此连接。 Android Wi-Fi P2P 框架符合 Wi-Fi Direct 标准。 一般情况下,Wi-Fi Direct 支持更快的速度和更远的距离,但是所需的功耗比蓝牙连接高。...
分类:
移动开发 时间:
2014-08-06 10:27:01
阅读次数:
299
2D DP is an intuitive solution of course, but I got an MLE error, so I simplified it into a 1D DP:class Solution {public: void goDp(vector &dp, int...
分类:
其他好文 时间:
2014-08-06 06:14:40
阅读次数:
196
中国剩余定理用于求解 x≡ai(mod mi),其中mi两两互质,x有唯一解。
令M为mi的乘积,wi = M/mi,wi关于模mi的逆元为pi,即满足wi*pi + mi*qi = 1.
则上述方程组等价于 x≡ w1*p1*a1 + w2*p2*a2 +......+wk*pk*ak(mod M)..................................................
分类:
其他好文 时间:
2014-08-05 22:45:40
阅读次数:
191
String
Problem Description
You hava a non-empty string which consists of lowercase English letters and may contain at most one '?'. Let's choose non-empty substring G from S (it can be G = S...
分类:
其他好文 时间:
2014-08-05 19:29:50
阅读次数:
240
先上题目:Longest Common SubstringTime Limit: 8000/4000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4010Accepted Submissi...
分类:
其他好文 时间:
2014-08-05 18:43:09
阅读次数:
255
题目原文:
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of
S is 1000, and there exists one unique longest palindromic substring.
题意解析:
最长回文子串。就是...
分类:
其他好文 时间:
2014-08-05 15:56:59
阅读次数:
290
题目:Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partition....
分类:
编程语言 时间:
2014-08-05 13:32:29
阅读次数:
252