結果

問題 No.1242 高橋君とすごろく
ユーザー CyanmondCyanmond
提出日時 2020-10-02 21:36:51
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,223 bytes
コンパイル時間 1,224 ms
コンパイル使用メモリ 122,460 KB
実行使用メモリ 112,156 KB
最終ジャッジ日時 2023-09-23 04:22:21
合計ジャッジ時間 4,971 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
8,752 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 WA -
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,384 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cctype>
#include <assert.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <math.h>
#include <cstring>
#include <array>
using namespace std;
using lint = long long;
const int dx[] = { 1,0,-1,0 };
const int dy[] = { 0,1,0,-1 };

const lint INF = 1ll << 60;
const int mod = 1000000007;
void speed() {
	std::cin.tie(nullptr);
	std::ios::sync_with_stdio(false);
	return;
}


int main(void) {
	speed();
	lint n; cin >> n;
	int k; cin >> k;
	map<lint, bool> r;
	for (int i = 0; i < k; i++) {
		lint s; cin >> s;
		r[s] = true;
	}
	for (auto s : r) {
		for (int i = 1; i <= min(6ll, n - s.first); i++) {
			if (r[s.first + i]) {
				puts("No");
				return 0;
			}
		}
	}
	puts("Yes");
	
	return 0;
}
0