結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー 👑 rin204rin204
提出日時 2022-01-18 02:26:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 642 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 419 ms
コンパイル使用メモリ 87,356 KB
実行使用メモリ 146,860 KB
最終ジャッジ日時 2023-08-15 07:16:34
合計ジャッジ時間 23,207 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
70,888 KB
testcase_01 AC 67 ms
71,384 KB
testcase_02 AC 70 ms
71,124 KB
testcase_03 AC 69 ms
70,636 KB
testcase_04 AC 67 ms
70,400 KB
testcase_05 AC 65 ms
70,988 KB
testcase_06 AC 68 ms
70,832 KB
testcase_07 AC 70 ms
70,636 KB
testcase_08 AC 68 ms
70,832 KB
testcase_09 AC 68 ms
70,988 KB
testcase_10 AC 67 ms
71,240 KB
testcase_11 AC 74 ms
75,432 KB
testcase_12 AC 70 ms
70,672 KB
testcase_13 AC 72 ms
75,412 KB
testcase_14 AC 71 ms
75,404 KB
testcase_15 AC 67 ms
71,276 KB
testcase_16 AC 373 ms
104,268 KB
testcase_17 AC 594 ms
146,860 KB
testcase_18 AC 448 ms
115,280 KB
testcase_19 AC 208 ms
92,896 KB
testcase_20 AC 228 ms
95,056 KB
testcase_21 AC 619 ms
140,636 KB
testcase_22 AC 613 ms
140,672 KB
testcase_23 AC 617 ms
140,552 KB
testcase_24 AC 618 ms
140,528 KB
testcase_25 AC 631 ms
140,488 KB
testcase_26 AC 631 ms
140,732 KB
testcase_27 AC 642 ms
140,476 KB
testcase_28 AC 613 ms
140,732 KB
testcase_29 AC 640 ms
140,732 KB
testcase_30 AC 638 ms
140,460 KB
testcase_31 AC 624 ms
140,732 KB
testcase_32 AC 372 ms
140,344 KB
testcase_33 AC 393 ms
140,344 KB
testcase_34 AC 390 ms
140,428 KB
testcase_35 AC 393 ms
140,624 KB
testcase_36 AC 66 ms
71,392 KB
testcase_37 AC 65 ms
71,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = [(a - b, i) for i, (a, b) in enumerate(zip(A, B))]
C.sort(reverse = True)
ans = ["B"] * n
for _, i in C[:k]:
    ans[i] = "A"
print(*ans, sep="")
0