結果

問題 No.45 回転寿司
ユーザー syunsukesyunsuke
提出日時 2020-09-19 10:57:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 181 bytes
コンパイル時間 557 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 75,504 KB
最終ジャッジ日時 2023-09-05 12:31:10
合計ジャッジ時間 4,277 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,604 KB
testcase_01 AC 73 ms
74,860 KB
testcase_02 AC 76 ms
75,272 KB
testcase_03 AC 76 ms
75,096 KB
testcase_04 AC 77 ms
74,824 KB
testcase_05 AC 71 ms
71,664 KB
testcase_06 AC 73 ms
74,976 KB
testcase_07 AC 75 ms
75,492 KB
testcase_08 AC 71 ms
71,340 KB
testcase_09 AC 76 ms
75,380 KB
testcase_10 AC 71 ms
71,624 KB
testcase_11 AC 73 ms
71,360 KB
testcase_12 AC 75 ms
75,348 KB
testcase_13 AC 73 ms
71,524 KB
testcase_14 AC 73 ms
71,280 KB
testcase_15 AC 72 ms
71,448 KB
testcase_16 AC 73 ms
71,528 KB
testcase_17 AC 72 ms
71,460 KB
testcase_18 AC 72 ms
71,328 KB
testcase_19 AC 75 ms
75,504 KB
testcase_20 AC 70 ms
71,388 KB
testcase_21 AC 71 ms
71,408 KB
testcase_22 AC 70 ms
71,340 KB
testcase_23 AC 72 ms
71,448 KB
testcase_24 AC 71 ms
71,620 KB
testcase_25 AC 71 ms
71,160 KB
testcase_26 AC 73 ms
71,388 KB
testcase_27 AC 75 ms
75,260 KB
testcase_28 AC 72 ms
71,664 KB
testcase_29 AC 79 ms
75,252 KB
testcase_30 AC 76 ms
75,444 KB
testcase_31 AC 71 ms
71,528 KB
testcase_32 AC 74 ms
71,448 KB
testcase_33 AC 76 ms
75,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())

L=[0]+list(map(int,input().split()))

DP=[[0,0]for i in range(N+1)]

for i in range(1,N+1):
    DP[i][0]=max(DP[i-1])
    DP[i][1]=DP[i-1][0]+L[i]
print(max(DP[-1]))
0