結果
| 問題 | 
                            No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-10-29 21:43:15 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 569 ms / 2,000 ms | 
| コード長 | 227 bytes | 
| コンパイル時間 | 491 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 55,104 KB | 
| 最終ジャッジ日時 | 2024-10-07 10:38:44 | 
| 合計ジャッジ時間 | 15,692 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 38 | 
ソースコード
n,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=[(b[i]-a[i],i) for i in range(n)]
c.sort()
c.reverse()
ans=list('A'*n)
for i in range(n-k):
  ans[c[i][1]]='B'
print(''.join(ans))