A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can jump on a stone, but i ...
分类:
其他好文 时间:
2018-09-23 11:58:50
阅读次数:
179
55. Jump Game Given an array of non negative integers, you are initially positioned at the first index of the array. Each element in the array represe ...
分类:
其他好文 时间:
2018-09-19 21:42:23
阅读次数:
152
一、题目 1、审题 2、分析: 给一个非负数组,数组值代表在此位置上的最大跳跃的步数。判断是否可以到达数组的末尾。 二、解答 1、思路: 采用变量 curMax 代表在 index < i 时能跳跃的最大距离,则当 curMax < i 时代表 无法到达位置 i ,即返回 false; ...
分类:
其他好文 时间:
2018-09-16 15:51:06
阅读次数:
105
题目分析: 题目是求$E(MAX_{i=1}^n(ai))$, 它等于$E(\sum_{s \subset S}{(-1)^{|s|-1}*min(s))} = \sum_{s \subset S}{(-1)^{|s|-1}*E(min(s))}$。 那么设计期望DP,令$f[i][j][k]$表示 ...
分类:
其他好文 时间:
2018-08-28 10:36:05
阅读次数:
195
iptables 指令语法:iptables [-t table] command [match] [-j target/jump] -t 参数用来指定规则表,内建的规则表有三个,分别是:nat、mangle 和 filter,当未指定规则表时,则一律视为是 filter。个规则表的功能如下: na... ...
分类:
其他好文 时间:
2018-08-18 00:52:08
阅读次数:
208
Description 一个 $n\times m$ 的棋盘,每个格子里有一个 $0 9$ 的数字。每次游戏可以选取一个没有经过的格子为起点跳任意多步,可以向右或向下跳到一个没有经过的点。每次跳需要消耗两点间的曼哈顿距离减一的能量,若每次跳的起点和终点的数字相同,可以获得该数字的能量。问 $k$ 次 ...
分类:
其他好文 时间:
2018-08-18 00:40:46
阅读次数:
114
三、页面跳转 1、方法存在的文件路径 TP5\thinkphp\library\traits\controller\Jump.php 成功跳转 $this->success(); 失败跳转 $this->error(); 2、以登录功能为例: 3、成功和失败页面的文件路径配置 application ...
分类:
其他好文 时间:
2018-08-05 00:42:20
阅读次数:
6944
"55. 跳跃游戏" 分明就是 "45. 跳跃游戏 II" 的缩水版本嘛。。??,难度高的版本居然放在了前面,把像我这种有强迫症的必须按照题号刷题的人不放在眼里么。。。 class Solution { public boolean canJump(int[] nums) { return jump ...
分类:
其他好文 时间:
2018-07-23 23:37:28
阅读次数:
197
官方文档https://github.com/ideawu/icomet/wiki如何实现的长连接:noop: 心跳消息+HTTP endless chunk以班级ID为主键,进行班级通道的创建:频道命名:class_id=10 >channel:channel_class_id_10需要区分810 ...
分类:
其他好文 时间:
2018-07-12 13:06:57
阅读次数:
131
一、 1、 2、 当{3,2,1,0,4}时,如下结果 二、 ...
分类:
其他好文 时间:
2018-07-08 17:59:36
阅读次数:
149