結果

問題 No.1465 Archaea
ユーザー lloyz
提出日時 2022-10-30 02:02:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 394 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 97,792 KB
最終ジャッジ日時 2024-07-06 21:46:26
合計ジャッジ時間 2,092 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 19 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())

seen = set()
L = [1]
for _ in range(k):
    NL = []
    while L:
        a = L.pop()
        b = 2 * a
        c = a + 3
        if b <= n and b not in seen:
            seen.add(b)
            NL.append(b)
        if c <= n and c not in seen:
            seen.add(c)
            NL.append(c)
    L = NL[:]
if n in seen:
    print("YES")
else:
    print("NO")
0