結果
| 問題 | No.3049 Contest Coordinator |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-26 20:40:54 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 319 ms / 2,000 ms |
| コード長 | 374 bytes |
| 記録 | |
| コンパイル時間 | 341 ms |
| コンパイル使用メモリ | 85,356 KB |
| 実行使用メモリ | 214,020 KB |
| 最終ジャッジ日時 | 2026-05-26 20:41:10 |
| 合計ジャッジ時間 | 14,275 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
| 純コード判定待ち |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 58 |
ソースコード
import heapq
n,t,x,y=map(int,input().split())
d=list(map(int,input().split()));d.sort()
hq=[]
q=0
while q<n:
s=1
while q+1<n and d[q+1]-d[q]<=t:
q+=1;s+=1
heapq.heappush(hq,-s)
q+=1
ans=[0]*(n+1)
s=-heapq.heappop(hq)
while hq:
ans[s]+=min(x,y)
s-=heapq.heappop(hq)
for i in range(n):
ans[i+1]+=ans[i]
print(" ".join(map(str,ans[:n])))