結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー playerplayer
提出日時 2024-01-15 03:20:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 653 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 444 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 139,640 KB
最終ジャッジ日時 2024-01-15 03:20:49
合計ジャッジ時間 19,588 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
53,332 KB
testcase_01 AC 33 ms
53,332 KB
testcase_02 AC 32 ms
53,332 KB
testcase_03 AC 30 ms
53,332 KB
testcase_04 AC 31 ms
53,332 KB
testcase_05 AC 32 ms
53,332 KB
testcase_06 AC 32 ms
53,332 KB
testcase_07 AC 30 ms
53,332 KB
testcase_08 AC 31 ms
53,332 KB
testcase_09 AC 33 ms
53,332 KB
testcase_10 AC 30 ms
53,332 KB
testcase_11 AC 35 ms
59,332 KB
testcase_12 AC 34 ms
53,332 KB
testcase_13 AC 41 ms
59,332 KB
testcase_14 AC 35 ms
59,316 KB
testcase_15 AC 32 ms
53,332 KB
testcase_16 AC 419 ms
106,860 KB
testcase_17 AC 638 ms
120,376 KB
testcase_18 AC 445 ms
122,632 KB
testcase_19 AC 179 ms
93,188 KB
testcase_20 AC 199 ms
95,228 KB
testcase_21 AC 619 ms
139,508 KB
testcase_22 AC 626 ms
139,516 KB
testcase_23 AC 651 ms
139,512 KB
testcase_24 AC 627 ms
139,512 KB
testcase_25 AC 637 ms
139,512 KB
testcase_26 AC 639 ms
139,516 KB
testcase_27 AC 643 ms
139,340 KB
testcase_28 AC 653 ms
139,516 KB
testcase_29 AC 652 ms
139,512 KB
testcase_30 AC 647 ms
139,516 KB
testcase_31 AC 632 ms
139,208 KB
testcase_32 AC 324 ms
139,512 KB
testcase_33 AC 328 ms
139,512 KB
testcase_34 AC 340 ms
139,512 KB
testcase_35 AC 361 ms
139,640 KB
testcase_36 AC 32 ms
53,332 KB
testcase_37 AC 30 ms
53,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

lis = []
for i in range(n):
    li = [a[i] - b[i], i]
    lis.append(li)

lis.sort(reverse=True)
ans = [None] * n

for i in range(k):
    ans[lis[i][1]] = "A"

for i in range(n):
    if ans[i] == None:
        ans[i] = "B"

print("".join(ans))
0