結果
| 問題 | No.1724 [Cherry 3rd Tune A] Lápiz labial de Sonia |
| コンテスト | |
| ユーザー |
MasKoaTS
|
| 提出日時 | 2021-10-31 20:34:36 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 424 ms / 2,000 ms |
| + 36µs | |
| コード長 | 882 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 59,308 KB |
| 最終ジャッジ日時 | 2026-09-12 13:59:03 |
| 合計ジャッジ時間 | 14,858 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 |
ソースコード
import itertools as iter
import collections as coll
import heapq as hq
import bisect as bis
from decimal import Decimal as dec
from copy import deepcopy as dcopy
import math
import sys
sys.setrecursionlimit(10**6)
def input():
return sys.stdin.readline().rstrip()
def getN():
return int(sys.stdin.readline().rstrip())
def getNs():
return map(int,sys.stdin.readline().rstrip().split())
def getList():
return list(map(int,sys.stdin.readline().rstrip().split()))
def strinps(n):
return [sys.stdin.readline().rstrip() for _ in range(n)]
pi = 3.141592653589793
mod = 10**9+7
MOD = 998244353
INF = math.inf
dx = [1,0,-1,0]; dy = [0,1,0,-1]
"""
Main Code
"""
n,K = getNs()
a = getList()
b = getList()
c = [(b[i]-a[i],i) for i in range(n)]
c.sort()
ans = ['' for _ in [0]*n]
cnt = 0
for _,i in c:
if(cnt < K):
ans[i] = 'A'
cnt += 1
else:
ans[i] = 'B'
print(''.join(ans))
MasKoaTS