結果
問題 | No.23 技の選択 |
ユーザー | vwxyz |
提出日時 | 2021-07-17 18:21:58 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 264 ms / 5,000 ms |
コード長 | 818 bytes |
コンパイル時間 | 1,712 ms |
コンパイル使用メモリ | 87,024 KB |
実行使用メモリ | 94,804 KB |
最終ジャッジ日時 | 2023-09-21 11:39:08 |
合計ジャッジ時間 | 10,244 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 255 ms
91,772 KB |
testcase_01 | AC | 243 ms
91,704 KB |
testcase_02 | AC | 241 ms
91,812 KB |
testcase_03 | AC | 247 ms
92,468 KB |
testcase_04 | AC | 247 ms
92,284 KB |
testcase_05 | AC | 246 ms
92,292 KB |
testcase_06 | AC | 250 ms
94,752 KB |
testcase_07 | AC | 252 ms
94,704 KB |
testcase_08 | AC | 256 ms
94,576 KB |
testcase_09 | AC | 247 ms
92,264 KB |
testcase_10 | AC | 252 ms
94,272 KB |
testcase_11 | AC | 247 ms
91,576 KB |
testcase_12 | AC | 250 ms
92,524 KB |
testcase_13 | AC | 257 ms
94,404 KB |
testcase_14 | AC | 254 ms
92,504 KB |
testcase_15 | AC | 253 ms
92,276 KB |
testcase_16 | AC | 250 ms
91,640 KB |
testcase_17 | AC | 252 ms
92,260 KB |
testcase_18 | AC | 258 ms
94,564 KB |
testcase_19 | AC | 264 ms
94,564 KB |
testcase_20 | AC | 254 ms
92,288 KB |
testcase_21 | AC | 257 ms
92,528 KB |
testcase_22 | AC | 260 ms
94,748 KB |
testcase_23 | AC | 249 ms
92,452 KB |
testcase_24 | AC | 246 ms
91,392 KB |
testcase_25 | AC | 258 ms
94,420 KB |
testcase_26 | AC | 248 ms
92,440 KB |
testcase_27 | AC | 249 ms
94,572 KB |
testcase_28 | AC | 253 ms
94,480 KB |
testcase_29 | AC | 258 ms
94,764 KB |
testcase_30 | AC | 252 ms
94,312 KB |
testcase_31 | AC | 248 ms
94,424 KB |
testcase_32 | AC | 253 ms
94,804 KB |
ソースコード
import bisect import copy import decimal import fractions import heapq import itertools import math import random import sys from collections import Counter, deque,defaultdict from functools import lru_cache,reduce from heapq import heappush,heappop,heapify,heappushpop,_heappop_max,_heapify_max def _heappush_max(heap,item): heap.append(item) heapq._siftdown_max(heap, 0, len(heap)-1) def _heappushpop_max(heap, item): if heap and item < heap[0]: item, heap[0] = heap[0], item heapq._siftup_max(heap, 0) return item from math import gcd as GCD read=sys.stdin.read readline=sys.stdin.readline readlines=sys.stdin.readlines H,A,D=map(int,readline().split()) inf=1<<60 dp=[inf]*(H+1) dp[0]=0 for i in range(1,H+1): dp[i]=min(dp[max(0,i-D)]+1.5,dp[max(i-A,0)]+1) ans=dp[-1] print(ans)