結果

問題 No.2486 Don't come next to me
ユーザー ニックネームニックネーム
提出日時 2023-09-29 21:27:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 270 ms / 2,000 ms
コード長 186 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,708 KB
実行使用メモリ 32,988 KB
最終ジャッジ日時 2023-09-29 21:27:45
合計ジャッジ時間 4,138 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 209 ms
29,372 KB
testcase_01 AC 193 ms
27,188 KB
testcase_02 AC 66 ms
13,428 KB
testcase_03 AC 136 ms
21,736 KB
testcase_04 AC 213 ms
26,400 KB
testcase_05 AC 137 ms
21,748 KB
testcase_06 AC 156 ms
23,356 KB
testcase_07 AC 41 ms
10,828 KB
testcase_08 AC 70 ms
14,120 KB
testcase_09 AC 192 ms
29,060 KB
testcase_10 AC 146 ms
22,060 KB
testcase_11 AC 95 ms
16,712 KB
testcase_12 AC 51 ms
11,844 KB
testcase_13 AC 270 ms
32,988 KB
testcase_14 AC 77 ms
14,560 KB
testcase_15 AC 143 ms
21,852 KB
testcase_16 AC 43 ms
11,016 KB
testcase_17 AC 69 ms
13,688 KB
testcase_18 AC 62 ms
13,292 KB
testcase_19 AC 73 ms
14,300 KB
testcase_20 AC 15 ms
7,796 KB
testcase_21 AC 16 ms
7,864 KB
testcase_22 AC 15 ms
7,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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