結果
| 問題 | 
                            No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-10-29 22:53:35 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 401 bytes | 
| コンパイル時間 | 261 ms | 
| コンパイル使用メモリ | 82,580 KB | 
| 実行使用メモリ | 264,892 KB | 
| 最終ジャッジ日時 | 2024-10-07 12:34:46 | 
| 合計ジャッジ時間 | 8,673 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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])
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 += 'A'
    else:
        ANS += 'B'
print(ANS)