結果
問題 | No.482 あなたの名は |
ユーザー | mmmppp |
提出日時 | 2017-02-28 18:32:46 |
言語 | Ruby (3.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 116 bytes |
コンパイル時間 | 67 ms |
コンパイル使用メモリ | 11,456 KB |
実行使用メモリ | 45,196 KB |
最終ジャッジ日時 | 2023-09-02 17:52:19 |
合計ジャッジ時間 | 7,746 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 75 ms
15,320 KB |
testcase_02 | AC | 76 ms
15,352 KB |
testcase_03 | AC | 79 ms
15,168 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 77 ms
15,140 KB |
testcase_10 | AC | 76 ms
15,096 KB |
testcase_11 | AC | 76 ms
15,268 KB |
testcase_12 | AC | 75 ms
15,336 KB |
testcase_13 | AC | 78 ms
15,316 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 269 ms
45,040 KB |
testcase_17 | WA | - |
testcase_18 | AC | 268 ms
44,968 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | AC | 260 ms
44,840 KB |
testcase_23 | AC | 268 ms
44,904 KB |
testcase_24 | AC | 263 ms
44,932 KB |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
コンパイルメッセージ
Syntax OK
ソースコード
n,k,*d=$<.read.split.map &:to_i c=0 n.times{|i|o=i;(o>i&&c+=1;d[o],o=p,i-1)while i=d[o]} puts c>k||c+k&1>0?:NO:'YES'