結果
| 問題 |
No.2486 Don't come next to me
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2023-09-29 21:31:54 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 369 bytes |
| コンパイル時間 | 391 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 34,940 KB |
| 最終ジャッジ日時 | 2024-07-22 15:33:29 |
| 合計ジャッジ時間 | 11,950 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 6 TLE * 1 -- * 13 |
ソースコード
N,M=map(int,input().split())
A=list(map(int,input().split()))
LIST=[]
for i in range(1,len(A)):
LIST.append(A[i]-A[i-1]-1)
ANS=M
while LIST:
if LIST[-1]<=1:
LIST.pop()
elif LIST[-1]%2==0:
LIST.pop()
else:
k=LIST[-1]
ANS+=1
LIST.pop()
l=k//2
LIST.append(l)
LIST.append(l)
print(N-ANS)
titia