結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー simansiman
提出日時 2021-10-31 04:53:29
言語 Ruby
(3.3.0)
結果
AC  
実行時間 464 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 46,240 KB
最終ジャッジ日時 2024-04-16 19:38:18
合計ジャッジ時間 16,548 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
12,288 KB
testcase_01 AC 84 ms
12,288 KB
testcase_02 AC 84 ms
12,160 KB
testcase_03 AC 82 ms
12,288 KB
testcase_04 AC 84 ms
12,160 KB
testcase_05 AC 85 ms
12,160 KB
testcase_06 AC 83 ms
12,032 KB
testcase_07 AC 83 ms
12,160 KB
testcase_08 AC 85 ms
12,288 KB
testcase_09 AC 82 ms
12,288 KB
testcase_10 AC 84 ms
12,288 KB
testcase_11 AC 84 ms
12,032 KB
testcase_12 AC 85 ms
12,288 KB
testcase_13 AC 86 ms
12,160 KB
testcase_14 AC 89 ms
12,288 KB
testcase_15 AC 90 ms
12,288 KB
testcase_16 AC 277 ms
33,152 KB
testcase_17 AC 410 ms
44,580 KB
testcase_18 AC 296 ms
33,920 KB
testcase_19 AC 177 ms
24,064 KB
testcase_20 AC 216 ms
24,704 KB
testcase_21 AC 461 ms
46,240 KB
testcase_22 AC 371 ms
42,624 KB
testcase_23 AC 458 ms
46,212 KB
testcase_24 AC 387 ms
44,284 KB
testcase_25 AC 377 ms
43,388 KB
testcase_26 AC 464 ms
46,240 KB
testcase_27 AC 446 ms
46,080 KB
testcase_28 AC 385 ms
43,812 KB
testcase_29 AC 438 ms
46,224 KB
testcase_30 AC 453 ms
46,100 KB
testcase_31 AC 360 ms
42,752 KB
testcase_32 AC 369 ms
45,472 KB
testcase_33 AC 372 ms
45,216 KB
testcase_34 AC 376 ms
45,440 KB
testcase_35 AC 375 ms
45,216 KB
testcase_36 AC 84 ms
12,288 KB
testcase_37 AC 84 ms
12,160 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:9: warning: assigned but unused variable - a
Main.rb:9: warning: assigned but unused variable - b
Syntax OK

ソースコード

diff #

N, K = gets.split.map(&:to_i)
A = gets.split.map(&:to_i)
B = gets.split.map(&:to_i)
G = A.zip(B).map.with_index { |(a, b), i| [a, b, i] }
G.sort_by! { |a, b, _| b - a }
ans = Array.new(N, 'B')

K.times do |k|
  a, b, i = G[k]
  ans[i] = 'A'
end

puts ans.join
0