結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー titiatitia
提出日時 2021-10-29 22:27:26
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 539 ms / 2,000 ms
コード長 274 bytes
コンパイル時間 430 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 52,564 KB
最終ジャッジ日時 2023-07-29 08:25:29
合計ジャッジ時間 16,698 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,852 KB
testcase_01 AC 16 ms
7,824 KB
testcase_02 AC 16 ms
7,792 KB
testcase_03 AC 15 ms
7,876 KB
testcase_04 AC 16 ms
7,872 KB
testcase_05 AC 16 ms
7,816 KB
testcase_06 AC 16 ms
7,848 KB
testcase_07 AC 15 ms
7,796 KB
testcase_08 AC 16 ms
7,824 KB
testcase_09 AC 16 ms
7,836 KB
testcase_10 AC 16 ms
7,908 KB
testcase_11 AC 16 ms
7,784 KB
testcase_12 AC 17 ms
7,908 KB
testcase_13 AC 16 ms
8,264 KB
testcase_14 AC 16 ms
8,284 KB
testcase_15 AC 16 ms
7,916 KB
testcase_16 AC 262 ms
31,676 KB
testcase_17 AC 506 ms
51,728 KB
testcase_18 AC 337 ms
40,380 KB
testcase_19 AC 129 ms
20,968 KB
testcase_20 AC 154 ms
22,516 KB
testcase_21 AC 533 ms
52,364 KB
testcase_22 AC 478 ms
52,504 KB
testcase_23 AC 536 ms
52,504 KB
testcase_24 AC 486 ms
52,468 KB
testcase_25 AC 489 ms
52,460 KB
testcase_26 AC 539 ms
52,540 KB
testcase_27 AC 522 ms
52,460 KB
testcase_28 AC 473 ms
52,564 KB
testcase_29 AC 508 ms
52,552 KB
testcase_30 AC 519 ms
52,548 KB
testcase_31 AC 452 ms
52,472 KB
testcase_32 AC 262 ms
46,028 KB
testcase_33 AC 261 ms
46,124 KB
testcase_34 AC 273 ms
46,080 KB
testcase_35 AC 271 ms
46,208 KB
testcase_36 AC 15 ms
7,800 KB
testcase_37 AC 16 ms
7,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

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

X=[(A[i]-B[i],i) for i in range(N)]
X.sort(reverse=True)

ANS=["B"]*N

for i in range(K):
    ANS[X[i][1]]="A"

print("".join(ANS))
    


0