結果
| 問題 |
No.3049 Contest Coordinator
|
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2025-03-07 21:20:10 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 395 ms / 2,000 ms |
| コード長 | 413 bytes |
| コンパイル時間 | 606 ms |
| コンパイル使用メモリ | 82,248 KB |
| 実行使用メモリ | 212,816 KB |
| 最終ジャッジ日時 | 2025-03-07 21:20:25 |
| 合計ジャッジ時間 | 13,454 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 58 |
ソースコード
n, t, x, y = map(int, input().split())
y = min(x, y)
d = sorted(map(int, input().split()))
a = []
now = 0
last = d[0]
for x in d:
if x - last <= t:
now += 1
else:
a.append(now)
now = 1
last = x
a.append(now)
a.sort()
rest = a.pop()
ans = [0]
for _ in range(n):
ans.append(ans[-1])
if rest == 0:
rest += a.pop()
ans[-1] += y
rest -= 1
print(*ans[1:])
Kude