結果
| 問題 | No.1242 高橋君とすごろく |
| コンテスト | |
| ユーザー |
ぷら
|
| 提出日時 | 2020-10-02 22:06:21 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 452 bytes |
| 記録 | |
| コンパイル時間 | 1,713 ms |
| コンパイル使用メモリ | 177,956 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-17 13:29:39 |
| 合計ジャッジ時間 | 2,673 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 15 WA * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int N,K;
cin >> N >> K;
vector<int>A(K);
map<int,bool>Mp;
for(int i = 0; i < K; i++) {
cin >> A[i];
Mp[A[i]] = true;
}
bool ok = true;
for(int i = 0; i < K; i++) {
if(A[i]%2 == 1) {
if(Mp[A[i]+1] || Mp[A[i]+3] || Mp[A[i]+5]) {
ok = false;
}
}
}
cout << ((ok)?"Yes":"No") << endl;
}
ぷら