結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー horitaka1999horitaka1999
提出日時 2021-10-29 22:56:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 404 ms / 2,000 ms
コード長 422 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 146,664 KB
最終ジャッジ日時 2024-04-16 15:40:16
合計ジャッジ時間 13,529 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
51,968 KB
testcase_01 AC 39 ms
52,096 KB
testcase_02 AC 39 ms
52,608 KB
testcase_03 AC 39 ms
51,968 KB
testcase_04 AC 39 ms
52,072 KB
testcase_05 AC 38 ms
52,096 KB
testcase_06 AC 38 ms
51,968 KB
testcase_07 AC 39 ms
51,840 KB
testcase_08 AC 39 ms
51,840 KB
testcase_09 AC 38 ms
52,224 KB
testcase_10 AC 39 ms
52,352 KB
testcase_11 AC 43 ms
57,856 KB
testcase_12 AC 39 ms
52,608 KB
testcase_13 AC 42 ms
58,496 KB
testcase_14 AC 43 ms
58,752 KB
testcase_15 AC 40 ms
52,864 KB
testcase_16 AC 210 ms
103,932 KB
testcase_17 AC 399 ms
129,172 KB
testcase_18 AC 291 ms
116,320 KB
testcase_19 AC 139 ms
96,384 KB
testcase_20 AC 154 ms
94,976 KB
testcase_21 AC 396 ms
146,664 KB
testcase_22 AC 387 ms
146,400 KB
testcase_23 AC 404 ms
146,032 KB
testcase_24 AC 391 ms
146,408 KB
testcase_25 AC 392 ms
146,660 KB
testcase_26 AC 401 ms
146,280 KB
testcase_27 AC 395 ms
146,536 KB
testcase_28 AC 399 ms
146,592 KB
testcase_29 AC 395 ms
146,020 KB
testcase_30 AC 396 ms
146,408 KB
testcase_31 AC 386 ms
146,228 KB
testcase_32 AC 239 ms
146,488 KB
testcase_33 AC 242 ms
146,028 KB
testcase_34 AC 250 ms
146,652 KB
testcase_35 AC 251 ms
146,340 KB
testcase_36 AC 39 ms
52,224 KB
testcase_37 AC 39 ms
52,224 KB
権限があれば一括ダウンロードができます

ソースコード

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.append( 'A')
    else:
        ANS.append('B')
print(''.join(ANS))

0