結果
| 問題 |
No.3049 Contest Coordinator
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2025-03-07 21:49:07 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 1,128 ms / 2,000 ms |
| コード長 | 505 bytes |
| コンパイル時間 | 437 ms |
| コンパイル使用メモリ | 12,032 KB |
| 実行使用メモリ | 70,464 KB |
| 最終ジャッジ日時 | 2025-03-07 21:49:30 |
| 合計ジャッジ時間 | 21,102 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 58 |
ソースコード
import sys
input = sys.stdin.readline
N,T,X,Y=map(int,input().split())
D=list(map(int,input().split()))
D.sort()
LIST=[]
count=0
now=-1<<60
for i in range(len(D)):
if D[i]<=now+T:
count+=1
now=D[i]
else:
if count>0:
LIST.append(count)
count=1
now=D[i]
if count>0:
LIST.append(count)
LIST.sort(reverse=True)
miss=9
if X>Y:
miss=Y
else:
miss=X
ANS=[]
now=0
for x in LIST:
ANS+=[now]*x
now+=miss
print(*ANS)
titia