結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー hir355hir355
提出日時 2021-10-29 21:37:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 730 ms / 2,000 ms
コード長 323 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 82,944 KB
実行使用メモリ 139,004 KB
最終ジャッジ日時 2024-04-16 14:22:00
合計ジャッジ時間 19,175 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,712 KB
testcase_01 AC 40 ms
51,712 KB
testcase_02 AC 40 ms
51,584 KB
testcase_03 AC 40 ms
51,584 KB
testcase_04 AC 40 ms
51,712 KB
testcase_05 AC 40 ms
51,712 KB
testcase_06 AC 41 ms
51,712 KB
testcase_07 AC 40 ms
51,968 KB
testcase_08 AC 42 ms
51,968 KB
testcase_09 AC 41 ms
51,712 KB
testcase_10 AC 40 ms
51,840 KB
testcase_11 AC 46 ms
59,264 KB
testcase_12 AC 42 ms
52,736 KB
testcase_13 AC 48 ms
59,264 KB
testcase_14 AC 51 ms
59,776 KB
testcase_15 AC 43 ms
53,248 KB
testcase_16 AC 364 ms
96,640 KB
testcase_17 AC 664 ms
116,240 KB
testcase_18 AC 502 ms
105,824 KB
testcase_19 AC 223 ms
93,824 KB
testcase_20 AC 245 ms
96,640 KB
testcase_21 AC 714 ms
138,960 KB
testcase_22 AC 730 ms
138,832 KB
testcase_23 AC 699 ms
139,004 KB
testcase_24 AC 720 ms
138,736 KB
testcase_25 AC 722 ms
138,744 KB
testcase_26 AC 716 ms
138,872 KB
testcase_27 AC 713 ms
138,752 KB
testcase_28 AC 724 ms
138,952 KB
testcase_29 AC 722 ms
138,736 KB
testcase_30 AC 711 ms
138,864 KB
testcase_31 AC 710 ms
138,324 KB
testcase_32 AC 400 ms
139,000 KB
testcase_33 AC 400 ms
139,000 KB
testcase_34 AC 422 ms
138,824 KB
testcase_35 AC 417 ms
138,872 KB
testcase_36 AC 42 ms
51,712 KB
testcase_37 AC 41 ms
51,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = [None] * n
for i in range(n):
    c[i] = (a[i] - b[i], i)
c.sort(reverse=True)
ans = [''] * n
for i in range(n):
    x, j = c[i]
    if i < k:
        ans[j] = 'A'
    else:
        ans[j] = 'B'
print(*ans, sep='')
0