The tournament method.
Picture an essentially complete binary tree with all elements at the leaves and at a node having the minimum of the elements at its sons.
Now where can the second min number be in this tree ?
Search found 44 matches
- Wed Jun 11, 2003 9:09 pm
- Forum: Algorithms
- Topic: Find second min number .
- Replies: 10
- Views: 5152
- Tue Jan 07, 2003 10:59 am
- Forum: Volume 100 (10000-10099)
- Topic: 10020 - Minimal coverage
- Replies: 57
- Views: 26479
Re: Mmm
Miguel Angel:
It's not very clear how your algorithm works.
But, yes - the line segments (of course?) can overlap.
And, yes - the greedy approch can be applied - if done in the right way.
It's not very clear how your algorithm works.
But, yes - the line segments (of course?) can overlap.
And, yes - the greedy approch can be applied - if done in the right way.
- Sat Jan 04, 2003 9:57 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10020 - Minimal coverage
- Replies: 57
- Views: 26479
- Fri Jan 03, 2003 4:17 pm
- Forum: Algorithms
- Topic: Minimal Perfect Matching in Full Graphs...
- Replies: 3
- Views: 2975
- Wed Nov 27, 2002 10:32 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10043 - Chainsaw Massacre
- Replies: 18
- Views: 9208
No, DP doesn't lead to a good solution. Instead, a sweep-style algorithm is needed. Aim at an O(n^2) time algorithm. WARNING : Spoiler follows: Consider the largest empty rectangle. There are two cases: 1) Left edge is the left border of the forest. 2) There is a tree on the left edge. Case 1 is a s...
- Wed Nov 20, 2002 10:06 am
- Forum: C++
- Topic: Grow Array Size
- Replies: 13
- Views: 5760
- Wed Nov 13, 2002 8:42 pm
- Forum: Algorithms
- Topic: Finding the heavier rectangle
- Replies: 10
- Views: 5033
- Wed Nov 13, 2002 12:41 am
- Forum: Algorithms
- Topic: Finding the heavier rectangle
- Replies: 10
- Views: 5033
- Mon Oct 14, 2002 5:29 pm
- Forum: Volume 1 (100-199)
- Topic: 109 - SCUD Busters
- Replies: 96
- Views: 35656
Ok, I asked because you said you added up for each missile. When I did this problem I succeeded first time with just this standard piece of code for detecting hits. [c] int lefton(point *a, point *b, point *c) { return (b->x - a->x)*(c->y - a->y) - (c->x - a->x)*(b->y - a->y) >= 0; } int pointinpoly...
- Mon Oct 14, 2002 3:10 pm
- Forum: Volume 1 (100-199)
- Topic: 109 - SCUD Busters
- Replies: 96
- Views: 35656
- Sat Sep 28, 2002 5:10 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10055 - Hashmat the Brave Warrior
- Replies: 166
- Views: 72209
- Fri Sep 27, 2002 5:10 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10078 - The Art Gallery
- Replies: 20
- Views: 8566
- Tue Sep 24, 2002 11:35 am
- Forum: Volume 1 (100-199)
- Topic: 108 - Maximum Sum
- Replies: 233
- Views: 46614
- Fri Sep 20, 2002 10:19 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10004 - Bicoloring
- Replies: 93
- Views: 42096
- Fri Sep 20, 2002 8:32 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10004 - Bicoloring
- Replies: 93
- Views: 42096