結果

問題 No.2386 Udon Coupon (Easy)
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-07-23 17:23:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 420 bytes
コンパイル時間 605 ms
コンパイル使用メモリ 81,752 KB
実行使用メモリ 69,368 KB
最終ジャッジ日時 2023-10-24 23:53:06
合計ジャッジ時間 4,799 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
55,704 KB
testcase_01 AC 47 ms
55,704 KB
testcase_02 AC 46 ms
55,704 KB
testcase_03 AC 46 ms
55,704 KB
testcase_04 AC 46 ms
55,704 KB
testcase_05 AC 45 ms
55,704 KB
testcase_06 AC 46 ms
55,704 KB
testcase_07 AC 68 ms
67,404 KB
testcase_08 AC 45 ms
55,704 KB
testcase_09 AC 46 ms
55,704 KB
testcase_10 AC 55 ms
65,024 KB
testcase_11 AC 53 ms
64,536 KB
testcase_12 AC 58 ms
68,612 KB
testcase_13 AC 60 ms
69,276 KB
testcase_14 AC 57 ms
66,880 KB
testcase_15 AC 62 ms
69,336 KB
testcase_16 AC 61 ms
68,560 KB
testcase_17 AC 58 ms
67,032 KB
testcase_18 AC 60 ms
67,512 KB
testcase_19 AC 54 ms
64,280 KB
testcase_20 AC 55 ms
66,264 KB
testcase_21 AC 57 ms
67,016 KB
testcase_22 AC 56 ms
65,864 KB
testcase_23 AC 55 ms
65,712 KB
testcase_24 AC 54 ms
64,756 KB
testcase_25 AC 56 ms
66,112 KB
testcase_26 AC 58 ms
66,928 KB
testcase_27 AC 57 ms
67,272 KB
testcase_28 AC 60 ms
67,816 KB
testcase_29 AC 60 ms
65,120 KB
testcase_30 AC 53 ms
64,280 KB
testcase_31 AC 56 ms
65,656 KB
testcase_32 AC 53 ms
64,280 KB
testcase_33 AC 59 ms
67,408 KB
testcase_34 AC 60 ms
67,952 KB
testcase_35 AC 56 ms
66,456 KB
testcase_36 AC 63 ms
69,368 KB
testcase_37 AC 56 ms
66,608 KB
testcase_38 AC 60 ms
68,112 KB
testcase_39 AC 56 ms
67,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline

N = int(input())
X = list(map(int,input().split()))
dp = [0]*(N+2)
for i in range(N):
    
    dp[min(i+3,N+1)] = max(dp[min(i+3,N+1)],dp[i]+X[0])
    dp[min(i+5,N+1)] = max(dp[min(i+5,N+1)],dp[i]+X[1])
    dp[min(i+10,N+1)] = max(dp[min(i+10,N+1)],dp[i]+X[2])

print(max(dp[:N+1]))
0