The problem is Fence the vegetables from "2014 Caribbean Finals of the ACM-ICPC" in caribbean online judged.
I think that the minimum perimeter, is equals to:
(maxX-minX+1)*2+(maxY-minY+1)*2
But i dont know how find the minimum area with this perimeter. Thank for the help!!!
I think using Pick's theorem might work here
Pick's Theorem
Looks like I missed that " can't be non parallel to axis " , in which case using this will be overcomplicated unnecessary.
The best thing is to find the extreme points, find the area of that , then subtract the area of the pieces you would remove to get the original shape
Thank for the answer, but i don't think this problem can be solved by this theorem, i analysed a bit more the problem and i think this can be solve by sweepline algorithm.
The fixed link