結果

問題 No.1465 Archaea
ユーザー stngstng
提出日時 2021-08-28 15:01:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 415 bytes
コンパイル時間 379 ms
コンパイル使用メモリ 82,816 KB
実行使用メモリ 77,824 KB
最終ジャッジ日時 2024-05-01 15:58:30
合計ジャッジ時間 2,726 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
53,504 KB
testcase_01 AC 47 ms
53,248 KB
testcase_02 AC 47 ms
53,888 KB
testcase_03 AC 46 ms
53,504 KB
testcase_04 AC 46 ms
53,504 KB
testcase_05 WA -
testcase_06 AC 45 ms
53,632 KB
testcase_07 AC 62 ms
64,640 KB
testcase_08 AC 51 ms
60,160 KB
testcase_09 AC 64 ms
65,792 KB
testcase_10 AC 45 ms
53,248 KB
testcase_11 AC 63 ms
65,152 KB
testcase_12 AC 56 ms
63,360 KB
testcase_13 AC 83 ms
77,312 KB
testcase_14 AC 65 ms
65,792 KB
testcase_15 AC 46 ms
53,376 KB
testcase_16 WA -
testcase_17 AC 80 ms
77,824 KB
testcase_18 AC 56 ms
61,952 KB
testcase_19 AC 48 ms
54,272 KB
testcase_20 AC 64 ms
66,560 KB
testcase_21 AC 83 ms
77,568 KB
testcase_22 AC 83 ms
77,696 KB
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque

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

chk = [0]*(n+1)

d = deque()
d.appendleft(1)

for i in range(k):
    for j in range(len(d)):
        tmp = d.popleft()
        if chk[tmp] == 0:
            if tmp*2 <= n:
                d.appendleft(tmp*2)
            if tmp+3 <= n:
                d.appendleft(tmp+3)
            chk[tmp] = 1

if chk[n] == 0:
    print("NO")
else:
    print("YES")
0