結果
| 問題 | No.1242 高橋君とすごろく |
| コンテスト | |
| ユーザー |
回転
|
| 提出日時 | 2026-08-13 01:02:09 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 71 ms / 2,000 ms |
| + 598µs | |
| コード長 | 473 bytes |
| 記録 | |
| コンパイル時間 | 226 ms |
| コンパイル使用メモリ | 96,488 KB |
| 実行使用メモリ | 79,360 KB |
| 最終ジャッジ日時 | 2026-08-13 01:02:13 |
| 合計ジャッジ時間 | 3,793 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 24 |
ソースコード
import heapq
N,K = list(map(int,input().split()))
A = set(map(int,input().split()))
q = list([-i for i in A])
heapq.heapify(q)
while(q):
now = heapq.heappop(q);now *= -1
for a in range(6):
if(all(now-5+a+i in A for i in range(6))):
print("No")
exit()
for x in range(1,7):
if(now + 7 - 2*x in A and now - x > 0):
A.add(now - x)
heapq.heappush(q, -(now - x))
print("Yes" if 1 not in A else "No")
回転