結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー minimumminimum
提出日時 2021-10-29 21:30:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 790 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 138,480 KB
最終ジャッジ日時 2024-04-16 14:11:12
合計ジャッジ時間 19,408 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
51,712 KB
testcase_01 AC 40 ms
51,840 KB
testcase_02 AC 44 ms
51,968 KB
testcase_03 AC 42 ms
52,096 KB
testcase_04 AC 42 ms
51,840 KB
testcase_05 AC 43 ms
51,968 KB
testcase_06 AC 41 ms
52,096 KB
testcase_07 AC 40 ms
51,968 KB
testcase_08 AC 40 ms
51,840 KB
testcase_09 AC 43 ms
52,224 KB
testcase_10 AC 42 ms
52,096 KB
testcase_11 AC 47 ms
58,752 KB
testcase_12 AC 44 ms
52,608 KB
testcase_13 AC 47 ms
58,880 KB
testcase_14 AC 47 ms
59,136 KB
testcase_15 AC 43 ms
52,352 KB
testcase_16 AC 346 ms
96,768 KB
testcase_17 AC 643 ms
116,244 KB
testcase_18 AC 488 ms
105,960 KB
testcase_19 AC 211 ms
93,824 KB
testcase_20 AC 236 ms
96,640 KB
testcase_21 AC 714 ms
138,072 KB
testcase_22 AC 684 ms
138,480 KB
testcase_23 AC 689 ms
138,092 KB
testcase_24 AC 682 ms
138,216 KB
testcase_25 AC 687 ms
138,220 KB
testcase_26 AC 687 ms
138,088 KB
testcase_27 AC 682 ms
138,352 KB
testcase_28 AC 687 ms
138,092 KB
testcase_29 AC 684 ms
138,092 KB
testcase_30 AC 790 ms
138,216 KB
testcase_31 AC 745 ms
138,224 KB
testcase_32 AC 342 ms
138,108 KB
testcase_33 AC 345 ms
138,480 KB
testcase_34 AC 368 ms
138,344 KB
testcase_35 AC 372 ms
138,356 KB
testcase_36 AC 41 ms
51,840 KB
testcase_37 AC 41 ms
51,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

ans = [''] * N
for i in range(N):
    _, num = C[i]
    if i < K:
        ans[num] = 'A'
    else:
        ans[num] = 'B'
print(''.join(ans))
0