結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー roarisroaris
提出日時 2021-10-29 21:47:14
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 433 ms / 2,000 ms
コード長 321 bytes
コンパイル時間 1,229 ms
コンパイル使用メモリ 87,136 KB
実行使用メモリ 128,084 KB
最終ジャッジ日時 2023-07-29 07:35:24
合計ジャッジ時間 16,421 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
71,792 KB
testcase_01 AC 93 ms
71,796 KB
testcase_02 AC 95 ms
71,640 KB
testcase_03 AC 90 ms
71,448 KB
testcase_04 AC 88 ms
71,436 KB
testcase_05 AC 90 ms
71,452 KB
testcase_06 AC 89 ms
71,932 KB
testcase_07 AC 88 ms
71,828 KB
testcase_08 AC 88 ms
71,592 KB
testcase_09 AC 88 ms
71,908 KB
testcase_10 AC 90 ms
71,716 KB
testcase_11 AC 95 ms
76,860 KB
testcase_12 AC 90 ms
71,868 KB
testcase_13 AC 95 ms
76,968 KB
testcase_14 AC 95 ms
76,996 KB
testcase_15 AC 89 ms
71,692 KB
testcase_16 AC 235 ms
108,732 KB
testcase_17 AC 382 ms
128,084 KB
testcase_18 AC 298 ms
110,532 KB
testcase_19 AC 165 ms
94,728 KB
testcase_20 AC 178 ms
97,512 KB
testcase_21 AC 433 ms
126,540 KB
testcase_22 AC 415 ms
126,516 KB
testcase_23 AC 412 ms
126,744 KB
testcase_24 AC 411 ms
126,580 KB
testcase_25 AC 413 ms
126,712 KB
testcase_26 AC 409 ms
126,752 KB
testcase_27 AC 416 ms
126,508 KB
testcase_28 AC 421 ms
126,508 KB
testcase_29 AC 411 ms
126,600 KB
testcase_30 AC 412 ms
126,516 KB
testcase_31 AC 410 ms
126,520 KB
testcase_32 AC 266 ms
126,768 KB
testcase_33 AC 269 ms
126,592 KB
testcase_34 AC 284 ms
126,808 KB
testcase_35 AC 288 ms
126,768 KB
testcase_36 AC 87 ms
71,696 KB
testcase_37 AC 87 ms
71,756 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