結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー 👑 H20H20
提出日時 2021-10-29 21:35:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 475 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 139,768 KB
最終ジャッジ日時 2024-04-16 14:17:35
合計ジャッジ時間 15,640 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
51,584 KB
testcase_01 AC 44 ms
51,712 KB
testcase_02 AC 45 ms
51,584 KB
testcase_03 AC 48 ms
52,096 KB
testcase_04 AC 44 ms
51,968 KB
testcase_05 AC 43 ms
51,840 KB
testcase_06 AC 43 ms
51,840 KB
testcase_07 AC 43 ms
52,480 KB
testcase_08 AC 43 ms
52,096 KB
testcase_09 AC 45 ms
51,584 KB
testcase_10 AC 45 ms
51,840 KB
testcase_11 AC 48 ms
58,112 KB
testcase_12 AC 45 ms
52,352 KB
testcase_13 AC 48 ms
58,112 KB
testcase_14 AC 48 ms
58,240 KB
testcase_15 AC 44 ms
52,608 KB
testcase_16 AC 238 ms
98,508 KB
testcase_17 AC 422 ms
120,220 KB
testcase_18 AC 345 ms
124,260 KB
testcase_19 AC 154 ms
93,440 KB
testcase_20 AC 161 ms
95,488 KB
testcase_21 AC 453 ms
139,256 KB
testcase_22 AC 442 ms
139,340 KB
testcase_23 AC 475 ms
139,384 KB
testcase_24 AC 454 ms
139,768 KB
testcase_25 AC 439 ms
139,476 KB
testcase_26 AC 469 ms
139,640 KB
testcase_27 AC 452 ms
139,480 KB
testcase_28 AC 440 ms
139,212 KB
testcase_29 AC 450 ms
139,724 KB
testcase_30 AC 461 ms
139,272 KB
testcase_31 AC 427 ms
139,216 KB
testcase_32 AC 252 ms
138,828 KB
testcase_33 AC 253 ms
138,488 KB
testcase_34 AC 258 ms
139,256 KB
testcase_35 AC 259 ms
138,960 KB
testcase_36 AC 41 ms
51,712 KB
testcase_37 AC 43 ms
51,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
L = []
for i in range(N):
    L.append([A[i]-B[i],i])
L = sorted(L, reverse=True, key=lambda x: x[0])
ANS = ['B']*N
for i in range(K):
    ANS[L[i][1]]='A'
print(''.join(map(str, ANS)))
0