CF1010F Tree [* easy] 给定一棵根节点为 $1$ 的二叉树 \(T\),你需要先保留一个包含 $1$ 号节点的连通块,然后给每个点确定一个权值 \(a_i\),使得对于每个点 \(u\) 都有其权值 \(a_u\) 大于等于其所有儿子的权值和 \(\sum a_v[(u,v)\i ...
分类:
其他好文 时间:
2020-11-27 11:06:06
阅读次数:
6
/** * Definition for a binary tree node. * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ /** * Return an arr ...
分类:
其他好文 时间:
2020-11-26 14:41:52
阅读次数:
8
背景 在分析Linux内核驱动的时候,有时候会看到一些acpi字样的接口。 之前一直没搞明白ACPI是什么,现在知道了。 ACPI Advanced Configuration and Power Management Interface : 用于配置与电源管理的接口,是让OS使用的。用在x86架构 ...
分类:
其他好文 时间:
2020-11-25 12:39:07
阅读次数:
6
安装: npm install vue-highlightable-input --save 引入: import HighlightableInput from "vue-highlightable-input" 页面中使用: <template> <div class="home"> <High ...
分类:
其他好文 时间:
2020-11-23 12:16:03
阅读次数:
4
You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following defin ...
分类:
其他好文 时间:
2020-11-20 12:00:39
阅读次数:
9
题目描述 题解 经典魔塔模型( 设(ai,bi)表示一个块的0/1个数,块i在块j前满足biaj<bjai,化一下变成ai/bi>aj/bj 如果没有树的限制就直接选,否则如果有一个劣的节点在上面,优的节点在下面,则选完劣的后必须要选优的,可以把优的和其父亲合并,注意相同时要先合并上面的 用堆从大到 ...
分类:
其他好文 时间:
2020-11-20 11:41:40
阅读次数:
5
CF771C Bear and Tree Jumps 题解 Problem ? 有一颗$n$个结点的树,一只熊可以从当前节点可以跳到任何与当前节点距离不超过$k$的节点。定义$f(u,v)$为熊从$u$点到$v$点所需的最少跳跃次数,那么,对于树上的所有点对$(u,v)$,$f(u,v)$的总和是多 ...
分类:
其他好文 时间:
2020-11-19 12:56:09
阅读次数:
18
一、下载spring的jar包: 地址:https://repo.spring.io/webapp/#/artifacts/browse/tree/General/libs-milestone 下载完后,所需jar包: ...
分类:
编程语言 时间:
2020-11-19 12:41:02
阅读次数:
8
索引单表调优案例 CREATE TABLE IF NOT EXISTS `article`( `id` INT(10) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, `author_id` INT(10) UNSIGNED NOT NULL, `cate ...
分类:
数据库 时间:
2020-11-18 13:16:52
阅读次数:
19
背景: 集成一个斑马无线条码打印机,报了一堆错误 classes in a single dex file methods 67667 大于 65536 后来 Unable to get provider com.open.hule.library.downloadmanager.DownloadF ...
分类:
其他好文 时间:
2020-11-17 12:14:45
阅读次数:
5