题目描述 Farmer John's nemesis, Farmer Nhoj, has NN cows (1 \leq N \leq 10^51≤N≤105 ), conveniently numbered 1 \dots N1…N . They have unexpectedly turned ...
分类:
其他好文 时间:
2018-02-01 21:12:38
阅读次数:
185
RL学习路线 记录强化学习入门的相关算法及实现。 DP Policy Evaluation 通过以下步骤进行 同步backup ,从而 评估 一个给定的 policy : 1. 在第 $k+1$ 轮, 2. 对于所有状态 $s\in S$, 3. 更新 $v_{k+1}(s)=\sum_{a\in\ ...
分类:
其他好文 时间:
2018-01-28 20:02:56
阅读次数:
173
Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a g ...
分类:
其他好文 时间:
2018-01-13 20:52:49
阅读次数:
151
Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks.Tasks could ...
分类:
其他好文 时间:
2018-01-13 11:14:05
阅读次数:
209
XGBoost是 Extreme Gradient Boosting 的简称,Gradient Boosting是论文"Greedy Function Approximation: A Gradient Boosting Machine"中介绍的梯度提升算法。Boosting Tree树数据挖掘和机 ...
分类:
其他好文 时间:
2018-01-12 11:26:36
阅读次数:
202
一、前面简单写了一下re模块操作字符串的写法,加上正则之后 re模块才能发挥更强大的功能。 先看看常见的正则符号: 复习一下基础的re模块: 二、正则常用 ...
分类:
编程语言 时间:
2018-01-10 13:52:02
阅读次数:
178
题目链接:http://poj.org/problem?id=1698 题目: Description Alice, a charming girl, have been dreaming of being a movie star for long. Her chances will come n ...
分类:
其他好文 时间:
2017-11-26 14:02:57
阅读次数:
153
1. 什么是贪心算法? 贪心算法,又称贪婪算法(Greedy Algorithm),是指在对问题求解时,总是做出在当前看来是最好的选择。也就是说,不从整体最优解出发来考虑,它所做出的仅是在某种意义上的局部最优解。 贪婪算法是一种分阶段的工作,在每一个阶段,可以认为所做决定是最好的,而不考虑将来的后果 ...
分类:
编程语言 时间:
2017-11-04 17:56:10
阅读次数:
213
Maximum Subarray Given an array of integers, find a contiguous subarray which has the largest sum. Given the array [?2,2,?3,4,?1,2,1,?5,3], the contig ...
分类:
其他好文 时间:
2017-10-20 12:01:41
阅读次数:
114
nearest neighbor algorithm -- greedy 1开始的点A(不同则答案不同) 2选择cost最小的点D 重复 3最后回到A,加总 knn in scala --intuition /** @author wyq * @version 1.0 * @date Sun Sep ...
分类:
其他好文 时间:
2017-09-23 10:37:14
阅读次数:
234