結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー rin204
提出日時 2022-01-18 02:26:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 708 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 249 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 147,292 KB
最終ジャッジ日時 2024-11-23 13:10:31
合計ジャッジ時間 20,177 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

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