题意 Farmer John想从电话公司修一些电缆连接到他农场。已知N个电线杆编号为1,2,?N,其中1号已经连接电话公司,N号为农场,有P对电线杆可连接。 现给出P对电线杆距离Ai,Bi,Li表示Ai和Bi可连接,需要长度为Li的电缆。 电话公司赞助FJ K条免费电缆,额外的支出为剩下所需电缆的最... ...
分类:
其他好文 时间:
2017-09-12 00:35:18
阅读次数:
107
最近最小生成树题目做傻了,看到题目的第一感觉就是最小生成树。。。 后面才发现是求最短路。 正解算法: 二分+spfa 二分枚举一个花费的钱(除去k对免费的),spfa跑最短路,如果最短路的长度大于二分值则说明是免费的。 如果免费的对数<=k 那么说明这个值是可行的 还得记录一下答案,再r=mid-1 ...
分类:
其他好文 时间:
2017-09-10 15:06:18
阅读次数:
162
POJ - 1328 Radar Installation POJ - 3253 Fence Repair POJ - 3662 Telephone Lines POJ - 3616 Milking Time POJ - 3666 Making the Grade POJ - 3040 Allowa ...
分类:
其他好文 时间:
2017-09-09 23:17:33
阅读次数:
152
题目描述 Farmer John wants to set up a telephone line at his farm. Unfortunately, the phone company is uncooperative, so he needs to pay for some of the c ...
分类:
其他好文 时间:
2017-09-09 18:16:46
阅读次数:
181
GOcreate table Department(Dep_Id CHAR(3) constraint PK_Dep_Id primary key not null,Depname VarChar(40) not null,Telephone char(16) null,Fax char(16) n ...
分类:
数据库 时间:
2017-09-07 12:01:02
阅读次数:
143
<!doctype html><html><head><meta charset="utf-8"><meta name="format-detection" content="telephone=no"/><meta name="viewport" content="user-scalable=no ...
分类:
其他好文 时间:
2017-09-05 00:03:46
阅读次数:
276
P1948 [USACO08JAN]电话线Telephone Lines P1948 [USACO08JAN]电话线Telephone Lines P1948 [USACO08JAN]电话线Telephone Lines 题目描述 Farmer John wants to set up a tele ...
分类:
其他好文 时间:
2017-09-03 12:10:45
阅读次数:
204
1614: [Usaco2007 Jan]Telephone Lines架设电话线 Description Farmer John打算将电话线引到自己的农场,但电信公司并不打算为他提供免费服务。于是,FJ必须为此向电信公司支付一定的费用。 FJ的农场周围分布着N(1 <= N <= 1,000)根按 ...
分类:
其他好文 时间:
2017-09-01 23:11:09
阅读次数:
386
this 关键字代表当前对象: this.属性 操作当前对象的属性; this.方法 调用当前对象的方法; 封装对象的属性时,经常会使用this关键字; eg: package imooc; public class Telephone{ private float screen; private ...
分类:
编程语言 时间:
2017-08-31 14:37:08
阅读次数:
121
题目描述 Farmer John wants to set up a telephone line at his farm. Unfortunately, the phone company is uncooperative, so he needs to pay for some of the c ...
分类:
其他好文 时间:
2017-08-30 19:57:33
阅读次数:
154