結果
問題 | No.482 あなたの名は |
ユーザー | mmmppp |
提出日時 | 2017-02-13 18:00:58 |
言語 | Ruby (3.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 166 bytes |
コンパイル時間 | 37 ms |
コンパイル使用メモリ | 11,480 KB |
実行使用メモリ | 35,392 KB |
最終ジャッジ日時 | 2023-08-28 15:36:33 |
合計ジャッジ時間 | 5,339 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 79 ms
19,676 KB |
testcase_01 | RE | - |
testcase_02 | AC | 76 ms
15,140 KB |
testcase_03 | AC | 76 ms
15,140 KB |
testcase_04 | AC | 77 ms
15,256 KB |
testcase_05 | AC | 79 ms
15,284 KB |
testcase_06 | AC | 80 ms
15,188 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 79 ms
15,176 KB |
testcase_12 | AC | 82 ms
15,100 KB |
testcase_13 | WA | - |
testcase_14 | AC | 79 ms
15,148 KB |
testcase_15 | TLE | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
コンパイルメッセージ
Syntax OK
ソースコード
n,k,*d=$<.read.split.map &:to_i i,z=0,[] n.times{ m=i+1 j=d.index m next(i=m)if d[i]==m || z[j]==0 z[i],i=0,j } c=z.count 0 puts c<=k&&(k-c)&1==0 ? :YES : :NO