結果
問題 | No.33 アメーバがたくさん |
ユーザー |
|
提出日時 | 2023-06-14 21:26:41 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 575 bytes |
コンパイル時間 | 176 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 55,808 KB |
最終ジャッジ日時 | 2024-06-23 03:23:06 |
合計ジャッジ時間 | 1,500 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 5 |
ソースコード
# import pypyjit # pypyjit.set_param('max_unroll_recursion=-1') from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline N,D,T = map(int,input().split()) X = list(map(int,input().split())) Y = defaultdict(lambda:[]) for x in X: q,r = divmod(x,D) Y[r].append(q) ans = 0 for y in Y.values(): if len(y)==1: ans += 2*T+1 continue y.sort() n = len(y) ans += 2*T+1 for j in range(n-1): ans += min(y[j+1]-y[j],T+1) print(ans)