题目: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 com....
分类:
编程语言 时间:
2014-07-30 05:35:03
阅读次数:
309
题目: Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [?2,1,?3,4,?1...
分类:
编程语言 时间:
2014-07-30 05:34:43
阅读次数:
319
find . -name "*.c" | xargs grep -H "hello"在当期目录下查找含有hello且后缀名为.c的文件ps ax | grep "sleep"当前正在运行的进程中是否含有sleep这个进程!!上次执行的命令cd -跳回上次进入的目录ssh jack@123.123.1...
分类:
系统相关 时间:
2014-07-29 20:56:32
阅读次数:
317
/*
find your present (2)
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/1024 K (Java/Others)
Total Submission(s): 15255 Accepted Submission(s): 5780
Problem Description
In the...
分类:
其他好文 时间:
2014-07-29 18:10:02
阅读次数:
292
HDU 1796 How many integers can you find(组合数学-容斥原理)
题目大意:
给你1个数n,再给m个数,问你1~n-1里面有多少个数能被这m个数的任意一个数整除。
解题思路:
利用容斥原理就可以解决。...
分类:
其他好文 时间:
2014-07-29 17:54:42
阅读次数:
197
Shader.CreateGPUProgram()
这个函数过程就是创建GLProgram链接Shader的一个过程,在Unity3d中的Shader.Find()是直接创建GLProgram的。
如果是自己去写引擎,GLProgram一般在初始化的时候就会创建完毕,然后用类似GLProgramManager管理。
Unity中的问题我们也可以用这个方法解决,但是Unity提供了简便方法。...
分类:
其他好文 时间:
2014-07-29 15:10:08
阅读次数:
278
find your present (2)
Time Limit: 1000/2000 MS (Java/Others) Memory Limit: 32768/1024 K (Java/Others)
Total Submission(s): 5186 Accepted Submission(s): 1513
Problem Des...
分类:
其他好文 时间:
2014-07-29 15:09:18
阅读次数:
235
项目源码中出现如下代码:
HibernateTemplate ht =……
List tempList = ht.find(String querystring);
查看api发现HibernateTemplate的find(String querystring)方法返回的是一个List对象,当时就比较纳闷了,难道Object对象能强转为Object数组?当然不能。那是为什么呢?...
分类:
系统相关 时间:
2014-07-29 15:03:08
阅读次数:
278
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring
without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo...
分类:
其他好文 时间:
2014-07-29 14:28:48
阅读次数:
218
How many integers can you find
Time Limit: 12000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 3867 Accepted Submission(s): 1088
Problem Descripti...
分类:
其他好文 时间:
2014-07-29 14:19:08
阅读次数:
236