結果

問題 No.1465 Archaea
ユーザー lloyzlloyz
提出日時 2022-10-30 02:01:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 394 bytes
コンパイル時間 1,248 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 98,664 KB
最終ジャッジ日時 2023-09-21 03:07:06
合計ジャッジ時間 4,544 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,112 KB
testcase_01 AC 75 ms
71,396 KB
testcase_02 AC 77 ms
71,380 KB
testcase_03 AC 77 ms
71,368 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 75 ms
71,416 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 76 ms
71,372 KB
testcase_12 AC 95 ms
80,012 KB
testcase_13 AC 122 ms
96,428 KB
testcase_14 AC 75 ms
71,152 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 74 ms
71,412 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 121 ms
98,560 KB
testcase_22 AC 121 ms
98,664 KB
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

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