結果

問題 No.45 回転寿司
ユーザー Akijin_007Akijin_007
提出日時 2022-11-04 14:08:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 263 bytes
コンパイル時間 1,735 ms
コンパイル使用メモリ 86,492 KB
実行使用メモリ 75,264 KB
最終ジャッジ日時 2023-09-25 17:27:50
合計ジャッジ時間 4,923 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,424 KB
testcase_01 AC 75 ms
74,824 KB
testcase_02 AC 77 ms
74,920 KB
testcase_03 AC 77 ms
75,264 KB
testcase_04 AC 74 ms
74,896 KB
testcase_05 AC 72 ms
71,192 KB
testcase_06 AC 74 ms
74,736 KB
testcase_07 AC 75 ms
75,260 KB
testcase_08 AC 73 ms
71,480 KB
testcase_09 AC 75 ms
75,096 KB
testcase_10 AC 73 ms
71,080 KB
testcase_11 AC 73 ms
71,216 KB
testcase_12 AC 77 ms
75,056 KB
testcase_13 AC 73 ms
70,980 KB
testcase_14 AC 73 ms
71,316 KB
testcase_15 AC 73 ms
71,408 KB
testcase_16 AC 73 ms
71,344 KB
testcase_17 AC 72 ms
71,388 KB
testcase_18 AC 72 ms
71,260 KB
testcase_19 AC 76 ms
75,040 KB
testcase_20 AC 72 ms
71,260 KB
testcase_21 AC 71 ms
71,216 KB
testcase_22 AC 72 ms
71,348 KB
testcase_23 AC 73 ms
71,396 KB
testcase_24 AC 70 ms
71,272 KB
testcase_25 AC 71 ms
71,380 KB
testcase_26 AC 73 ms
71,176 KB
testcase_27 AC 76 ms
75,116 KB
testcase_28 AC 73 ms
71,140 KB
testcase_29 AC 76 ms
75,116 KB
testcase_30 AC 75 ms
75,264 KB
testcase_31 AC 71 ms
71,188 KB
testcase_32 AC 72 ms
71,272 KB
testcase_33 AC 77 ms
74,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#int(input())
#map(int, input().split())
#list(map(int, input().split()))

N = int(input())
V = list(map(int, input().split()))

dp = [0, 0]

for i in range(N):
    ndp = [0, 0]
    ndp[0] = max(dp)
    ndp[1] = dp[0] + V[i]
    dp = list(ndp)

print(max(dp))



0