結果
| 問題 |
No.45 回転寿司
|
| ユーザー |
|
| 提出日時 | 2018-12-25 12:27:26 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 222 bytes |
| コンパイル時間 | 145 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-10-01 13:15:45 |
| 合計ジャッジ時間 | 2,153 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | WA * 30 |
ソースコード
n = int(input())
sq = list(map(int,input().split()))
m1 = 0
m2 = 0
m3 = sq[0]
cnt = 1
while cnt < n:
m4 = max([sq[cnt]+m2, sq[cnt]+m1])
m1,m2,m3 = m2,m3,m4
cnt += 1
print(m1,m2,m3)
print(max([m1,m2,m3]))