結果
| 問題 | No.2482 Sandglasses |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-22 22:28:53 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
WJ
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 276 bytes |
| 記録 | |
| 最終ジャッジ日時 | 2026-09-25 02:07:08 |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
ソースコード
n,k,t=map(int,input().split())
c=input().split()
a=[*map(int,input().split())]
b=[]
for u,x in zip(c,a):
s=2*k
z=[x+t,x-t]['B'>u]%s
if z>k:z=s-z
b+=z,
p=sorted(enumerate(a),key=lambda x:x[1])
b=sorted(b)
z=[0]*n
for i in range(n):
z[p[i][0]]=b[i]
print(*z)