結果

問題 No.1465 Archaea
ユーザー lloyzlloyz
提出日時 2022-10-30 02:02:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 394 bytes
コンパイル時間 442 ms
コンパイル使用メモリ 87,268 KB
実行使用メモリ 98,684 KB
最終ジャッジ日時 2023-09-21 03:07:39
合計ジャッジ時間 3,470 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,464 KB
testcase_01 AC 75 ms
71,460 KB
testcase_02 AC 75 ms
71,184 KB
testcase_03 AC 74 ms
71,196 KB
testcase_04 WA -
testcase_05 AC 75 ms
71,200 KB
testcase_06 AC 74 ms
71,456 KB
testcase_07 AC 91 ms
80,248 KB
testcase_08 AC 78 ms
75,692 KB
testcase_09 AC 95 ms
83,352 KB
testcase_10 AC 74 ms
71,312 KB
testcase_11 AC 96 ms
81,484 KB
testcase_12 AC 82 ms
75,904 KB
testcase_13 AC 111 ms
91,164 KB
testcase_14 AC 93 ms
81,496 KB
testcase_15 AC 74 ms
71,632 KB
testcase_16 AC 75 ms
71,336 KB
testcase_17 AC 104 ms
91,160 KB
testcase_18 AC 76 ms
71,420 KB
testcase_19 AC 74 ms
71,416 KB
testcase_20 AC 91 ms
80,004 KB
testcase_21 AC 122 ms
98,684 KB
testcase_22 AC 121 ms
98,484 KB
testcase_23 AC 75 ms
71,020 KB
権限があれば一括ダウンロードができます

ソースコード

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