結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー ThetaTheta
提出日時 2022-10-26 19:30:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 557 ms / 2,000 ms
コード長 480 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 10,748 KB
実行使用メモリ 53,328 KB
最終ジャッジ日時 2023-09-17 12:32:31
合計ジャッジ時間 17,822 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,916 KB
testcase_01 AC 16 ms
7,756 KB
testcase_02 AC 16 ms
7,864 KB
testcase_03 AC 16 ms
7,852 KB
testcase_04 AC 16 ms
7,800 KB
testcase_05 AC 16 ms
7,724 KB
testcase_06 AC 16 ms
7,740 KB
testcase_07 AC 16 ms
7,908 KB
testcase_08 AC 16 ms
7,752 KB
testcase_09 AC 16 ms
7,912 KB
testcase_10 AC 16 ms
7,752 KB
testcase_11 AC 17 ms
8,332 KB
testcase_12 AC 16 ms
7,828 KB
testcase_13 AC 16 ms
8,208 KB
testcase_14 AC 17 ms
8,304 KB
testcase_15 AC 17 ms
7,908 KB
testcase_16 AC 264 ms
31,348 KB
testcase_17 AC 511 ms
50,660 KB
testcase_18 AC 382 ms
40,808 KB
testcase_19 AC 135 ms
21,024 KB
testcase_20 AC 153 ms
23,024 KB
testcase_21 AC 557 ms
52,848 KB
testcase_22 AC 541 ms
53,296 KB
testcase_23 AC 545 ms
53,164 KB
testcase_24 AC 546 ms
53,172 KB
testcase_25 AC 541 ms
53,092 KB
testcase_26 AC 550 ms
53,184 KB
testcase_27 AC 543 ms
53,064 KB
testcase_28 AC 544 ms
53,188 KB
testcase_29 AC 530 ms
53,228 KB
testcase_30 AC 537 ms
52,664 KB
testcase_31 AC 541 ms
53,328 KB
testcase_32 AC 273 ms
46,852 KB
testcase_33 AC 269 ms
46,564 KB
testcase_34 AC 291 ms
46,844 KB
testcase_35 AC 289 ms
46,764 KB
testcase_36 AC 16 ms
7,740 KB
testcase_37 AC 16 ms
7,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

    pattern = ["" for _ in range(N)]
    diff = [(a - b, idx) for idx, (a, b) in enumerate(zip(A, B))]
    diff.sort(reverse=True)
    for idx, (_, elm_idx) in enumerate(diff):
        if idx < K:
            pattern[elm_idx] = "A"
        else:
            pattern[elm_idx] = "B"

    print("".join(pattern))


if __name__ == "__main__":
    main()
0