結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー horitaka1999horitaka1999
提出日時 2021-10-29 22:53:35
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 401 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 82,580 KB
実行使用メモリ 149,272 KB
最終ジャッジ日時 2024-04-16 15:39:13
合計ジャッジ時間 7,500 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
59,944 KB
testcase_01 AC 38 ms
52,876 KB
testcase_02 AC 39 ms
53,748 KB
testcase_03 AC 39 ms
52,072 KB
testcase_04 AC 38 ms
53,372 KB
testcase_05 AC 37 ms
52,464 KB
testcase_06 AC 38 ms
52,308 KB
testcase_07 AC 38 ms
52,648 KB
testcase_08 AC 38 ms
52,328 KB
testcase_09 AC 38 ms
52,736 KB
testcase_10 AC 38 ms
53,292 KB
testcase_11 AC 43 ms
59,680 KB
testcase_12 AC 38 ms
53,068 KB
testcase_13 AC 43 ms
59,056 KB
testcase_14 AC 42 ms
59,032 KB
testcase_15 AC 39 ms
52,776 KB
testcase_16 AC 811 ms
117,880 KB
testcase_17 TLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
board = []
for i in range(N):
    board.append((A[i]-B[i],i))
board.sort(key = lambda x:x[0])
board.reverse()
ans_A = [False] * N
for i in range(K):
    t,index = board[i]
    ans_A[index] = True
ANS = ''
for i in range(N):
    if ans_A[i]:
        ANS += 'A'
    else:
        ANS += 'B'
print(ANS)
0