码迷,mamicode.com
首页 >  
搜索关键字:rmq range minimummax    ( 10438个结果)
LeetCode Integer to Roman
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.public class Solution { public String int...
分类:其他好文   时间:2014-11-26 23:57:48    阅读次数:330
[LeetCode] Integer to Roman 整数转化成罗马数字
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.之前那篇文章写的是罗马数字转化成整数(http://www.cnblogs.com/gr...
分类:其他好文   时间:2014-11-26 16:20:50    阅读次数:244
delphi对于excel的一般操作
资料来自网络单元格设置1.设置单元格线框Excel.ActiveSheet.Range[B10:C13].Borders[N].LineStyle := xlNoneExcel.ActiveSheet.Range[B10:C13].Borders[N].Weight := xlThin边框的类型 B...
分类:Windows程序   时间:2014-11-26 16:17:35    阅读次数:356
CodeForces 487B Strip
题意: n(10^5)个人分组  每组最少L个人  每组的差异为组中人最大价值-最小价值  要求差异均不超过S  问最少分几组 思路: 假设已经知道组的区间[l,r]那么计算差异就是简单的rmq问题  可以用线段树搞 我们可以用dp[i]表示到i位置产生的最少组数 假设从i位置开始分一组  会影响到哪些dp呢  我们可以利用二分+rmq找到这个组最远延伸到哪里  从L到最远点这个区间的d...
分类:其他好文   时间:2014-11-26 14:30:17    阅读次数:204
excel vba编程,是在一段表格中插入几行后,插入行后的行整体下移,不破坏原有数据内容,
Range(Rows(3), Rows(5)).Insert shift:=xlDown1)在当前单元格处插入一行 ; 可以增加循环语句来实现插入多行Range("A10").SelectSelection.EntireRow.Insert , CopyOrigin:=xlFormatFromLe....
分类:编程语言   时间:2014-11-26 14:11:20    阅读次数:512
Leetcode-Integer to Roman
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.Solution: 1 public class Solution { 2 pu...
分类:其他好文   时间:2014-11-26 14:03:51    阅读次数:216
UnicodeDecodeError: ‘ascii’ codec can’t decode...: ordinal not in range(128 问题解决
今天在使用yum源安装时出现UnicodeDecodeError:‘ascii’codeccan’tdecodebyte0xe5inposition108:ordinalnotinrange(128原因就是python的str默认是ascii编码,和unicode编码冲突,就会报这个标题错误。那么该怎样解决呢?/usr/lib64/python2.6/optparse.py里面加入importsys r..
分类:其他好文   时间:2014-11-25 19:07:24    阅读次数:154
random模块的简单使用
1)随机挑选和排序random.choice(seq)#从序列的元素中随机挑选一个元素,比如random.choice(range(10)),从0到9中随机挑选一个整数。>>>printrandom.choice(range(10)) 7random.sample(seq,k)#从序列中随机挑选k个元素>>>printrandom.sample(range(100),10) [..
分类:其他好文   时间:2014-11-25 18:48:56    阅读次数:298
UnicodeDecodeError: ‘ascii’ codec can’t decode...: ordinal not in range(128 问题解决
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe5 in position 108: ordinal not in range(128原因就是python的str默认是ascii编码,和unicode编码冲突,就会报这个标题错误。那么该怎...
分类:其他好文   时间:2014-11-25 18:11:38    阅读次数:145
第23章 排序算法(包括merge等)
第23章 排序算法Sorting:1sortSort elements in range (function template)2stable_sortSort elements preserving order of equivalents (function template)3partial....
分类:编程语言   时间:2014-11-25 12:13:51    阅读次数:326
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!