結果
| 問題 | No.999 てん vs. ほむ |
| コンテスト | |
| ユーザー |
minr
|
| 提出日時 | 2020-03-31 17:13:20 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 241 bytes |
| 記録 | |
| コンパイル時間 | 568 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 36,144 KB |
| 最終ジャッジ日時 | 2026-03-11 01:11:47 |
| 合計ジャッジ時間 | 5,720 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 12 |
ソースコード
from collections import deque
N = int(input())
A = deque(list(map(int,input().split())))
s = 0
while len(A) > 0:
if (A[-1] - A[-2]) > (A[0] - A[1]):
s += A.pop() - A.pop()
else:
s += A.popleft() - A.popleft()
print(s)
minr