結果
| 問題 |
No.45 回転寿司
|
| ユーザー |
|
| 提出日時 | 2016-03-25 12:56:51 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 5,000 ms |
| コード長 | 215 bytes |
| コンパイル時間 | 548 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2024-12-27 12:57:13 |
| 合計ジャッジ時間 | 1,862 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 30 |
ソースコード
#coding: utf-8 ##yuki_45 n=int(raw_input()) s=map(int,raw_input().split()) dp=[0 for i in xrange(1008)] res=0 for i in xrange(n): temp=max(dp[i+2]+s[i],dp[i+1]+s[i]) dp[i+4]=temp res=max(res,temp) print res