結果

問題 No.94 圏外です。(EASY)
ユーザー 👑 hos.lyrichos.lyric
提出日時 2015-02-24 01:44:46
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,586 ms / 5,000 ms
コード長 288 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 11,328 KB
実行使用メモリ 27,472 KB
最終ジャッジ日時 2023-09-08 14:21:57
合計ジャッジ時間 18,052 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,632 KB
testcase_01 AC 81 ms
15,180 KB
testcase_02 AC 83 ms
15,492 KB
testcase_03 AC 77 ms
15,140 KB
testcase_04 AC 97 ms
15,532 KB
testcase_05 AC 139 ms
16,128 KB
testcase_06 AC 221 ms
16,776 KB
testcase_07 AC 398 ms
18,160 KB
testcase_08 AC 729 ms
21,552 KB
testcase_09 AC 1,338 ms
27,436 KB
testcase_10 AC 1,336 ms
27,192 KB
testcase_11 AC 1,316 ms
27,452 KB
testcase_12 AC 1,333 ms
27,316 KB
testcase_13 AC 1,327 ms
27,288 KB
testcase_14 AC 1,351 ms
27,200 KB
testcase_15 AC 1,333 ms
27,352 KB
testcase_16 AC 1,339 ms
27,472 KB
testcase_17 AC 1,342 ms
27,360 KB
testcase_18 AC 1,358 ms
27,360 KB
testcase_19 AC 1,586 ms
27,204 KB
testcase_20 AC 82 ms
15,656 KB
testcase_21 AC 78 ms
15,136 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a=(1..n=gets.to_i).map{gets.split}
d=(0...n).map{|u|(0...n).map{|v|s=0;[0,1].map{|i|s+=(a[u][i].to_i-a[v][i].to_i)**2};s}}
$p=*0...n
def r u;u==$p[u]?u:$p[u]=r($p[u])end
n.times{|u|n.times{|v|d[u][v]<101&&$p[r v]=r(u)}}
a=1
n.times{|u|n.times{|v|r(u)==r(v)&&a=[a,2+d[u][v]**0.5].max}}
p a
0