結果
| 問題 | No.505 カードの数式2 |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-02-12 05:17:53 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 159 bytes |
| 記録 | |
| コンパイル時間 | 238 ms |
| コンパイル使用メモリ | 95,980 KB |
| 実行使用メモリ | 79,232 KB |
| 最終ジャッジ日時 | 2026-08-17 09:07:46 |
| 合計ジャッジ時間 | 4,055 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 11 |
ソースコード
n = int(input())
*a, = map(int,input().split())
p = n = a[0]
for x in a[1:]:
p = max(p*x,p+x,p-x,n*x,n+x,n-x)
n = min(p*x,p+x,p-x,n*x,n+x,n-x)
print(p)
convexineq