Блог пользователя WIL

Автор WIL, 10 лет назад, По-английски

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!!!

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
10 лет назад, # |
Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

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

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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.

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

The fixed link