結果
| 問題 |
No.2486 Don't come next to me
|
| コンテスト | |
| ユーザー |
highlighter
|
| 提出日時 | 2023-09-28 13:29:19 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 321 bytes |
| コンパイル時間 | 3,334 ms |
| コンパイル使用メモリ | 245,120 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-21 08:08:33 |
| 合計ジャッジ時間 | 7,631 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | RE * 20 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define int unsigned int
signed main() {
int N,M;
cin >> N >> M;
vector<int> A(M);
for(int &i : A){
cin >> i;
}
int ans=0;
for(int i=0;i<M-1;i++){
ans+=(popcount(A[i+1]-A[i])==1 ? (A[i+1]-A[i]-1)/2 : ((A[i+1]-A[i])&(A[i]-A[i+1]))-1);
}
cout << N-M-ans << endl;
}
highlighter