結果
| 問題 |
No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-10-29 22:43:39 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 414 bytes |
| コンパイル時間 | 368 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 271,748 KB |
| 最終ジャッジ日時 | 2024-10-07 12:26:24 |
| 合計ジャッジ時間 | 7,601 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 TLE * 2 -- * 16 |
ソースコード
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] ,reverse=True)
ans_A = [False for _ in range(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)