题目大意:和spoj687类似,就是当长度相同是需要输出一个最小的字典序的序列。
解体思路:这次需要枚举所有的从i到d = i-L/i (d = i-L%i)的位置,然后记录保证最大值的同时,求出来字典序最小的。
Maximum repetition substring
Time Limit: 1000MS
Memory Limit: 65536K
...
分类:
编程语言 时间:
2015-01-26 17:03:45
阅读次数:
175
今天上传文件,发现有几张图片传不上去,检查代码发现没有问题,图片也是好的。打印出php的$_files数组,发现数组下标0-19,只有20张图片,检查PHP配置文件发现有一个参数: ;?Maximum?number?of?files?that?...
分类:
Web程序 时间:
2015-01-26 13:48:49
阅读次数:
231
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete at most two transactions. Note: You may not eng...
分类:
编程语言 时间:
2015-01-26 13:45:27
阅读次数:
200
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ...
分类:
其他好文 时间:
2015-01-26 13:26:51
阅读次数:
195
题目链接Problem StatementCodenationis sendingNof its employees to a High Profile Business Conference and the goal is to cover maximum number of presentati...
分类:
其他好文 时间:
2015-01-25 16:35:51
阅读次数:
202
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2015-01-25 11:03:14
阅读次数:
129
https://oj.leetcode.com/problems/maximum-product-subarray/Find the contiguous subarray within an array (containing at least one number) which has the ...
分类:
其他好文 时间:
2015-01-24 22:38:58
阅读次数:
254
最近在看RCNN和微软的SPP-net,其中涉及到Non-Maximum Suppression,论文中没具体展开,我就研究下了代码,这里做一个简单的总结。
假设从一个图像中得到了2000region proposals,通过在RCNN和SPP-net之后我们会得到2000*4096的一个特征矩阵,然后通过N的SVM来判断每一个region属于N的类的scores。其中,SVM的权重矩阵...
分类:
其他好文 时间:
2015-01-24 16:02:57
阅读次数:
184
Maximum GapGiven an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/spac...
分类:
其他好文 时间:
2015-01-24 15:44:53
阅读次数:
201
Given n points
on a 2D plane, find the maximum number of points that lie on the same straight line.
这道题做的时候要考虑几个edge
1. infinity
2. same points
这里我们用hashtable将得到的slope存起来,最后每过一个点将其和其他所有点的组合成的sl...
分类:
编程语言 时间:
2015-01-24 11:45:17
阅读次数:
208