結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
ユーザー ysys
提出日時 2022-03-09 02:56:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 667 ms / 2,000 ms
コード長 258 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 87,292 KB
実行使用メモリ 146,904 KB
最終ジャッジ日時 2023-10-09 22:50:52
合計ジャッジ時間 22,735 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,280 KB
testcase_01 AC 73 ms
71,440 KB
testcase_02 AC 74 ms
71,540 KB
testcase_03 AC 73 ms
71,404 KB
testcase_04 AC 73 ms
71,320 KB
testcase_05 AC 73 ms
71,164 KB
testcase_06 AC 74 ms
71,292 KB
testcase_07 AC 76 ms
71,464 KB
testcase_08 AC 76 ms
71,328 KB
testcase_09 AC 75 ms
71,508 KB
testcase_10 AC 75 ms
71,520 KB
testcase_11 AC 78 ms
75,804 KB
testcase_12 AC 76 ms
71,380 KB
testcase_13 AC 77 ms
76,092 KB
testcase_14 AC 81 ms
76,124 KB
testcase_15 AC 78 ms
71,588 KB
testcase_16 AC 354 ms
104,140 KB
testcase_17 AC 633 ms
146,904 KB
testcase_18 AC 480 ms
115,204 KB
testcase_19 AC 223 ms
93,600 KB
testcase_20 AC 247 ms
95,912 KB
testcase_21 AC 666 ms
141,964 KB
testcase_22 AC 667 ms
142,192 KB
testcase_23 AC 654 ms
141,920 KB
testcase_24 AC 657 ms
142,244 KB
testcase_25 AC 664 ms
142,132 KB
testcase_26 AC 661 ms
142,252 KB
testcase_27 AC 652 ms
142,104 KB
testcase_28 AC 660 ms
142,000 KB
testcase_29 AC 657 ms
142,300 KB
testcase_30 AC 654 ms
141,260 KB
testcase_31 AC 655 ms
142,004 KB
testcase_32 AC 365 ms
142,020 KB
testcase_33 AC 365 ms
142,116 KB
testcase_34 AC 384 ms
141,924 KB
testcase_35 AC 382 ms
142,020 KB
testcase_36 AC 73 ms
71,392 KB
testcase_37 AC 73 ms
71,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
L = []
for j in range(N):
  L.append((A[j] - B[j], j))
L.sort(reverse=True)
ans = ['B'] * N
for j in range(K):
  ans[L[j][1]] = 'A'
print(''.join(ans))

0