結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー rlangevinrlangevin
提出日時 2023-01-09 11:53:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 661 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 86,900 KB
実行使用メモリ 139,996 KB
最終ジャッジ日時 2023-08-22 16:05:44
合計ジャッジ時間 23,366 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,124 KB
testcase_01 AC 74 ms
71,124 KB
testcase_02 AC 70 ms
71,304 KB
testcase_03 AC 72 ms
71,168 KB
testcase_04 AC 70 ms
71,100 KB
testcase_05 AC 71 ms
71,232 KB
testcase_06 AC 72 ms
71,084 KB
testcase_07 AC 70 ms
71,264 KB
testcase_08 AC 75 ms
71,132 KB
testcase_09 AC 73 ms
71,136 KB
testcase_10 AC 70 ms
71,260 KB
testcase_11 AC 72 ms
75,440 KB
testcase_12 AC 73 ms
71,168 KB
testcase_13 AC 74 ms
75,640 KB
testcase_14 AC 79 ms
75,832 KB
testcase_15 AC 75 ms
70,988 KB
testcase_16 AC 355 ms
99,000 KB
testcase_17 AC 641 ms
139,372 KB
testcase_18 AC 475 ms
107,860 KB
testcase_19 AC 220 ms
94,448 KB
testcase_20 AC 242 ms
96,520 KB
testcase_21 AC 656 ms
139,996 KB
testcase_22 AC 654 ms
139,752 KB
testcase_23 AC 661 ms
139,712 KB
testcase_24 AC 651 ms
139,880 KB
testcase_25 AC 651 ms
139,708 KB
testcase_26 AC 659 ms
139,512 KB
testcase_27 AC 649 ms
139,640 KB
testcase_28 AC 647 ms
139,672 KB
testcase_29 AC 661 ms
139,664 KB
testcase_30 AC 652 ms
139,500 KB
testcase_31 AC 652 ms
139,352 KB
testcase_32 AC 366 ms
139,740 KB
testcase_33 AC 365 ms
139,500 KB
testcase_34 AC 383 ms
139,820 KB
testcase_35 AC 378 ms
139,620 KB
testcase_36 AC 73 ms
71,136 KB
testcase_37 AC 71 ms
71,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

ans = ["B"] * N
D = [(A[i] - B[i], i) for i in range(N)]
D.sort(reverse=True)
for i in range(K):
    ans[D[i][1]] = "A"
print("".join(ans))
0