結果
| 問題 |
No.1465 Archaea
|
| コンテスト | |
| ユーザー |
tamato
|
| 提出日時 | 2021-04-02 21:34:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 463 bytes |
| コンパイル時間 | 457 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 63,232 KB |
| 最終ジャッジ日時 | 2024-12-24 01:09:51 |
| 合計ジャッジ時間 | 2,217 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
mod = 1000000007
eps = 10**-9
inf = 10**18
def main():
import sys
input = sys.stdin.readline
N, K = map(int, input().split())
cnt = [inf] * (N+1)
cnt[1] = 0
for i in range(1, N+1):
if i + 3 <= N:
cnt[i+3] = min(cnt[i+3], cnt[i] + 1)
if i * 2 <= N:
cnt[i*2] = min(cnt[i*2], cnt[i] + 1)
if cnt[N] <= K:
print("YES")
else:
print("NO")
if __name__ == '__main__':
main()
tamato