码迷,mamicode.com
首页 >  
搜索关键字:ugly number    ( 27156个结果
hdu 1394 Minimum Inversion Number
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1394思路:先求逆序数,然后有个技巧(真坑)......用线段树或者树状数组都可以做。移位的技巧就是逆序数是减少ant[i],而增加n-1-ant[i]的.#include #include #incl....
分类:其他好文   时间:2014-09-10 22:27:01    阅读次数:298
LeetCode Sum Root to Leaf Numbers
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:其他好文   时间:2014-09-10 22:23:11    阅读次数:265
Tomcat启动web项目报Bad version number in .class file (unable to load class ...)错误的解决方法
一、发现问题:启动 tomcat 控制台报该错误。二、原因:tomcat 的 jdk 版本和编译.class的 jdk 版本不一致。三、解决办法:步骤一:查看 MyEclipse 的 jdk 版本和位置:Window—>Preferences—>Java—>Installed JRES。设置如下图所...
分类:Web程序   时间:2014-09-10 20:59:31    阅读次数:192
python operator计算模块
这个模块提供了一系列的函数操作。比如,operator.add(x,y)等于x+ya=[1,2,3]b=[5,6,7]c=map(operator.mul,a,b)c的值就为[5,12,21]abs(...)abs(a)--Sameasabs(a).add(...)add(a,b)--Sameasa+b.and_(...)and_(a,b)--Sameasa&b.concat(...)concat(a,b)--Sameasa+b,foraandbseq..
分类:编程语言   时间:2014-09-10 19:48:01    阅读次数:310
print all unique solution to split number n
print all unique solution to split number n, given choice of 1 3 5 10for example if n is 4{1, 1, 1, 1}{1, 3}思路:用DFS肯定可以求解,但需要遍历所有可能,进行剪纸之后用递推实现。主要剪枝思想...
分类:其他好文   时间:2014-09-10 19:27:20    阅读次数:144
一个很好用的php验证码类,代码和使用方法
验证码类的代码:ValidationCodewidth=$width; $this->height=$height; $this->codeNum=$codeNum; $this->checkCode=$this->createCheckCode(); $number=floor($...
分类:Web程序   时间:2014-09-10 15:47:40    阅读次数:235
浮点数NaN和INF(#IND, #INF)
NaN&INF定义 在一些情况会出现无效的浮点数,例如除0,例如负数求平方根等,像这类情况,获取到的浮点数的值是无效的。 NaN 即 Not a Number 非数字 INF 即 Infinite 无穷大...
分类:其他好文   时间:2014-09-10 14:17:40    阅读次数:908
vmstat命令
Usage: vmstat [options] [delay [count]]Options: -a, --active active/inactive memory -f, --forks number of forks since boot -m, --...
分类:其他好文   时间:2014-09-10 14:02:10    阅读次数:206
JS金额小写转大小形式
1functionconvertCurrency(currencyDigits){2//Constants:3varMAXIMUM_NUMBER=99999999999.99;4//Predefinetheradixcharactersandcurrencysymbolsforoutput:5/*6...
分类:Web程序   时间:2014-09-10 13:54:10    阅读次数:265
poj 2607 Fire Station (spfa)
Fire Station Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 3783   Accepted: 1337 Description A city is served by a number of fire stations. Some resident...
分类:其他好文   时间:2014-09-10 12:31:20    阅读次数:244
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!