HINT: for all people trying to solve this problem, read about rotating callipers and an algorithm for the minimum area rectangle enclosing a convex polygon.
link: http://www.cs.purdue.edu/research/techn ... 83-463.pdf
Search found 5 matches
- Tue Oct 18, 2011 5:47 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10173 - Smallest Bounding Rectangle
- Replies: 18
- Views: 7305
- Tue Aug 23, 2011 1:25 am
- Forum: Volume 9 (900-999)
- Topic: 941 - Permutations
- Replies: 7
- Views: 8274
Re: 941 - Permutations
Your code is O(n!), of course it'll give TLE, just try this input
Output:
My code gives the answer in no time so try another algo 
Code: Select all
1
abcdefghijklmnopqrst
2432902008176639999
Code: Select all
tsrqponmlkjihgfedcba

- Tue Aug 23, 2011 1:13 am
- Forum: Bugs and suggestions
- Topic: 933 No Html - No input
- Replies: 1
- Views: 4625
933 No Html - No input
problem 933 - Water Flow has no html and no input 

- Tue Aug 23, 2011 1:10 am
- Forum: Volume 9 (900-999)
- Topic: 933 - Water Flow
- Replies: 1
- Views: 1748
933 - Water Flow
Please fix the input 

- Wed Jul 20, 2011 9:14 pm
- Forum: Volume 116 (11600-11699)
- Topic: 11676 - Deadly Attack
- Replies: 0
- Views: 1576
11676 - Deadly Attack
Anyone who has solved this problem has critical input?? i don't catch my mistake, here's my algo:
1. With the direction angle and the spread get the two lines.
2. Test with cross product where they are from the circle
3. If they cover the entire circle return pi * r^2
4. if they cover nothing from ...
1. With the direction angle and the spread get the two lines.
2. Test with cross product where they are from the circle
3. If they cover the entire circle return pi * r^2
4. if they cover nothing from ...