結果

問題 No.482 あなたの名は
ユーザー mmmpppmmmppp
提出日時 2017-02-28 12:25:02
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 114 bytes
コンパイル時間 63 ms
コンパイル使用メモリ 11,512 KB
実行使用メモリ 29,620 KB
最終ジャッジ日時 2023-09-02 16:18:02
合計ジャッジ時間 5,413 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 79 ms
15,272 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 80 ms
15,168 KB
testcase_06 WA -
testcase_07 AC 78 ms
15,152 KB
testcase_08 WA -
testcase_09 AC 79 ms
14,988 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 78 ms
15,024 KB
testcase_13 WA -
testcase_14 AC 80 ms
15,272 KB
testcase_15 AC 163 ms
29,360 KB
testcase_16 AC 163 ms
29,296 KB
testcase_17 WA -
testcase_18 AC 162 ms
29,472 KB
testcase_19 AC 162 ms
29,432 KB
testcase_20 AC 163 ms
29,368 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 162 ms
29,540 KB
testcase_24 AC 162 ms
29,296 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 164 ms
29,364 KB
testcase_30 AC 80 ms
15,136 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,k,*d=$<.read.split.map &:to_i
c=-n
o=0
n.times{|i|(c+=1;d[o],o=p,d[o]-1)while d[o]}
puts c>k||c%2!=k%2?:NO:'YES'
0