码迷,mamicode.com
首页 > 其他好文
acdream 1032 树形dp
又是一道树上做分组背包的题目... 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int INF = 999999999; 7 const int N = 2001; 8 int value[N]; 9 i...
分类:其他好文   时间:2015-08-01 21:48:28    阅读次数:116
LeetCode#22 Generate Parentheses
Problem Definition:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a ...
分类:其他好文   时间:2015-08-01 21:48:07    阅读次数:80
arraylist和linkList区别
ForLinkedListget(int index)is O(n)add(E element)is O(1)add(int index, E element)is O(n)remove(int index)is O(n)Iterator.remove()is O(1) ListIterator.a...
分类:其他好文   时间:2015-08-01 21:46:56    阅读次数:182
中国餐馆过程(CRP)
查如何事先确定聚类簇数目发现的,是对狄利克雷过程的(DP)的一种解释。 假设一个中国餐馆有无限的桌子,第一个顾客到来之后坐在第一张桌子上。第二个顾客来到可以选择坐在第一张桌子上,也可以选择坐在一张新的桌子上,假设第n+1个顾客到来的时候,已经有k张桌子上有顾客了,分别坐了n1,n2,...,n...
分类:其他好文   时间:2015-08-01 21:47:07    阅读次数:203
dom.style.left 与 dom.offsetLeft区别
dom.style.left 初始空值,必须在html行内样式定义值才有值,在css样式定义仍为空值 可读写,是字符串,读写是必须加px,否则无效 js设置之后,有值 设置非整数值,会保持原样,例如 style.left = 8.2...
分类:其他好文   时间:2015-08-01 21:48:53    阅读次数:119
Hashtable和HashMap的区别举例
我们先看2个类的定义[java]view plaincopypublicclassHashtableextendsDictionaryimplementsMap,Cloneable,java.io.Serializable[java]view plaincopypublicclassHashMape...
分类:其他好文   时间:2015-08-01 21:48:03    阅读次数:135
acdream 1025 简单dp
最基本的在DAG上求最短路。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int INF = 999999; 7 const int N = 100001; 8 int dp[N]; 9 10 int m...
分类:其他好文   时间:2015-08-01 21:48:10    阅读次数:132
随意交易(人为)与100%机械交易(程序化)的选择
随 意交易者不遵循任何固定的交易模式,入场、止损及出场毫无规律可言,与其相对的是100%完全机械性的交易。杰出的交易者属于随意交易者,他们能打败所有 100%机械系统交易者,他们最大的优势是可以改变驱动每一笔交易的关键参数,所以他们比机械交易者更加明智地回避市场及临时改变仓位规模,如仓位可能与 信号...
分类:其他好文   时间:2015-08-01 21:48:38    阅读次数:140
高阶函数
var m = math.max _ 把方法变为函数场景:调用、传递高阶函数---匿名函数格式 (...)=>(... )匿名函数做参数Array(1,2,3,4).map((x:Int)=>x+3)等同于Array(1,2,3,4).map{(x:Int)=>x+3}等同于Array(1,2,3,...
分类:其他好文   时间:2015-08-01 21:45:21    阅读次数:115
poj 2342 Anniversary party (树形dp)
#include#include#include#includeusing namespace std;int fa[7000];int dp[7000][5];int vis[7000];int n;void dfs(int rt){ int i,j,k; vis[rt]=1; ...
分类:其他好文   时间:2015-08-01 21:47:00    阅读次数:92
[leedcode 150] Evaluate Reverse Polish Notation
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:其他好文   时间:2015-08-01 21:45:38    阅读次数:89
在线捉鬼游戏开发之二 - 设计业务对象与对象职责划分(2)
设计业务对象与对象职责划分第一部分(对已有程序的分析)的第(2)节:从代码角度剖析游戏主要业务对象与职责(俗称类里的方法)。此系列旨在开发类似“谁是卧底+杀人游戏”的捉鬼游戏在线版,记录从分析游戏开始的开发全过程,通过此项目让自己熟悉面向对象的SOLID原则,提高对设计模式、重构的理解。
分类:其他好文   时间:2015-08-01 21:47:28    阅读次数:122
ycm_extra_conf.py
# This file is NOT licensed under the GPLv3, which is the license for the rest# of YouCompleteMe.## Here's the license text for this file:## This is f...
分类:其他好文   时间:2015-08-01 21:45:45    阅读次数:241
课后练习3.
3.电信运营商客服电话using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication11{ class Program { ...
分类:其他好文   时间:2015-08-01 21:47:03    阅读次数:115
板蓝根
板蓝根(常用别名:靛青根、蓝靛根、大青根)是一种中药材。中国大陆各地均产。来源为十字花科植物菘蓝(Isatis tinctoriaL.)的根,或爵床科植物马蓝(Baphicacanthus cusia(Nees) Brem.)的根茎及根。目录[隐藏]1中药用途2毒副作用3参考文献4外部链结中药用途秋...
分类:其他好文   时间:2015-08-01 21:46:52    阅读次数:224
Extensions: Sharing Code with an Embedded FM
iOS 8 Extensions: Sharing Code with an Embedded Framework Note: Due to the NDA, this tutorial won’t?include any screenshots from Xcode 6. When iOS 8 is released, I will update the tutorial with?...
分类:其他好文   时间:2015-08-01 20:45:01    阅读次数:116
(一〇〇)使用AddressBookUI实现通讯录操作
上节提到使用AddressBook可以实现通讯录数据的获取,但有时需要用户自己选取联系人或者联系人信息,这时候就要借助AddressBookUI框架的ABPeoplePickerNavigationController控制器,该控制器可以通过modal方式展示,会提供一个功能完备的通讯录界面,并且可以监听和拦截用户的点击。 对于iOS7和iOS8,该框架有着不同的用法,下面分开讲解。 【共同点...
分类:其他好文   时间:2015-08-01 20:41:29    阅读次数:109
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!