結果

問題 No.1242 高橋君とすごろく
ユーザー ぷら
提出日時 2020-10-02 22:02:59
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 386 bytes
コンパイル時間 1,513 ms
コンパイル使用メモリ 168,084 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-17 13:22:48
合計ジャッジ時間 2,439 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main() {
    int N,K;
    cin >> N >> K;
    vector<int>A(K);
    for(int i = 0; i < K; i++) {
        cin >> A[i];
    }
    bool ok = true;
    for(int i = 1; i < K; i++) {
        if(A[i] == A[i-1]+1) {
            if(A[i-1]%2 == 1) {
                ok = false;
            }
        }
    }
    cout << ((ok)?"Yes":"No") << endl;
}
0