結果

問題 No.2486 Don't come next to me
コンテスト
ユーザー ニックネーム
提出日時 2023-09-29 21:27:41
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WJ  
(最新)
AC  
(最初)
実行時間 -
コード長 186 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
最終ジャッジ日時 2026-08-23 09:20:13
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)

ソースコード

diff #
raw source code

n,m = map(int,input().split())
a = list(map(int,input().split()))
ans = n-m
for i in range(m-1):
    d = a[i+1]-a[i]; i = 1
    while d>2 and d%2==0: ans -= i; i *= 2; d //= 2
print(ans)
0