結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー 👑 obakyanobakyan
提出日時 2021-11-14 23:24:21
言語 Lua
(LuaJit 2.1.1696795921)
結果
AC  
実行時間 370 ms / 2,000 ms
コード長 325 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 5,480 KB
実行使用メモリ 9,388 KB
最終ジャッジ日時 2023-08-20 08:26:30
合計ジャッジ時間 16,501 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 1 ms
4,384 KB
testcase_03 AC 1 ms
4,384 KB
testcase_04 AC 1 ms
4,384 KB
testcase_05 AC 1 ms
4,384 KB
testcase_06 AC 1 ms
4,384 KB
testcase_07 AC 1 ms
4,384 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 2 ms
4,384 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,384 KB
testcase_13 AC 2 ms
4,384 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 1 ms
4,384 KB
testcase_16 AC 174 ms
5,700 KB
testcase_17 AC 340 ms
9,000 KB
testcase_18 AC 254 ms
8,968 KB
testcase_19 AC 96 ms
4,380 KB
testcase_20 AC 107 ms
4,380 KB
testcase_21 AC 360 ms
9,328 KB
testcase_22 AC 367 ms
9,260 KB
testcase_23 AC 368 ms
9,200 KB
testcase_24 AC 363 ms
9,356 KB
testcase_25 AC 360 ms
9,292 KB
testcase_26 AC 369 ms
9,228 KB
testcase_27 AC 370 ms
9,216 KB
testcase_28 AC 369 ms
9,216 KB
testcase_29 AC 366 ms
9,232 KB
testcase_30 AC 365 ms
9,328 KB
testcase_31 AC 359 ms
8,804 KB
testcase_32 AC 310 ms
9,388 KB
testcase_33 AC 316 ms
9,328 KB
testcase_34 AC 312 ms
9,284 KB
testcase_35 AC 317 ms
9,176 KB
testcase_36 AC 1 ms
4,384 KB
testcase_37 AC 2 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

local n, k = io.read("*n", "*n")
local a = {}
for i = 1, n do a[i] = io.read("*n") end
local t = {}
for i = 1, n do t[i] = "B" end
local idx = {}
for i = 1, n do
  a[i] = a[i] - io.read("*n")
  idx[i] = i
end
table.sort(idx, function(x, y) return a[x] > a[y] end)
for i = 1, k do
  t[idx[i]] = "A"
end
print(table.concat(t))
0