結果

問題 No.482 あなたの名は
ユーザー mmmpppmmmppp
提出日時 2017-03-01 19:16:22
言語 Ruby
(3.3.0)
結果
TLE  
(最新)
OLE  
(最初)
実行時間 -
コード長 115 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 11,292 KB
実行使用メモリ 51,092 KB
最終ジャッジ日時 2023-09-03 16:43:50
合計ジャッジ時間 43,890 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
15,168 KB
testcase_01 AC 78 ms
15,284 KB
testcase_02 AC 73 ms
15,172 KB
testcase_03 AC 72 ms
15,084 KB
testcase_04 AC 69 ms
15,144 KB
testcase_05 AC 70 ms
15,176 KB
testcase_06 AC 70 ms
15,116 KB
testcase_07 AC 81 ms
15,408 KB
testcase_08 AC 80 ms
15,076 KB
testcase_09 AC 76 ms
15,072 KB
testcase_10 AC 84 ms
15,156 KB
testcase_11 AC 87 ms
15,300 KB
testcase_12 AC 87 ms
15,416 KB
testcase_13 AC 82 ms
15,192 KB
testcase_14 AC 81 ms
15,064 KB
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 TLE -
testcase_22 TLE -
testcase_23 TLE -
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
testcase_30 AC 302 ms
15,040 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval'N,K,*D='+$<.read.split*?,
c=0
N.times{|i|o=i;(o>i&&c+=1;D[o],o=p,N-1)while N=D[o]}
puts c>K||c+K&1>0?:NO:'YES'
0