結果

問題 No.33 アメーバがたくさん
ユーザー pluto77pluto77
提出日時 2018-02-15 14:54:55
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 308 bytes
コンパイル時間 745 ms
コンパイル使用メモリ 6,684 KB
実行使用メモリ 6,116 KB
最終ジャッジ日時 2023-08-26 21:41:15
合計ジャッジ時間 1,477 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

n,d,t=map(int, raw_input().split())
dic={}
for i in map(int,raw_input().split()):
 j=(i%d+d)%d
 if j in dic:
  dic[j].append(i)
 else:
  dic[j]=[i]
res = 0
for k, v in dic.items():
 res+=len(v)+t*2
 for i in xrange(len(v)-1):
  if v[i]+t*d<v[i+1]-t*d:
   res+=t*2
  else:
   res+=(v[i+1]-v[i])/d-1
print res
0