結果

問題 No.33 アメーバがたくさん
ユーザー pluto77pluto77
提出日時 2017-05-15 13:34:56
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 261 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 7,088 KB
実行使用メモリ 6,428 KB
最終ジャッジ日時 2023-10-24 20:21:11
合計ジャッジ時間 747 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
6,428 KB
testcase_01 AC 12 ms
6,428 KB
testcase_02 AC 12 ms
6,428 KB
testcase_03 AC 11 ms
6,428 KB
testcase_04 AC 11 ms
6,428 KB
testcase_05 AC 10 ms
6,428 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 10 ms
6,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_33

n,d,t=map(int,raw_input().split())
s=map(int,raw_input().split())
l=[]
for e in s:
 l.append(e%d)
l.sort()
res=n+t*2
for i in xrange(n-1):
 if l[i]!=l[i+1]:
  res+=t*2
 elif s[i+1]-s[i]>=(t*2+1)*d:
  res+=t*2
 else:
  res+=(s[i+1]-s[i])/d-1
print res
0