結果
問題 | No.1465 Archaea |
ユーザー | aaaaaaaaaa2230 |
提出日時 | 2021-04-02 21:54:42 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 418 bytes |
コンパイル時間 | 954 ms |
コンパイル使用メモリ | 87,192 KB |
実行使用メモリ | 483,664 KB |
最終ジャッジ日時 | 2023-08-25 12:05:52 |
合計ジャッジ時間 | 6,029 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 68 ms
78,400 KB |
testcase_01 | AC | 71 ms
71,324 KB |
testcase_02 | AC | 96 ms
78,656 KB |
testcase_03 | AC | 70 ms
71,372 KB |
testcase_04 | AC | 70 ms
71,328 KB |
testcase_05 | AC | 70 ms
71,252 KB |
testcase_06 | AC | 67 ms
71,352 KB |
testcase_07 | AC | 287 ms
123,536 KB |
testcase_08 | AC | 88 ms
76,224 KB |
testcase_09 | AC | 99 ms
79,256 KB |
testcase_10 | AC | 69 ms
71,620 KB |
testcase_11 | AC | 321 ms
148,384 KB |
testcase_12 | AC | 150 ms
91,184 KB |
testcase_13 | TLE | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
ソースコード
n,k = map(int,input().split()) dic = {} def dfs(x,left): if (x,left) in dic: return dic[(x,left)] #print(x,left) if x < 1: return 0 if x == 1: return 1 if left == 0 and x != 1: return 0 check = 0 if x%2 == 0: check |= dfs(x//2,left-1) check |= dfs(x-3,left-1) dic[(x,left)] = check return check print("YES" if dfs(n,k) else "NO")