結果
問題 | No.999 てん vs. ほむ |
ユーザー | komkompi |
提出日時 | 2020-03-08 10:03:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 224 ms / 2,000 ms |
コード長 | 276 bytes |
コンパイル時間 | 260 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 32,780 KB |
最終ジャッジ日時 | 2024-11-06 20:08:33 |
合計ジャッジ時間 | 5,012 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
# coding: utf-8 # Your code here! N=int(input()) A=list(map(int,input().split())) fro=[A[2*i]-A[2*i+1] for i in range(N)] back=[-A[2*i]+A[2*i+1] for i in range(N)] temp=sum(fro) ans=temp for i in range(N)[::-1]: temp+=back[i]-fro[i] ans=max(ans,temp) print(ans)