結果

問題 No.94 圏外です。(EASY)
ユーザー roiti46roiti46
提出日時 2014-12-07 21:25:47
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 656 bytes
コンパイル時間 442 ms
コンパイル使用メモリ 6,584 KB
実行使用メモリ 11,344 KB
最終ジャッジ日時 2023-09-02 10:40:11
合計ジャッジ時間 10,680 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,288 KB
testcase_01 WA -
testcase_02 AC 11 ms
6,420 KB
testcase_03 WA -
testcase_04 AC 565 ms
6,360 KB
testcase_05 AC 2,847 ms
6,628 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

inf = 2**32
def warshall():
    for k in range(N):
        for i in range(N):
            for j in range(N):
                G[i][j] = min(G[i][j],G[i][k]+G[k][j])
                
def S(a,b):
    ax,ay = a; bx,by = b
    return (bx-ax)**2+(by-ay)**2
    
N = int(raw_input())
XY = [map(int,raw_input().split()) for _ in range(N)]
G = [[inf]*N for _ in range(N)]
for i in range(N-1):
    for j in range(i+1,N):
        if S(XY[i],XY[j]) <= 100:
            G[i][j] = G[j][i] = 1
warshall()

ans = 0
for i in range(N-1):
    for j in range(i+1,N):
        if G[i][j] < inf:
            ans = max(ans,S(XY[i],XY[j])**0.5+2)
print ans
0