結果
| 問題 | No.45 回転寿司 |
| ユーザー |
|
| 提出日時 | 2017-04-18 01:07:35 |
| 言語 | Python3 (3.14.2 + numpy 2.4.0 + scipy 1.16.3) |
| 結果 |
AC
|
| 実行時間 | 45 ms / 5,000 ms |
| コード長 | 203 bytes |
| 記録 | |
| コンパイル時間 | 501 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-12-27 16:14:38 |
| 合計ジャッジ時間 | 2,898 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 30 |
ソースコード
N = int(input())
V = list(map(int, input().split()))
V.append(0)
if N==1:
Uma=V[0]
elif N==2:
Uma=max(V)
else:
V[2]+=V[0]
for i in range(3,N+1):
V[i] += max(V[:i-1])
Uma=max(V)
print(Uma)