题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5950 题意:求解递推式f(n)=f(n-1)+2*f(n-2)+n^4。 写了个小东西,不过我的文章里式子是2*f(n-1),内容差不多。凑合看 ...
分类:
其他好文 时间:
2016-10-31 16:30:52
阅读次数:
187
1、设删除的节点为$z$,另外定义节点$x,y$如下: $y=\left\{\begin{matrix}z & z的左孩子或右孩子为空节点\\ Successor(z) & otherwise\end{matrix}\right.$ $x=\left\{\begin{matrix}y.left & ...
分类:
其他好文 时间:
2016-10-29 22:13:15
阅读次数:
306
Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or do ...
分类:
其他好文 时间:
2016-10-29 07:51:49
阅读次数:
226
1 流网络。流网络G=(V,E)是一个有向图,每条边$(u,v)\in E$有一个非负容量值$c(u,v)\geq 0$.如果$(u,v)\notin E,c(u,v)=0$.另外有一个源节点s和汇点t。 2 流。G中的流是一个实值函数$f:V\times V\rightarrow R$,满足: ( ...
分类:
其他好文 时间:
2016-10-28 20:14:51
阅读次数:
104
和merge k sorted linked list是一样的,不同就是自己要打一个包建一个类,然后建一个pq 时间复杂度是O(klogn). n = matrix.length ...
分类:
其他好文 时间:
2016-10-24 09:42:13
阅读次数:
257
Latex制作beamerlatexbeamerBeamer Theme Matrix网页给出了一般常用的主题和配色方案。tuwcvl这个主题比较简单,感觉比较适合用作实验室内的报告,可以自己修改下适合的logo。\documentclass{beamer} \usepackage{ctex} \u... ...
分类:
其他好文 时间:
2016-10-23 21:15:25
阅读次数:
273
1.tile(A,res)将数组进行重复,tile(Matrix,(m,n)),将其扩展成任一行 2.shape[0] 数组的第维维数, 3.sum(axis=0)将数组对应的列相加,axis=1,对应的行进行相加 4.argsort(x,axis=0)将数组X进行按列升序排序,x换为-x表示按列降 ...
分类:
其他好文 时间:
2016-10-23 12:03:07
阅读次数:
226
说明:没有特殊说明,二项式的下指标k都是整数(没有特殊说明,k可以取所有整数),对于上指标,r表示所有数(整数和实数),而n表示整数。 1、组合数定义:$\begin{pmatrix}r\\ k\end{pmatrix}=\left\{\begin{matrix}\frac{r(r-1)...(r- ...
分类:
其他好文 时间:
2016-10-22 17:53:28
阅读次数:
224
题解参考网上的答案,以及我自己的想法。 主要参考网站:http://codeforces.com/blog/entry/47181,http://codeforces.com/blog/entry/47185。讲的都非常仔细,我建议看这个上面的题解,开拓思路,然后就是看排行榜上大神们的答案,当然可以 ...
分类:
其他好文 时间:
2016-10-22 17:49:11
阅读次数:
283
D. Iahub and Xors Iahub does not like background stories, so he'll tell you exactly what this problem asks you for. You are given a matrix a with n ro ...
分类:
编程语言 时间:
2016-10-22 17:32:02
阅读次数:
230