結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー horitaka1999horitaka1999
提出日時 2021-10-29 22:56:27
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 355 ms / 2,000 ms
コード長 422 bytes
コンパイル時間 529 ms
コンパイル使用メモリ 86,744 KB
実行使用メモリ 146,304 KB
最終ジャッジ日時 2023-07-29 08:52:27
合計ジャッジ時間 14,529 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,188 KB
testcase_01 AC 60 ms
71,180 KB
testcase_02 AC 60 ms
71,192 KB
testcase_03 AC 64 ms
70,740 KB
testcase_04 AC 62 ms
71,216 KB
testcase_05 AC 59 ms
70,760 KB
testcase_06 AC 60 ms
70,764 KB
testcase_07 AC 61 ms
71,212 KB
testcase_08 AC 62 ms
70,972 KB
testcase_09 AC 60 ms
71,004 KB
testcase_10 AC 60 ms
70,976 KB
testcase_11 AC 65 ms
75,600 KB
testcase_12 AC 61 ms
70,896 KB
testcase_13 AC 64 ms
75,376 KB
testcase_14 AC 67 ms
75,312 KB
testcase_15 AC 61 ms
71,352 KB
testcase_16 AC 195 ms
105,288 KB
testcase_17 AC 343 ms
146,304 KB
testcase_18 AC 262 ms
116,952 KB
testcase_19 AC 136 ms
93,196 KB
testcase_20 AC 157 ms
95,104 KB
testcase_21 AC 342 ms
141,432 KB
testcase_22 AC 345 ms
141,256 KB
testcase_23 AC 355 ms
141,220 KB
testcase_24 AC 342 ms
141,328 KB
testcase_25 AC 343 ms
141,572 KB
testcase_26 AC 340 ms
141,360 KB
testcase_27 AC 343 ms
141,140 KB
testcase_28 AC 338 ms
141,408 KB
testcase_29 AC 347 ms
141,328 KB
testcase_30 AC 346 ms
141,316 KB
testcase_31 AC 343 ms
141,180 KB
testcase_32 AC 227 ms
141,492 KB
testcase_33 AC 225 ms
141,400 KB
testcase_34 AC 242 ms
141,308 KB
testcase_35 AC 238 ms
141,500 KB
testcase_36 AC 62 ms
71,288 KB
testcase_37 AC 61 ms
70,980 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