結果
| 問題 | No.2486 Don't come next to me |
| コンテスト | |
| ユーザー |
nikoro256
|
| 提出日時 | 2023-09-29 21:33:04 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
WJ
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 264 bytes |
| 記録 | |
| 最終ジャッジ日時 | 2026-08-23 09:25:10 |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
ソースコード
'''
8の時
4 1 3
oooo-o*o
3 1 4
o*o-oooo
'''
N,M=map(int,input().split())
A=list(map(int,input().split()))
ans=0
for i in range(1,M):
tmp=A[i]-A[i-1]-1
count=1
while tmp!=1 and tmp%2!=0:
tmp//=2
count*=2
ans+=count*tmp
print(ans)
nikoro256