結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー shinichishinichi
提出日時 2021-10-29 21:42:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 550 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 361 ms
コンパイル使用メモリ 82,496 KB
実行使用メモリ 140,316 KB
最終ジャッジ日時 2024-04-16 14:27:17
合計ジャッジ時間 15,628 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,352 KB
testcase_01 AC 36 ms
52,096 KB
testcase_02 AC 38 ms
52,096 KB
testcase_03 AC 37 ms
51,712 KB
testcase_04 AC 39 ms
52,052 KB
testcase_05 AC 37 ms
52,096 KB
testcase_06 AC 36 ms
51,840 KB
testcase_07 AC 38 ms
52,352 KB
testcase_08 AC 37 ms
52,096 KB
testcase_09 AC 38 ms
51,712 KB
testcase_10 AC 36 ms
51,840 KB
testcase_11 AC 40 ms
58,368 KB
testcase_12 AC 38 ms
51,968 KB
testcase_13 AC 42 ms
58,624 KB
testcase_14 AC 41 ms
58,112 KB
testcase_15 AC 38 ms
52,480 KB
testcase_16 AC 210 ms
100,376 KB
testcase_17 AC 374 ms
119,972 KB
testcase_18 AC 296 ms
122,408 KB
testcase_19 AC 136 ms
94,080 KB
testcase_20 AC 147 ms
96,000 KB
testcase_21 AC 547 ms
139,596 KB
testcase_22 AC 515 ms
139,596 KB
testcase_23 AC 534 ms
139,908 KB
testcase_24 AC 523 ms
140,240 KB
testcase_25 AC 501 ms
139,604 KB
testcase_26 AC 537 ms
139,860 KB
testcase_27 AC 550 ms
139,372 KB
testcase_28 AC 509 ms
139,604 KB
testcase_29 AC 534 ms
139,600 KB
testcase_30 AC 534 ms
139,724 KB
testcase_31 AC 486 ms
139,340 KB
testcase_32 AC 283 ms
140,232 KB
testcase_33 AC 282 ms
139,860 KB
testcase_34 AC 300 ms
139,672 KB
testcase_35 AC 298 ms
140,316 KB
testcase_36 AC 38 ms
52,096 KB
testcase_37 AC 38 ms
51,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())

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

AB = list(tuple(zip(A, B, range(N))))
AB.sort(key=lambda x: x[0]-x[1], reverse=True)
result = [None] * N

for k in range(K):
    result[AB[k][2]] = "A"

print("".join([a if a == "A" else "B"  for a in result]))
0