I need some idea to solve this problem. I code the problem and got WA.
My logic is given below:
1.At first find the convex hull.
2.There is at least one edge of rectangle which will overlap with one edge of the convex hull.
Am I right ? If yes then I need some critical input output.
Thanks.
12307 - Smallest Enclosing Rectangle
Moderator: Board moderators
Re: 12307 - Smallest Enclosing Rectangle
The basic idea is correct. Attention to colinear points especially when you're calculating convex hull by granham's original algorithm, not andrew's variation (this one is preferred). You can send me an email with your code and I'll test it with judge data.

Re: 12307 - Smallest Enclosing Rectangle
Hello, I know this is a really old topic, but I need help on this one. I'm using four rotating calipers to do the job, but I keep getting WA. Can someone provide me some tricky cases or take a look at my code? idk if I can post it here thou
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 12307 - Smallest Enclosing Rectangle
Download the gift package at:
http://uva.onlinejudge.org/index.php?op ... ontest=284
http://uva.onlinejudge.org/index.php?op ... ontest=284
Check input and AC output for thousands of problems on uDebug!
Re: 12307 - Smallest Enclosing Rectangle
hmm i'm not to sure about this one