結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー lloyzlloyz
提出日時 2021-11-07 00:13:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 544 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 59,756 KB
最終ジャッジ日時 2024-04-25 12:32:13
合計ジャッジ時間 16,340 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,752 KB
testcase_01 AC 26 ms
10,624 KB
testcase_02 AC 26 ms
10,624 KB
testcase_03 AC 26 ms
10,624 KB
testcase_04 AC 26 ms
10,752 KB
testcase_05 AC 26 ms
10,752 KB
testcase_06 AC 26 ms
10,752 KB
testcase_07 AC 26 ms
10,752 KB
testcase_08 AC 26 ms
10,752 KB
testcase_09 AC 26 ms
10,752 KB
testcase_10 AC 26 ms
10,752 KB
testcase_11 AC 27 ms
10,880 KB
testcase_12 AC 26 ms
10,624 KB
testcase_13 AC 26 ms
10,880 KB
testcase_14 AC 27 ms
10,880 KB
testcase_15 AC 27 ms
10,624 KB
testcase_16 AC 255 ms
35,940 KB
testcase_17 AC 472 ms
57,040 KB
testcase_18 AC 302 ms
46,144 KB
testcase_19 AC 131 ms
24,768 KB
testcase_20 AC 158 ms
26,632 KB
testcase_21 AC 516 ms
59,628 KB
testcase_22 AC 469 ms
59,628 KB
testcase_23 AC 543 ms
59,508 KB
testcase_24 AC 490 ms
59,628 KB
testcase_25 AC 472 ms
59,724 KB
testcase_26 AC 544 ms
59,756 KB
testcase_27 AC 542 ms
59,624 KB
testcase_28 AC 477 ms
59,632 KB
testcase_29 AC 523 ms
59,628 KB
testcase_30 AC 537 ms
59,720 KB
testcase_31 AC 457 ms
59,720 KB
testcase_32 AC 339 ms
52,812 KB
testcase_33 AC 335 ms
52,716 KB
testcase_34 AC 338 ms
53,100 KB
testcase_35 AC 343 ms
53,100 KB
testcase_36 AC 27 ms
10,752 KB
testcase_37 AC 26 ms
10,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

dif = [[0, i] for i in range(n)]
for i in range(n):
    dif[i][0] = A[i] - B[i]
dif.sort(key=lambda x: x[0], reverse=True)
ans = ["B" for _ in range(n)]
for i in range(k):
    ind = dif[i][1]
    ans[ind] = "A"
print("".join(ans))
0