結果
| 問題 | No.1242 高橋君とすごろく |
| コンテスト | |
| ユーザー |
ayaoni
|
| 提出日時 | 2021-04-25 01:35:17 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 809 bytes |
| 記録 | |
| コンパイル時間 | 168 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 61,312 KB |
| 最終ジャッジ日時 | 2024-07-04 09:21:10 |
| 合計ジャッジ時間 | 2,868 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 7 RE * 17 |
ソースコード
import sys
sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())
N,K = MI()
A = LI()
is_ok = [1]*(N+1)
for a in A:
is_ok[a] = 0
for i in range(N-1,0,-1):
if is_ok[i] == 0:
continue
for j in range(1,4):
if i+j > N or is_ok[i+j] or i+(7-j) > N or is_ok[i+(7-j)]:
continue
else:
is_ok[i] = 0
break
if is_ok[1]:
print('Yes')
else:
print('No')
ayaoni