結果
| 問題 |
No.2486 Don't come next to me
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-29 22:08:41 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 139 ms / 2,000 ms |
| コード長 | 219 bytes |
| コンパイル時間 | 645 ms |
| コンパイル使用メモリ | 82,376 KB |
| 実行使用メモリ | 129,280 KB |
| 最終ジャッジ日時 | 2024-07-22 16:09:02 |
| 合計ジャッジ時間 | 3,897 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
n,m,*a=map(int,open(0).read().split())
p=[]
for i,j in zip(a,a[1:]):
if j>i+1:
p+=(j-i-1),
ans=n-m
for t in p:
y=t
c=1
while y%2 and y>1:
y=(y-1)//2
ans-=c
c*=2
print(ans)