結果

問題 No.94 圏外です。(EASY)
ユーザー 👑 hos.lyrichos.lyric
提出日時 2015-02-24 03:08:18
言語 Ruby
(3.2.2)
結果
AC  
実行時間 959 ms / 5,000 ms
コード長 240 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 11,236 KB
実行使用メモリ 23,432 KB
最終ジャッジ日時 2023-09-08 14:22:32
合計ジャッジ時間 12,020 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,104 KB
testcase_01 AC 85 ms
15,292 KB
testcase_02 AC 83 ms
14,992 KB
testcase_03 AC 80 ms
15,072 KB
testcase_04 AC 94 ms
15,240 KB
testcase_05 AC 114 ms
15,456 KB
testcase_06 AC 166 ms
16,132 KB
testcase_07 AC 268 ms
17,360 KB
testcase_08 AC 469 ms
19,308 KB
testcase_09 AC 822 ms
23,208 KB
testcase_10 AC 827 ms
23,324 KB
testcase_11 AC 813 ms
23,168 KB
testcase_12 AC 837 ms
23,392 KB
testcase_13 AC 829 ms
23,196 KB
testcase_14 AC 833 ms
23,180 KB
testcase_15 AC 837 ms
23,412 KB
testcase_16 AC 833 ms
23,172 KB
testcase_17 AC 834 ms
23,212 KB
testcase_18 AC 853 ms
23,432 KB
testcase_19 AC 959 ms
23,148 KB
testcase_20 AC 81 ms
15,268 KB
testcase_21 AC 80 ms
15,004 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

$p=*0...n=gets.to_i
a=$p.map{Complex(*gets.split)}
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