結果
問題 | No.1465 Archaea |
ユーザー | ayaoni |
提出日時 | 2021-04-06 21:43:06 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 91 ms / 2,000 ms |
コード長 | 683 bytes |
コンパイル時間 | 1,452 ms |
コンパイル使用メモリ | 86,640 KB |
実行使用メモリ | 77,496 KB |
最終ジャッジ日時 | 2023-09-02 13:02:36 |
合計ジャッジ時間 | 5,214 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 87 ms
77,264 KB |
testcase_01 | AC | 90 ms
77,328 KB |
testcase_02 | AC | 91 ms
77,204 KB |
testcase_03 | AC | 90 ms
77,324 KB |
testcase_04 | AC | 90 ms
77,332 KB |
testcase_05 | AC | 87 ms
77,144 KB |
testcase_06 | AC | 90 ms
77,300 KB |
testcase_07 | AC | 89 ms
77,268 KB |
testcase_08 | AC | 89 ms
77,276 KB |
testcase_09 | AC | 89 ms
77,496 KB |
testcase_10 | AC | 89 ms
77,272 KB |
testcase_11 | AC | 88 ms
77,144 KB |
testcase_12 | AC | 89 ms
77,272 KB |
testcase_13 | AC | 87 ms
77,304 KB |
testcase_14 | AC | 86 ms
77,216 KB |
testcase_15 | AC | 91 ms
77,268 KB |
testcase_16 | AC | 88 ms
77,168 KB |
testcase_17 | AC | 90 ms
77,212 KB |
testcase_18 | AC | 88 ms
77,184 KB |
testcase_19 | AC | 90 ms
77,308 KB |
testcase_20 | AC | 91 ms
77,188 KB |
testcase_21 | AC | 88 ms
77,328 KB |
testcase_22 | AC | 87 ms
77,236 KB |
testcase_23 | AC | 89 ms
77,268 KB |
ソースコード
import sys sys.setrecursionlimit(10**7) def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI2(): return list(map(int,sys.stdin.readline().rstrip())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) def LS2(): return list(sys.stdin.readline().rstrip()) N,K = MI() inf = 10**18 dp = [inf]*(2*10**5+1) dp[1] = 0 dp[2] = 1 for i in range(3,2*10**5+1): if i % 2 == 0: dp[i] = dp[i//2]+1 dp[i] = min(dp[i],dp[i-3]+1) if dp[N] <= K: print('YES') else: print('NO')