【CF932F】Escape Through Leaf 题意:给你一棵n个点的树,每个点有树形ai和bi,如果x是y的祖先,则你可以从x花费$a_x\times b_y$的费用走到y(费用可以为负)。对于每个点,求从这个点开始走到某个叶子节点的最小费用。 $n\le 10^5,|a_i|,|b_i| ...
分类:
其他好文 时间:
2018-02-21 16:32:07
阅读次数:
140
一、中介模型:多对多添加的时候用到中介模型 自己创建的第三张表就属于是中介模型 class Article(models.Model): ''' 文章表 ''' title = models.CharField(max_length=64,verbose_name="文章标题") summary = ...
分类:
其他好文 时间:
2018-02-21 15:00:12
阅读次数:
192
In the previous post I go through basic 1 layer Neural Network with sigmoid activation function, including How to get sigmoid function from a binary c ...
分类:
其他好文 时间:
2018-02-19 10:27:42
阅读次数:
241
- 题目大意 一个人,他只会沿着如下条件的道路(A,B)走:存在一条从B出发回家的路径,比所有从A出发回家的路径都要短。我们的任务是要找出一共有有多少条不同的回家路径。 - 解题思路 先用dijkstra预处理出终点到每个点的最短路,然后将满足行走条件的A、B(除行走条件外,还要满足一个前提,即A、 ...
分类:
其他好文 时间:
2018-02-15 18:11:46
阅读次数:
248
创建: 2018/02/12 其实错误信息很多,网上搜的解决方案试一下又报出其他错误。所以就贴几个错误,排序部分先后。 错误1: 错误2: 错误3: 解决方案: 找了半天才找到的 ...
分类:
数据库 时间:
2018-02-12 16:50:34
阅读次数:
202
Description Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N <= 500). The grid contains ...
分类:
其他好文 时间:
2018-02-12 00:24:57
阅读次数:
210
Jenkinsfile https://jenkins.io/doc/book/pipeline/jenkinsfile/ Jenkins Pipeline is a suite of plugins that supports implementing and integrating contin ...
分类:
其他好文 时间:
2018-02-10 18:18:23
阅读次数:
217
A DFD shows what kind of information will be input to and output from the system, how the data will advance through the system, and where the data wil ...
分类:
其他好文 时间:
2018-02-09 22:35:42
阅读次数:
192
Description 已知N个正整数:A1、A2、……、An 。今要将它们分成M组,使得各组数据的数值和最平均,即各组的均方差最小。均方差公式如下: ,,其中σ为均方差,是各组数据和的平均值,xi为第i组数据的数值和。 已知N个正整数:A1、A2、……、An 。今要将它们分成M组,使得各组数据的数 ...
分类:
其他好文 时间:
2018-02-09 22:33:25
阅读次数:
153
Hyperapp is an ultra lightweight (1kb), minimal, functional, JavaScript library for building UIs. It comes with a VDOM engine and state management wit ...
分类:
移动开发 时间:
2018-02-07 19:51:34
阅读次数:
261