結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー roarisroaris
提出日時 2021-10-29 21:47:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 416 ms / 2,000 ms
コード長 321 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 135,936 KB
最終ジャッジ日時 2024-04-16 14:35:08
合計ジャッジ時間 14,264 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
53,504 KB
testcase_01 AC 47 ms
53,376 KB
testcase_02 AC 47 ms
53,888 KB
testcase_03 AC 48 ms
53,760 KB
testcase_04 AC 48 ms
53,888 KB
testcase_05 AC 48 ms
53,760 KB
testcase_06 AC 48 ms
53,376 KB
testcase_07 AC 48 ms
53,248 KB
testcase_08 AC 47 ms
53,760 KB
testcase_09 AC 48 ms
53,504 KB
testcase_10 AC 48 ms
53,248 KB
testcase_11 AC 52 ms
59,776 KB
testcase_12 AC 49 ms
53,888 KB
testcase_13 AC 52 ms
60,032 KB
testcase_14 AC 53 ms
59,904 KB
testcase_15 AC 48 ms
53,888 KB
testcase_16 AC 214 ms
93,816 KB
testcase_17 AC 414 ms
135,936 KB
testcase_18 AC 278 ms
104,368 KB
testcase_19 AC 144 ms
92,544 KB
testcase_20 AC 158 ms
94,336 KB
testcase_21 AC 412 ms
135,544 KB
testcase_22 AC 396 ms
135,544 KB
testcase_23 AC 411 ms
135,164 KB
testcase_24 AC 399 ms
135,164 KB
testcase_25 AC 398 ms
135,548 KB
testcase_26 AC 416 ms
135,776 KB
testcase_27 AC 403 ms
135,828 KB
testcase_28 AC 403 ms
135,428 KB
testcase_29 AC 404 ms
135,684 KB
testcase_30 AC 401 ms
135,412 KB
testcase_31 AC 397 ms
135,288 KB
testcase_32 AC 239 ms
135,552 KB
testcase_33 AC 245 ms
135,404 KB
testcase_34 AC 252 ms
135,676 KB
testcase_35 AC 256 ms
135,300 KB
testcase_36 AC 46 ms
53,632 KB
testcase_37 AC 46 ms
53,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import *

N, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
d = [(i, A[i]-B[i]) for i in range(N)]
d.sort(key=lambda t: t[1], reverse=True)
ans = ['B']*N

for i, _ in d[:K]:
    ans[i] = 'A'

print(''.join(ans))
0