Say you have an array for which the ith element isthe price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as manytransactions as you like (ie, buy one an...
分类:
其他好文 时间:
2015-01-30 09:11:13
阅读次数:
176
一步一步教你写的unity surface shader教程系列。...
分类:
编程语言 时间:
2015-01-29 14:41:34
阅读次数:
201
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete at most two transactions.
注意
You may n...
分类:
其他好文 时间:
2015-01-28 14:47:27
阅读次数:
197
poj1251 Jungle Roads
思路:最小生成树 解题报告Here
CodeForces 472D Design Tutorial: Inverse the Problem
思路:最小生成树 解题报告Here
poj1789 Truck History
思路:最小生成树 解题报告Here
...
分类:
其他好文 时间:
2015-01-28 09:59:09
阅读次数:
196
CylinderGeometry用来在三维空间内创建一个圆柱,圆锥,圆桶对象.
NOTE: 和CircleGeometry对象一样,如果我们把参数radialSeagments的值设置成4,是不是就变成了棱台了,设置成3,并且radiusTop设置成0,是不是就是金字塔了????
用法: var geometry = new THREE.CircleGeometry(5,5,20,32);
var material = new THREE.MeshBasicMaterial({color: ...
分类:
Web程序 时间:
2015-01-28 09:51:49
阅读次数:
278
PlaneGeometry用来在三维空间内创建一个平面对象.
用法: var geometry = new THREE.PlaneGeometry(5,5,20,32);
var material = new THREE.MeshBasicMaterial({color: 0x00ff00});
var plane = new THREE.Mesh(geometry,material);
scene.add(plane);
PlaneGeometry</su...
分类:
Web程序 时间:
2015-01-28 09:51:34
阅读次数:
328
从Min到Max范围内暴力一下即可。/*ID: wushuai2PROG: skidesignLANG: C++*///#pragma comment(linker, "/STACK:16777216") //for c++ Compiler#include #include #include #i...
分类:
其他好文 时间:
2015-01-27 21:45:46
阅读次数:
270
自动实例化
如果要修改任何游戏资源,通常希望在运行时修改,且修改是暂时的。例如,如果角色获得了无敌状态,可能想更改材质 (material) 的着色器 (shader),以便玩家角色形象地展示无敌的状态。该操作包含修改正在使用的材质。这种修改不是永久性的,因为我们不希望退出播放模式 (Play Mode) 时材质的着色器不同。
但是,在 Unity 中编写脚本永久修改源资源是可行的。我们从...
分类:
编程语言 时间:
2015-01-27 18:22:49
阅读次数:
231
C++要实现一个不能被继承的类有很多方法.使用友元、私有构造函数、虚继承等方式可以使一个类不能被继承,可是为什么必须是虚继承?背后的原理又是什么?
~的构造函数设置为私有的就okay。
因为那样的话,子类就没有办法访问基类的构造函数,从而就阻止了进行子类构造对象的任务实现,也就达到了不可继承的目的。
但是,假设那样,这个类我们在其它地方怎么使用呢?那这样子给...
分类:
编程语言 时间:
2015-01-27 11:17:04
阅读次数:
181
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43155725
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many tr...
分类:
其他好文 时间:
2015-01-26 22:57:31
阅读次数:
180