Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:
其他好文 时间:
2014-11-04 14:28:24
阅读次数:
204
这题和那题类似,这题更简单。我当初就做了这题。当初的代码如下:class Solution {public: bool canJump(int A[], int n) { if (n canReach) return false; ...
分类:
其他好文 时间:
2014-11-03 01:16:46
阅读次数:
245
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4198约瑟夫变形根据f(n)=(f(n-1)+m)%n因为是求倒数第几个那么我们只要求出f(倒数第几个)的值...
分类:
其他好文 时间:
2014-11-02 19:28:41
阅读次数:
169
题目:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your max...
分类:
其他好文 时间:
2014-10-30 01:37:50
阅读次数:
247
.bashrcexport MARKPATH=$HOME/.marksfunction jump { cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"}function mark { mkdir -p "$MARKPA...
分类:
系统相关 时间:
2014-10-30 00:09:29
阅读次数:
286
前段时间下了NGUI新版本3.7.4,看到例子Endless Scroll Views,实现了循环拖动,可能会用到,先把实现步骤贴出来跟大家分享一下。1.首先新建一个背景。2.添加所需控件,类似滑动列表,稍微有点区别。创建一个空GameObject,命名为WrapContent,并Reset它的tr...
分类:
其他好文 时间:
2014-10-27 00:15:31
阅读次数:
321
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Your goal i...
分类:
其他好文 时间:
2014-10-26 14:25:29
阅读次数:
172
例如:你想调用已经实例了的Player对象里的PlayJumpTo代码里的Jump()函数private PlayJumpTo playJumpto;private GameObject playerObj; void Start() { playerObj = GameObject.Find...
分类:
编程语言 时间:
2014-10-24 00:01:20
阅读次数:
379
对象的使用方法使用对象调用变量和函数:对象.变量 对象.函数()例如创建一个Dog类并使用对象//类文件Dogclass Dog{ String name;//首字母要大写 int age; String color; void jump(){ System.out.println("jump".....
分类:
其他好文 时间:
2014-10-22 23:29:43
阅读次数:
228
Greedy 1 class Solution 3 public: 4 int jump(int A[], int n) { 5 int start = 0; 6 int end = 0; 7 int count = 0; 8 ...
分类:
其他好文 时间:
2014-10-22 21:55:42
阅读次数:
191