結果

問題 No.94 圏外です。(EASY)
ユーザー 👑 hos.lyrichos.lyric
提出日時 2015-02-24 03:07:43
言語 Ruby
(3.3.0)
結果
AC  
実行時間 951 ms / 5,000 ms
コード長 244 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 11,380 KB
実行使用メモリ 23,336 KB
最終ジャッジ日時 2023-09-08 14:22:12
合計ジャッジ時間 11,879 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,248 KB
testcase_01 AC 85 ms
15,128 KB
testcase_02 AC 83 ms
15,080 KB
testcase_03 AC 83 ms
15,084 KB
testcase_04 AC 94 ms
15,224 KB
testcase_05 AC 114 ms
15,716 KB
testcase_06 AC 167 ms
16,052 KB
testcase_07 AC 266 ms
17,356 KB
testcase_08 AC 462 ms
19,660 KB
testcase_09 AC 832 ms
23,336 KB
testcase_10 AC 814 ms
23,084 KB
testcase_11 AC 809 ms
23,288 KB
testcase_12 AC 831 ms
23,208 KB
testcase_13 AC 831 ms
23,196 KB
testcase_14 AC 827 ms
23,196 KB
testcase_15 AC 832 ms
23,128 KB
testcase_16 AC 831 ms
23,152 KB
testcase_17 AC 825 ms
23,332 KB
testcase_18 AC 820 ms
23,332 KB
testcase_19 AC 951 ms
23,328 KB
testcase_20 AC 81 ms
15,020 KB
testcase_21 AC 82 ms
15,152 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a=(1..n=gets.to_i).map{Complex(*gets.split)}
$p=*0...n
d=$p.map{|u|$p.map{|v|(a[u]-a[v]).abs}}
def r u;u==$p[u]?u:$p[u]=r($p[u])end
n.times{|u|n.times{|v|d[u][v]>10||$p[r v]=r(u)}}
z=1
n.times{|u|n.times{|v|r(u)==r(v)&&z=[z,2+d[u][v]].max}}
p z
0