結果

問題 No.482 あなたの名は
ユーザー mmmpppmmmppp
提出日時 2017-02-28 02:17:45
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 96 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 11,388 KB
実行使用メモリ 32,560 KB
最終ジャッジ日時 2023-09-02 13:53:55
合計ジャッジ時間 6,146 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 85 ms
15,200 KB
testcase_03 AC 83 ms
15,092 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 86 ms
15,192 KB
testcase_08 WA -
testcase_09 AC 85 ms
15,144 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 84 ms
15,144 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 212 ms
32,268 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 210 ms
32,328 KB
testcase_20 WA -
testcase_21 AC 210 ms
32,304 KB
testcase_22 WA -
testcase_23 AC 212 ms
32,308 KB
testcase_24 WA -
testcase_25 AC 208 ms
32,464 KB
testcase_26 WA -
testcase_27 AC 211 ms
32,440 KB
testcase_28 WA -
testcase_29 AC 198 ms
32,316 KB
testcase_30 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,k,*d=$<.read.split.map &:to_i
s=d.sort
x=0
n.times{|i|d[i]==s[i]||x^=1}
puts k-x&1<1?:YES:'NO'
0