二分+dij题目 首先读一遍题目,一定要仔细读(不要问我为什么,我就是受害者qwq 你会发现最终的费用是由最长的电话线决定的,而非电话线长度和。 至此就有了一个基本思路——枚举(二分)出可能的最长电话线长度,然后对其进行dij判断。 dij思路如下: 1.已知枚举出了假定答案ans; 2.在最短路过 ...
分类:
其他好文 时间:
2019-04-06 09:56:42
阅读次数:
99
总的感受: 这里大概囊括了一下图论的基础知识,图论是一个比较考验思维的部分,尤其是后面有关二分图,网络流等的分支,对建模转化的要求还是很高的。 进入正题了: 一、最短路: 这一个部分不想多讲,虽然是很基础的一个部分,但是也很重要。 题目(稍微挂那么一两道): "Telephone Lines" 。p ...
分类:
其他好文 时间:
2019-03-27 21:05:06
阅读次数:
214
1016 Phone Bills (25 分) A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain am ...
分类:
其他好文 时间:
2019-02-25 18:52:46
阅读次数:
141
A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per minute, dependi ...
分类:
其他好文 时间:
2019-02-16 15:16:03
阅读次数:
176
题目: A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per minute, dep ...
分类:
其他好文 时间:
2019-01-23 13:03:43
阅读次数:
134
"题面" 大意:在加权无向图上求出一条从 $1$ 号结点到 $N$ 号结点的路径,使路径上第 $K + 1$ 大的边权尽量小。 思路: 由于我们只能直接求最短路,不能记录过程中的具体的边——那样会特别麻烦 所以,我们就尝试着去想更优的办法 题目中所说,能够免去 $K$ 条边的费用,那么对于要建设的边 ...
分类:
其他好文 时间:
2019-01-08 12:30:03
阅读次数:
190
A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per minute, dependi ...
分类:
其他好文 时间:
2019-01-05 19:59:48
阅读次数:
247
1.创建数据库模型的时候增加添加上注释SQLAlchemy1.2新增了comment参数telephone = db.Column(db.String(11), nullable=False, comment='电话')class User(Base): __tablename__ = 'user' ...
分类:
数据库 时间:
2019-01-04 14:34:47
阅读次数:
228
sequelize提供了批量插入数据的方法:Model.bulkCreate([…object])。 例如: let updatePhone = [{userName: '李白‘},{userName: '杜甫'}] db_erroressence.active_telephone.bulkCrea ...
分类:
其他好文 时间:
2019-01-02 15:06:34
阅读次数:
3022
"原题链接" 题目描述 :FarmerJohn打算将电话线引到自己的农场,但电信公司并不打算为他提供免费服务。于是,FJ必须为此向电信公司支付一定的费用。FJ的农场周围分布着N(13;3 2;2 5,这3对电话线杆间需要的 电话线的长度分别为4、3、9。FJ让电信公司提供那条长度为9的电话线,于是, ...
分类:
其他好文 时间:
2018-12-23 19:34:00
阅读次数:
162