結果
問題 |
No.33 アメーバがたくさん
|
ユーザー |
|
提出日時 | 2025-06-14 15:29:26 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 427 bytes |
コンパイル時間 | 566 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 11,520 KB |
最終ジャッジ日時 | 2025-06-14 15:29:29 |
合計ジャッジ時間 | 1,633 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 11 |
ソースコード
import sys read=sys.stdin.buffer.read readline=sys.stdin.buffer.readline from sortedcontainers import SortedList from collections import defaultdict N,D,T,*A=map(int,read().split()) mp=defaultdict(SortedList) for x in A: if not mp[x%D]: mp[x%D]=SortedList() mp[x%D].add(x) ans=0 for ls in mp.values(): pre=-2e18 for x in ls: l,r=x-D*T,x+D*T ans+=(T<<1)+1 if pre>=l: ans-=(pre-l+D)//D pre=r print(ans)