結果
| 問題 |
No.505 カードの数式2
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-02-12 05:19:44 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 154 bytes |
| コンパイル時間 | 1,179 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2024-07-18 15:13:17 |
| 合計ジャッジ時間 | 2,532 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 3 |
ソースコード
n = int(input())
*a, = map(int,input().split())
p = n = a[0]
for x in a[1:]:
p,n = max(p*x,p+x,p-x,n*x,n+x,n-x), min(p*x,p+x,p-x,n*x,n+x,n-x)
print(p)
convexineq