結果
| 問題 | No.505 カードの数式2 |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-02-12 05:19:44 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 154 bytes |
| 記録 | |
| コンパイル時間 | 263 ms |
| コンパイル使用メモリ | 85,832 KB |
| 実行使用メモリ | 137,928 KB |
| 最終ジャッジ日時 | 2026-04-02 09:12:40 |
| 合計ジャッジ時間 | 1,965 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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