传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3638 【题解】 看到k<=20就感觉很py了啊 我们用一棵线段树维护选段的过程,能选到>0的段就一直选,直到选到<0的段,每次选完把段内的数全部取相反数,意为下次取是“不取”的意思。 用线段树 ...
分类:
其他好文 时间:
2017-05-30 16:00:39
阅读次数:
240
最长公共子序列(LCS)问题 下面通过一个具体的例子来学习动态规划方法 —— 最长公共子序列问题。 最长公共子串(Longest Common Substring)与最长公共子序列(Longest Common Subsequence)的区别: 子串要求在原字符串中是连续的,而子序列则只需保持相对顺 ...
分类:
其他好文 时间:
2017-05-30 15:50:19
阅读次数:
203
Azure storage service supports two types of blobs (blob, or BLOB, stand for Binary Large OBject, i.e. an unstructured binary data): block and page blo ...
分类:
其他好文 时间:
2017-05-30 12:48:15
阅读次数:
183
LeetCode wants to give one of its best employees the option to travel among N cities to collect algorithm problems. But all work and no play makes Jac ...
分类:
其他好文 时间:
2017-05-30 00:38:18
阅读次数:
448
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 t ...
分类:
其他好文 时间:
2017-05-29 21:09:30
阅读次数:
204
參考资料 [1] 盛骤, 谢式千, 潘承毅. 概率论和数理统计[J]. 2001. [2] https://en.wikipedia.org/wiki/Maximum_likelihood [3] https://www.youtube.com/watch?v=fvNUUJuFXM0 [4] htt ...
分类:
其他好文 时间:
2017-05-29 19:54:40
阅读次数:
232
We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer arra ...
分类:
其他好文 时间:
2017-05-29 15:17:33
阅读次数:
133
一.题目 Maximum Depth of Binary Tree Total Accepted: 70693 Total Submissions: 156776My Submissions Given a binary tree, find its maximum depth. The maxim ...
分类:
其他好文 时间:
2017-05-29 10:02:05
阅读次数:
245
width = device-width:标识宽度是设备屏幕的宽度 initial-scale = 1.0 :标识初始的缩放比例 minimum-scale =0.5 :表示最小的缩放比例 maximum-scale = 2.0 :表示最大的缩放比例 user-scalable = yes :表示用 ...
分类:
移动开发 时间:
2017-05-28 19:37:46
阅读次数:
188
最大似然法,英文名称是Maximum Likelihood Method,在统计中应用很广。这个方法的思想最早由高斯提出来,后来由菲舍加以推广并命名。 最大似然法是要解决这样一个问题:给定一组数据和一个参数待定的模型,如何确定模型的参数,使得这个确定参数后的模型在所有模型中产生已知数据的概率最大。通 ...
分类:
其他好文 时间:
2017-05-28 17:28:37
阅读次数:
229