結果

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

ソースコード

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 <= k and b not in seen:
            seen.add(b)
            NL.append(b)
        if c <= k and c not in seen:
            seen.add(c)
            NL.append(c)
    L = NL[:]
if k in seen:
    print("YES")
else:
    print("NO")
0