problem link http://codeforces.com/contest/855/problem/B asked 24 Sep '17, 23:06

take four array prefixmin[] (min upto i) prefixmax[] (max upto i) sufmin[] (min from n1 to i) sufmax[] (max from n1 to i) fix j form 0 to n1 for i and k check if p<0 multiply p with premin[i] else multiply p with premax[i] same for r but multiply with sufmin and sufmax and check for more check my code: https://ideone.com/AtQqiJ however my solution got hacked just for one line mx=1e18 instead LLONG_MIN answered 25 Sep '17, 00:34
