結果
問題 |
No.837 Noelちゃんと星々2
|
ユーザー |
|
提出日時 | 2019-06-20 14:50:50 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 318 bytes |
コンパイル時間 | 132 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 14,996 KB |
最終ジャッジ日時 | 2024-12-17 15:41:14 |
合計ジャッジ時間 | 3,992 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 5 WA * 24 |
ソースコード
#yuki837 import sys n=int(raw_input()) y=map(int,raw_input().split()) y.sort() if y[0]==y[n-1]: print 1 sys.exit() d=[0]*100000 temp=0 for i in xrange(n-1): temp+=y[i]-y[i/2] d[i]+=temp temp=0 for i in xrange(n-2,-1,-1): temp+=y[n-(n-i)/2]-y[i+1] d[i]+=temp m=1<<18 for i in xrange(n-1): m=min(m,d[i]) print m