码迷,mamicode.com
首页 >  
搜索关键字:number    ( 26994个结果
Leetcode: N-Queens II
Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.跟N-Queen的考虑方式完全一样,NP问题,用循环递...
分类:其他好文   时间:2014-09-11 13:46:11    阅读次数:176
oracle中job定时调用存储过程的实例
使用job模拟定时从元数据表中抽取指定数据进入目标表的过程。一、创建元数据表 --create table test_origianl create table test_original_data( id number(10,2) primary key, ...
分类:数据库   时间:2014-09-11 10:50:44    阅读次数:281
hdu1530 Maximum Clique,最大团 , DP,邻接矩阵
Given a graph G(V, E), a clique is a sub-graph g(v, e), so that for all vertex pairs v1, v2 in v, there exists an edge (v1, v2) in e. Maximum clique is the clique that has maximum number of vertex. ...
分类:其他好文   时间:2014-09-11 08:47:58    阅读次数:260
[MySQL] 分组排序取前N条记录以及生成自动数字序列,类似group by后 limit
前言:        同事的业务场景是,按照cid、author分组,再按照id倒叙,取出前2条记录出来。        oracle里面可以通过row_number() OVER (PARTITION BY cid,author ORDER BY id DESC) 表示根据cid,author分组,在分组内部根据id排序,而此函数计算的值就表示每组内部排序后的顺序编号(组内连续的唯一的),而my...
分类:数据库   时间:2014-09-10 23:58:01    阅读次数:672
Oracle -PLSQL存储过程游标当出参
包头: create or replace package ProdureceCursorData is type  curtype is ref cursor;     type type_record is record   (     deptno NUMBER(2) ,   dname  VARCHAR2(14),   loc    VARCHAR2(13) );  PR...
分类:数据库   时间:2014-09-10 22:30:51    阅读次数:374
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!