传送门 设 $f[x][i]$ 表示 $x$ 的子树中,离 $x$ 最近的选择的节点距离为 $i$ 的合法方案的最大价值 设 $val[x]$ 表示节点 $x$ 的价值,首先有 $f[x][0]=val[x]$ 那么考虑子树的合并,有 $f[x][min(i,j+1)]=max(f[x][min(i ...
分类:
其他好文 时间:
2019-10-29 09:56:52
阅读次数:
86
import java.util.* /** * 378. Kth Smallest Element in a Sorted Matrix * https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/descript... ...
分类:
其他好文 时间:
2019-10-28 00:44:03
阅读次数:
96
通过traceroute我们可以知道信息从你的计算机到互联网另一端的主机是走的什么路径。当然每次数据包由某一同样的出发点(source)到达某一同样的目的地(destination)走的路径可能会不一样,但基本上来说大部分时候所走的路由是相同的。linux系统中,我们称之为traceroute,在M ...
分类:
其他好文 时间:
2019-10-27 22:57:45
阅读次数:
731
//登陆控制器 function actionLogin(){ $name=Yii::$app->request->post("name"); $pass=Yii::$app->request->post("pass"); $res= Yii::$app->db->createCommand("se ...
分类:
其他好文 时间:
2019-10-27 20:42:51
阅读次数:
85
Difficulty:easy More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/maximum-depth-of-binary-tree/ Given a binary tree, find its maximum ...
分类:
其他好文 时间:
2019-10-27 11:10:58
阅读次数:
69
很多知识没办法完全按照类来,在一个应用功能的基础上,梳理Cesium的Api的类,不断学习更新一、Cesium的视角坐标系统scene.camera (一)坐标系统:Cartesian3:三维笛卡尔(直角)坐标系,地心为原点的xyz,例x=****m,y=****m,z==****mCartogra ...
分类:
其他好文 时间:
2019-10-26 15:04:41
阅读次数:
97
启动镜像,映射主机与容器内8888端口 若要映射多个端口,可如下(该方法是在新容器新增映射端口,若想在当前容器修改新增映射端口在文章末尾): 若端口被占用(已映射过),检查下 查看容器id及开启的映射端口,进入容器 执行安装命令: ctrl+d可以直接退出容器 新启一个容器 启动已有容器 列出所有容 ...
分类:
其他好文 时间:
2019-10-24 13:59:10
阅读次数:
266
题意:给定一棵n个点带点权的树,要求从中选出一个点集,使得这些点两两之间距离都大于K,求最大点权和 n,K<=2e2,1<=a[i]<=1e5 思路:树形DP显然可做,极限是n方,然而贪心也是,还比dp好写 可以用寒假camp里cls差不多的想法 从深度大的向上贪心,暴力维护对答案的贡献,即如果贡献 ...
分类:
其他好文 时间:
2019-10-23 22:33:51
阅读次数:
101
重做undo表空间 场景: alert日志,报了如下错误: 原因 The following error is occurring in the alert.log right before the database crashes. ORA 00600: internal error code, ...
分类:
数据库 时间:
2019-10-23 11:35:52
阅读次数:
105