結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 82 ms
15,144 KB
testcase_02 AC 83 ms
15,244 KB
testcase_03 AC 84 ms
15,376 KB
testcase_04 WA -
testcase_05 AC 83 ms
15,056 KB
testcase_06 AC 83 ms
15,252 KB
testcase_07 AC 85 ms
15,240 KB
testcase_08 AC 83 ms
15,360 KB
testcase_09 AC 83 ms
15,300 KB
testcase_10 AC 87 ms
15,188 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 212 ms
32,348 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 209 ms
32,576 KB
testcase_20 WA -
testcase_21 AC 207 ms
32,344 KB
testcase_22 WA -
testcase_23 AC 207 ms
32,516 KB
testcase_24 WA -
testcase_25 AC 209 ms
32,296 KB
testcase_26 WA -
testcase_27 AC 207 ms
32,492 KB
testcase_28 WA -
testcase_29 AC 185 ms
32,568 KB
testcase_30 AC 85 ms
15,164 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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