結果
| 問題 |
No.2486 Don't come next to me
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-29 21:05:13 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 156 bytes |
| コンパイル時間 | 293 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 106,016 KB |
| 最終ジャッジ日時 | 2024-07-22 15:00:45 |
| 合計ジャッジ時間 | 3,245 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 20 |
ソースコード
N,M=map(int,input().split())
A=list(map(int,input().split()))
ans=N-M
for i in range(M-1):
if A[i]-A[i+1]!=-2:
ans-=(A[i]-A[i+1]+1)%2
print(ans)