码迷,mamicode.com
首页 >  
搜索关键字:code    ( 108667个结果
Javascript 进阶 封装
js中处处是对象,面向对象的第一步当然就是封装了,由于Js中没有类的概念,所以封装起来也比较麻烦,下面介绍两种js的封装。 1、使用约定优先的原则,将所有的私有变量以_开头 /** * 使用约定优先的原则,把所有的私有变量都使用_开头 */ var Person = function (no, name, age)...
分类:编程语言   时间:2014-05-07 08:30:05    阅读次数:411
背包问题全解
类型一:可分割性的物品 此类型为贪心问题 背包问题 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描述现在有很多物品(它们是可以分割的),我们知道它们每个物品的单位重量的价值v和重量w(1<=v,w<=10);如果给你一个背包它能容纳的重量为m(10<=m<=20),你所要做的就是把物品装到背包里,使背包里的物品的价值总和最大。 ...
分类:其他好文   时间:2014-05-07 08:29:24    阅读次数:343
Deep Learning(深度学习) 学习笔记(四)
语言模型 概率语言模型 神经概率语言模型 Deeplearning...
分类:其他好文   时间:2014-05-07 08:28:47    阅读次数:431
HDU1806 Frequent values
Problem Description You are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries consisting of indices i and j (1 ≤ i ≤ j ≤ ...
分类:其他好文   时间:2014-05-07 07:59:11    阅读次数:309
稳定婚姻问题
原题POJ 3487 稳定婚姻问题的解法,男士主动,女士被动,每次找一个光棍的男士对他最满意的女士求婚,如果女士是未婚或者女士当前的未婚夫在女士心目中不如他,就把男士定为女士的未婚夫,一直进行循环。 #include #include #include #include #include #define maxn 1000 using namespace std; int pref[maxn]...
分类:其他好文   时间:2014-05-07 07:43:34    阅读次数:313
[容斥原理] zoj 2836 Number Puzzle
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1836 Number Puzzle Time Limit: 2 Seconds      Memory Limit: 65536 KB Given a list of integers (A1, A2, ..., An), and a posi...
分类:其他好文   时间:2014-05-07 07:42:49    阅读次数:332
zoj 3780 Paint the Grid Again (拓扑排序)
Paint the Grid Again Time Limit: 2 Seconds      Memory Limit: 65536 KB Leo has a grid with N × N cells. He wants to paint each cell with a specific color (either black or white). Leo has a...
分类:其他好文   时间:2014-05-07 06:56:10    阅读次数:470
POJ 1474 多边形的核(半平面交)
Video Surveillance Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 3145   Accepted: 1391 Description A friend of yours has taken the job of security officer at...
分类:其他好文   时间:2014-05-07 06:49:43    阅读次数:387
一口一个设计模式--观察者模式
在战争年代,战争双方时不时受到敌军飞机的轰炸,于是人们发明了航空警报,并派几个侦察兵放哨,一但敌机来临,立即拉响航空警报,这样所有的收听者就能听到报警逃跑。上述情节,看似平常,其实是观察者模式是完美体现。...
分类:其他好文   时间:2014-05-07 06:49:06    阅读次数:342
Android短信发送器
Xml代码: <EditText and...
分类:移动开发   时间:2014-05-07 06:27:09    阅读次数:375
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!