結果

問題 No.13 囲みたい!
ユーザー hogeover30hogeover30
提出日時 2017-02-02 02:46:18
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 159 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 11,416 KB
実行使用メモリ 16,760 KB
最終ジャッジ日時 2023-08-25 17:06:41
合計ジャッジ時間 2,625 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,104 KB
testcase_01 AC 83 ms
15,044 KB
testcase_02 AC 82 ms
15,148 KB
testcase_03 AC 90 ms
16,700 KB
testcase_04 AC 90 ms
16,628 KB
testcase_05 WA -
testcase_06 AC 88 ms
16,744 KB
testcase_07 WA -
testcase_08 AC 92 ms
16,692 KB
testcase_09 AC 91 ms
16,652 KB
testcase_10 AC 83 ms
15,468 KB
testcase_11 AC 88 ms
16,308 KB
testcase_12 AC 83 ms
15,252 KB
testcase_13 AC 85 ms
15,744 KB
testcase_14 AC 84 ms
15,572 KB
testcase_15 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval'W,H,*A='+$<.read.split*?,
p=*i=0...W*H
r=->u{u==p[u]?u:p[u]=r[p[u]]}
print i.any?{|z|[z+W,z+1].any?{|e|A[z]==A[e]&&(p[u=r[z]]=r[e])==u}}?'':'im',:possible
0