結果
問題 | No.2486 Don't come next to me |
ユーザー |
![]() |
提出日時 | 2023-09-29 23:18:34 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 648 bytes |
コンパイル時間 | 160 ms |
コンパイル使用メモリ | 82,212 KB |
実行使用メモリ | 107,200 KB |
最終ジャッジ日時 | 2024-07-22 17:16:38 |
合計ジャッジ時間 | 3,019 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | WA * 20 |
ソースコード
#############################################################import syssys.setrecursionlimit(10**7)from heapq import heappop,heappushfrom collections import deque,defaultdict,Counterfrom bisect import bisect_left, bisect_rightfrom itertools import product,combinations,permutationsipt = sys.stdin.readlinedef iin():return int(ipt())def lmin():return list(map(int,ipt().split()))#############################################################N,M = lmin()A = lmin()ans = 0for i in range(M-1):v = A[i+1]-A[i]-1ans += vt = 1while v%2 and v>=3:ans -= tv //= 2t += 1print(ans)