結果
| 問題 |
No.999 てん vs. ほむ
|
| コンテスト | |
| ユーザー |
bliss_10969
|
| 提出日時 | 2020-02-28 22:37:03 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 250 bytes |
| コンパイル時間 | 233 ms |
| コンパイル使用メモリ | 82,784 KB |
| 実行使用メモリ | 104,808 KB |
| 最終ジャッジ日時 | 2024-10-13 18:28:26 |
| 合計ジャッジ時間 | 4,662 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 WA * 7 TLE * 2 -- * 9 |
ソースコード
n=int(input())
a=list(map(int,input().split()))
ans=0
select=0
for i in range(n):
ans+=max(a[0]-a[1],a[-1]-a[-2])
select=max(a[0]-a[1],a[-1]-a[-2])
if select==a[0]-a[1]:
del a[0],a[0]
else:
del a[-1],a[-1]
print(ans)
bliss_10969