結果

問題 No.94 圏外です。(EASY)
ユーザー 👑 hos.lyrichos.lyric
提出日時 2015-02-24 03:09:18
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 239 bytes
コンパイル時間 219 ms
コンパイル使用メモリ 11,448 KB
実行使用メモリ 23,412 KB
最終ジャッジ日時 2023-09-06 03:39:50
合計ジャッジ時間 12,362 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,228 KB
testcase_01 AC 77 ms
15,284 KB
testcase_02 AC 77 ms
15,180 KB
testcase_03 AC 77 ms
15,108 KB
testcase_04 AC 90 ms
15,424 KB
testcase_05 AC 107 ms
15,592 KB
testcase_06 AC 159 ms
16,148 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 910 ms
23,376 KB
testcase_20 AC 78 ms
15,284 KB
testcase_21 AC 77 ms
15,144 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
$p.map{|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