当前位置: 金沙澳门手机版网址 > 关于情感 > 正文

老乡John就有三个牧场了,但又不失名贵

时间:2019-10-18 06:09来源:关于情感
他著于汉朝 难题陈说 Description 自己出生于今世 老乡约翰的农场里有过多牧区。有的路径连接一些一定的牧区。一片有着连接的牧区称为二个牧场。可是就近日来讲,你能来看至稀有多

他著于汉朝

难题陈说 Description

自己出生于今世

老乡约翰的农场里有过多牧区。有的路径连接一些一定的牧区。一片有着连接的牧区称为二个牧场。可是就近日来讲,你能来看至稀有多个牧区通过另外路线都不联网。那样,山民John就有五个牧场了。 

任何时候间和空间不通

John想在农场里增添一条路线(注意,恰好一条)。对那条路径有以下限制: 

但自己领悟他

四个牧场的直径正是牧场中最远的三个牧区的离开(本题中所提到的全体间隔指的都以最短的偏离)。思虑如下的有5个牧区的牧场,牧区用“*”表示,路径用直线表示。每二个牧区都有和煦的坐标: 

她精致,她优美

       15,15 20,15
         D   E
         *-------*
         |   _/|
         | _/ |
         | _/  |
         |/   |
    *--------*-------*
    A    B   C
    10,10 15,10 20,10
本条牧场的直径大致是12.07106, 最远的多个牧区是A和E,它们之间的最短路线是A-B-E。 

他华丽,但又不失华贵

此处是另二个牧场: 

想去读,但又怕深奥

             *F 30,15
            / 
           _/ 
          _/  
         /   
         *------* 
         G   H
         25,10 30,10
那多个牧场都在John的农场上。John将会在七个牧场中各选一个牧区,然后用一条路线连起来,使得连通后那个新的更加大的牧场有小小的直径。 

不去读,但又昼夜惦念

在乎,倘若两条路径中途相交,大家不感觉它们是连接的。独有两条门路在同三个牧区相交,我们才以为它们是过渡的。 

待笔者知识渊博时

输入文件包含牧区、它们分别的坐标,还应该有三个之类的相反相成邻接矩阵: 

自家定会细细品读

  A B C D E F G H 
A 0 1 0 0 0 0 0 0
B 1 0 1 1 1 0 0 0
C 0 1 0 0 1 0 0 0
D 0 1 0 0 1 0 0 0
E 0 1 1 1 0 0 0 0
F 0 0 0 0 0 0 1 0
G 0 0 0 0 0 1 0 1
H 0 0 0 0 0 0 1 0
输入文件最少富含多个不接入的牧区。 

版权小说,未经《短工学》书当面教学权,严禁转发,违者将被追究法律权利。

请编制程序寻找一条连接七个不等牧场的路子,使得连上那条门路后,这么些越来越大的新牧场有小小的直径。

输入描述 Input Description

第1行: 三个整数N (1 <= N <= 150), 表示牧区数 

第2到N+1行: 每行三个整数X,Y (0 <= X ,Y<= 一千00), 表示N个牧区的坐标。注意每一个 牧区的坐标都以分裂等的。 

第N+2行到第2*N+1行: 每行李包裹涵N个数字(0或1) 表示如上文描述的对称邻接矩阵。

输出描述 Output Description

只有一行,富含三个实数,表示所求直径。数字保留六个人小数。

样例输入 Sample Input

8
10 10
15 10
20 10
15 15
20 15
30 15
25 10
30 10
01000000
10111000
01001000
01001000
01110000
00000010
00000101
00000010

样例输出 Sample Output

22.071068

数码范围及提醒 Data Size & Hint

1s

分类标签 Tags 点此打开 

 

 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 sscanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格canf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格 scanf会读空格

 

 

  1 #include<iostream>
  2 #include<cstdio>
  3 #include<cstring>
  4 #include<queue>
  5 #include<cmath>
  6 using namespace std;
  7 double maxn=1e12;
  8 double x[1001];
  9 double y[1001];
 10 double cd(int i,int j)
 11 {
 12     return sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
 13 }
 14 double map[1001][1001];
 15 double m[10001];//点i可以到达的最大距离 
 16 int main()
 17 {
 18     int n;
 19     scanf("%d",&n);
 20     for(int i=1;i<=n;i++)
 21     {
 22         scanf("%lf%lf",&x[i],&y[i]);
 23     }
 24     for(int i=1;i<=n;i++)
 25     {
 26         for(int j=1;j<=n;j++)
 27         {
 28             char kk;
 29             //scanf("%c",&kk);
 30             cin>>kk;
 31             if(kk=='1')
 32             {
 33                 double tmp=cd(i,j);
 34                 map[i][j]=tmp;
 35             }
 36             else
 37             {
 38                 map[i][j]=maxn;
 39             }
 40         }
 41     }
 42     for(int k=1;k<=n;k++)
 43     {
 44         for(int i=1;i<=n;i++)
 45         {
 46             for(int j=1;j<=n;j++)
 47             {
 48                 if(i!=j&&i!=k&&j!=k)
 49                 {
 50                     if(map[i][k]<maxn-1&&map[k][j]<maxn-1)
 51                     {
 52                         if(map[i][j]>map[i][k]+map[k][j])
 53                         {
 54                             map[i][j]=map[i][k]+map[k][j];
 55                         }
 56                     }
 57                     
 58                 }
 59                 
 60             }
 61         }
 62     }
 63     memset(m,0,sizeof(m));
 64     for(int i=1;i<=n;i++)
 65     {
 66         for(int j=1;j<=n;j++)
 67         {
 68             if(map[i][j]<maxn-1)
 69             {
 70                 if(m[i]<map[i][j])
 71                 {
 72                     m[i]=map[i][j];
 73                 }
 74             }
 75             
 76         }
 77     } 
 78     double r2=maxn;
 79     for(int i=1;i<=n;i++)
 80     {
 81         for(int j=1;j<=n;j++)
 82         {
 83             if(map[i][j]>maxn-1&&i!=j)
 84             {
 85                 double tmp=cd(i,j);
 86                 double nn=m[i]+m[j]+tmp;
 87                 if(r2>nn)
 88                 r2=nn;
 89             }
 90         }
 91     }
 92     double r1=-1;
 93     for(int i=1;i<=n;i++)
 94     {
 95         
 96         if(m[i]>r1)
 97         r1=m[i];
 98     }
 99     printf("%.6lf",max(r1,r2));
100     return 0;
101 }

 

 

编辑:关于情感 本文来源:老乡John就有三个牧场了,但又不失名贵

关键词: