{"code":"icpc21centralb","name":"ICPC Central B","description":"Given array $A$ consisting of $n$ integers $a_i$. Tuan wants to remove at most 1 element\r\nin array $A$ so that the product of all remaining elements in that array is the largest.\r\nPlease help Tuan do it!\r\nYou task is to calculate the product of all remaining elements in that array after\r\nremoved at most 1 element.\r\n\r\n<h4>Input</h4>\r\n\r\n- The first line contains a positive integer $n (2 \\le  n \\le  1000)$.\r\n- Next line contains n integers ai separated by a space $( -10\r\n^9 \\le  a_i \\le  10^\r\n9\r\n)$.\r\n\r\n<h4>Output</h4>\r\n\r\n- Print the result of the problem. Since it may be too big, print it after taking modulo\r\n$10^9+7$.\r\n\r\n<h4>Example</h4>\r\n\r\n!!! question \"Test 1\"\r\n\r\n    ???+ \"Input\"\r\n        ```sample\r\n        4\r\n        4 2 3 5\r\n        ```\r\n    \r\n    ???+ success \"Output\"\r\n        ```sample\r\n        120\r\n        ```\r\n    \r\n    ??? warning \"Note\"\r\n\r\n        - Without dropping any elements, the product of 4 elements is 4 × 2 × 3 × 5 = 120.\r\n\r\n!!! question \"Test 2\"\r\n\r\n    ???+ \"Input\"\r\n        ```sample\r\n        5\r\n        -1 -2 -4 1 2\r\n        ```\r\n    \r\n    ???+ success \"Output\"\r\n        ```sample\r\n        16\r\n        ```\r\n    \r\n    ??? warning \"Note\"\r\n\r\n        - Remove -1, the product of the remaining 4 elements is -2 × (-4) × 1 × 2 = 16","points":1400.0,"partial":false,"time_limit":1.0,"memory_limit":262144,"short_circuit":false,"allowed_languages":[3,4,34,36,37,5,6,11,12,14,28,2,38,39,9,18,17,29,23,27,35,25,26,10,7,19,32,1,8,15,16,24,20,33,13,41,21,40],"is_public":true,"is_manually_managed":false,"permissions":{"can_edit":false}}