結果

問題 No.2482 Sandglasses
ユーザー KeroruKeroru
提出日時 2023-09-22 22:28:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 458 ms / 2,000 ms
コード長 276 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 158,652 KB
最終ジャッジ日時 2024-04-28 09:02:46
合計ジャッジ時間 14,027 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,968 KB
testcase_01 AC 37 ms
51,968 KB
testcase_02 AC 37 ms
51,968 KB
testcase_03 AC 413 ms
140,004 KB
testcase_04 AC 402 ms
135,440 KB
testcase_05 AC 407 ms
137,060 KB
testcase_06 AC 409 ms
135,008 KB
testcase_07 AC 410 ms
135,276 KB
testcase_08 AC 419 ms
139,872 KB
testcase_09 AC 415 ms
136,928 KB
testcase_10 AC 423 ms
139,236 KB
testcase_11 AC 414 ms
139,476 KB
testcase_12 AC 399 ms
137,056 KB
testcase_13 AC 406 ms
139,488 KB
testcase_14 AC 407 ms
137,300 KB
testcase_15 AC 439 ms
140,000 KB
testcase_16 AC 407 ms
137,312 KB
testcase_17 AC 404 ms
136,928 KB
testcase_18 AC 408 ms
137,056 KB
testcase_19 AC 397 ms
139,108 KB
testcase_20 AC 404 ms
138,976 KB
testcase_21 AC 398 ms
138,976 KB
testcase_22 AC 403 ms
136,416 KB
testcase_23 AC 457 ms
158,652 KB
testcase_24 AC 452 ms
158,524 KB
testcase_25 AC 450 ms
158,396 KB
testcase_26 AC 447 ms
158,520 KB
testcase_27 AC 458 ms
158,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0