码迷,mamicode.com
首页 >  
搜索关键字:the most fundamental    ( 3981个结果
状态的所有权
A semaphore initialized to one, and which is used such that it only has at most one permit available, can serve as a mutual exclusionlock.This is more...
分类:其他好文   时间:2014-09-20 18:29:59    阅读次数:251
Leetcode: Pow(x, n)
Implement pow(x, n).Analysis:The most basic idea, x multiply itself n time and return. However, this strait forward approach got time excessed. O(n).N...
分类:其他好文   时间:2014-09-20 01:04:26    阅读次数:207
Fresnel Reflection
【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
Python,异常 exception
同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
Integral类型的跨平台使用
fundamental integral types or extended integral types 我们先通过下图,来了解可以跨平台使用的整数类型: 之所以我们需要以上各种明确指定宽度的int类型是因为int类型本身比较特殊,其具体的字节数同机器字长和编译器有关(标准并没有规定其具体所占的字...
分类:其他好文   时间:2014-09-19 16:57:25    阅读次数:296
POJ 2886 Who Gets the Most Candies?
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
Container With Most Water
这题想到思路就很简单:从两边开始,短板往中间走。可以仔细想下,为什么这样可以保证得到最大容量?首先,从两边开始肯定是没问题的,因为包括了所有的板。为什么短板往中间走就是对的?短板是限制容器容量的,如果长板往中间走,得到的容器必然比先前的容器小(宽度减小,高度不能增加)。而短板往里走,虽然宽度减小,却...
分类:其他好文   时间:2014-09-18 20:37:54    阅读次数:161
poj 2886 Who Gets the Most Candies?(线段树)
题目链接: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
poj2566 Bound Found
Bound FoundTime Limit:5000MSMemory Limit:65536KTotal Submissions:1651Accepted:544Special JudgeDescriptionSignals of most probably extra-terrestrial or...
分类:其他好文   时间:2014-09-16 20:29:51    阅读次数:210
每日算法之四十八:Plus One (数组表示的十进制加一进位)以及求Sqrt(x)
给定数组表示的十进制数,加一操作。结果依然用十进制的数组表示。这里主要注意最高位(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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!