結果

問題 No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
コンテスト
ユーザー 👑 Kazun
提出日時 2021-08-01 03:22:51
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 228 ms / 2,000 ms
+ 137µs
コード長 299 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 70 ms
コンパイル使用メモリ 80,768 KB
実行使用メモリ 126,400 KB
最終ジャッジ日時 2026-09-11 12:00:27
合計ジャッジ時間 12,797 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
input=sys.stdin.readline
write=sys.stdout.write

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

S=[0]*N
U=sorted(range(N),key=lambda i:A[i]-B[i],reverse=True)

for i in U[:K]:
    S[i]=1

write("".join(map(lambda x:'A' if x else 'B' ,S)))
0