I am solving a question Minimal Dual Area from the latest june challenge .
I tried the approach as similar mentioned in editorial .
In the util array of size n*4 i am storing at
utili,0 the minimum x from top to i
utili,1 the maximum x from top to i
utili,2 the minimum y from top to i
utili,3 the maximum y from top to i
While in next i am storing
from bottom to i the same things mentioned above .
And in last loop i am finding minimu area by making partitions but getting wrong ans ?
here is link to the code
Edit : I changed my minimum cheking conditon form INT32_MAX to INT64_MAX
and it got AC .
Here is accepted Solution .