【Fresnel Reflection】 One of the most used types of reflections is the Fresnel reflection.One of the most used surfaces of this type of effect is the ....
分类:
其他好文 时间:
2014-09-19 19:02:35
阅读次数:
262
同Java一样,Pyton异常对象来表示异常情况。遇到错误后,引发异常,如果异常对象并未对处理或捕捉,程序就会用所谓的回溯(Traceback)来终止执行;
>>> 1/0
Traceback (most recent call last):
File "", line 1, in
ZeroDivisionError: division by zero
程序可以通过rais...
分类:
编程语言 时间:
2014-09-19 17:37:55
阅读次数:
251
Who Gets the Most Candies?
Time Limit: 5000MS
Memory Limit: 131072K
Total Submissions: 10234
Accepted: 3177
Case Time Limit: 2000MS
Description
N children are si...
分类:
其他好文 时间:
2014-09-19 15:40:15
阅读次数:
189
第一步:创建Store数据源
var myData = [];
myData.push({ 'name': '1', 'Oil_Production': '30', 'Water_Injection': '55', 'Gas_Production': '23' });
myData.push({ 'name': '2', 'Oil_Production': '20', 'Wa...
分类:
Web程序 时间:
2014-09-19 15:38:55
阅读次数:
262
这题想到思路就很简单:从两边开始,短板往中间走。可以仔细想下,为什么这样可以保证得到最大容量?首先,从两边开始肯定是没问题的,因为包括了所有的板。为什么短板往中间走就是对的?短板是限制容器容量的,如果长板往中间走,得到的容器必然比先前的容器小(宽度减小,高度不能增加)。而短板往里走,虽然宽度减小,却...
分类:
其他好文 时间:
2014-09-18 20:37:54
阅读次数:
161
题目链接:poj 2886 Who Gets the Most Candies?
题目大意:N个人围成一圈玩约瑟夫环游戏,不同的是,步长不固定,由前一个出局的人决定,给定K表示起始的人。第i个淘汰的人将获得g(i)个糖果,问说谁获得的糖果最多。g(x)为x的因子个数。
解题思路:起始g(x)是成阶段的,所以打表处理处g(x)递增值,对于每个N,一开始找到小于等于N的最大x,那么第x个淘...
分类:
其他好文 时间:
2014-09-18 19:02:24
阅读次数:
250
Bound FoundTime Limit:5000MSMemory Limit:65536KTotal Submissions:1651Accepted:544Special JudgeDescriptionSignals of most probably extra-terrestrial or...
分类:
其他好文 时间:
2014-09-16 20:29:51
阅读次数:
210
给定数组表示的十进制数,加一操作。结果依然用十进制的数组表示。这里主要注意最高位(digit[0])依然有进位,即溢出的情况。
Given a non-negative number represented as an array of digits, plus one to the number.
The digits are stored such that the most si...
分类:
其他好文 时间:
2014-09-15 21:25:19
阅读次数:
236
assert语句:用以检查某一条件是否为True,若该条件为False则会给出一个AssertionError。用法:assert type(x)=int and x>=0如果不满足后面的expression,则会弹出Traceback (most recent call last): File ....
分类:
编程语言 时间:
2014-09-15 19:16:59
阅读次数:
599
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
For example,
Given [0,1,0,2,1,0,1,3,2,1,2,1]...
分类:
移动开发 时间:
2014-09-13 21:34:25
阅读次数:
219