:( i heard about Red black tree, i also heard about interval tree. but what is 2-D interval tree?? can any one tell me or give a link to any site where i can find it.
i gave a search at google but no satisfactory result :cry:
I think he meant 2D range trees, augmented with Max information: see ...
Search found 40 matches
- Thu Oct 13, 2005 9:17 pm
- Forum: ACM ICPC Archive Board
- Topic: 3294,3295 - problems
- Replies: 8
- Views: 3009
- Thu Oct 06, 2005 11:14 pm
- Forum: Algorithms
- Topic: Mincost Maxflow - help!
- Replies: 7
- Views: 3702
- Tue Oct 04, 2005 9:26 pm
- Forum: ACM ICPC Archive Board
- Topic: 3294,3295 - problems
- Replies: 8
- Views: 3009
Re: 3294,3295 - problems
The ultimate bamboo eater is something strange - anyone has an idea? All my ideas run out of time.
the triangle counting is kind of easy, but what do you do with finding the lines with more than 2 points one them? I mean, how?
I think 3295 has been solved there:
http://forums.topcoder.com ...
the triangle counting is kind of easy, but what do you do with finding the lines with more than 2 points one them? I mean, how?
I think 3295 has been solved there:
http://forums.topcoder.com ...
- Tue Oct 04, 2005 8:18 pm
- Forum: Algorithms
- Topic: Mincost Maxflow - help!
- Replies: 7
- Views: 3702
Re: Still...
I've read about 200 times each of these .pdfs, but I can't quite understand the algorithm :oops: My code is something like this:
1. Run a Dijkstra and set the initial "potencial" value on the nodes to -d[i], where d[i] is the minimum distance from the source node to the node i.
2. Run a BFS and ...
1. Run a Dijkstra and set the initial "potencial" value on the nodes to -d[i], where d[i] is the minimum distance from the source node to the node i.
2. Run a BFS and ...
- Sat Oct 01, 2005 10:05 pm
- Forum: Algorithms
- Topic: Mincost Maxflow - help!
- Replies: 7
- Views: 3702
Re: Mincost Maxflow - help!
Cost scaling(which is a cost scaling variant of successive shortest paths). has O(nm lg U) complexity.
[Edit]: sorry what I said above is totally wrong
In fact, one of the fastest algo is the double scaling algorithm which has a time complexity of O(nm logU log (nC) (Ahuja, Magnanti &Orlin ...
[Edit]: sorry what I said above is totally wrong
In fact, one of the fastest algo is the double scaling algorithm which has a time complexity of O(nm logU log (nC) (Ahuja, Magnanti &Orlin ...
- Sat Oct 01, 2005 9:02 pm
- Forum: ACM ICPC Archive Board
- Topic: Problem Alibaba from SouthEastern Europe 2004/2005
- Replies: 1
- Views: 1476
See the discussion here.:
http://forums.topcoder.com/?module=Thread&threadID=398406&start=0&mc=12#398479
In the last message in the thread I discuss an algorithm, which is still O(N^2) but with some tricks to speed up the code. I haven't implemented the algo. If you decide to try it, please tell me ...
http://forums.topcoder.com/?module=Thread&threadID=398406&start=0&mc=12#398479
In the last message in the thread I discuss an algorithm, which is still O(N^2) but with some tricks to speed up the code. I haven't implemented the algo. If you decide to try it, please tell me ...
- Sun Feb 13, 2005 9:24 pm
- Forum: Algorithms
- Topic: Special case of Hamiltonian cycle
- Replies: 4
- Views: 2253
- Sun Feb 13, 2005 1:59 pm
- Forum: Algorithms
- Topic: Special case of Hamiltonian cycle
- Replies: 4
- Views: 2253
Re: Special case of Hamiltonian cycle
I need help with:
http://acm.sgu.ru/problem.php?contest=0&problem=122
If you don't want to open it, the problem is:
You have an undirected graph with N vertices. Each vertex has at least (N+1)/2 neighbours. Needed is to construct a hamiltonian cycle. I guess it is assumed that it always exists ...
http://acm.sgu.ru/problem.php?contest=0&problem=122
If you don't want to open it, the problem is:
You have an undirected graph with N vertices. Each vertex has at least (N+1)/2 neighbours. Needed is to construct a hamiltonian cycle. I guess it is assumed that it always exists ...
- Mon Feb 07, 2005 2:52 am
- Forum: Volume 8 (800-899)
- Topic: 880 - Cantor Fractions
- Replies: 24
- Views: 22346
- Sun Feb 06, 2005 10:39 pm
- Forum: Algorithms
- Topic: Number of n-element permutations with exactly k inversions
- Replies: 2
- Views: 1594
Re: Number of n-element permutations with exactly k inversio
http://academic.csuohio.edu/bmargolius/ ... invers.htmtytus wrote:How to find number of n-element permutations with exactly k inversions?? (n,k are given)
- Sun Jan 30, 2005 1:35 am
- Forum: Algorithms
- Topic: Please tell me the number of KMP's application problems,thx.
- Replies: 4
- Views: 2509
- Sat Jan 29, 2005 10:59 pm
- Forum: Volume 4 (400-499)
- Topic: 454 - Anagrams
- Replies: 97
- Views: 36105
- Sat Jan 29, 2005 12:12 am
- Forum: Volume 4 (400-499)
- Topic: 454 - Anagrams
- Replies: 97
- Views: 36105
Re: 454 RTE Please, help me!!!!!!!
I got RTE several times, please help me.
if(input[i].original[0]==' ')
I didn't check very carefully but I think the above line of code has an error. Are you assuming a blank line starts with space character ? What if it is empty?
Also your code looks like you are solving for a single ...
if(input[i].original[0]==' ')
I didn't check very carefully but I think the above line of code has an error. Are you assuming a blank line starts with space character ? What if it is empty?
Also your code looks like you are solving for a single ...
- Wed Jan 26, 2005 7:30 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10805 - Cockroach Escape Networks
- Replies: 38
- Views: 18967
- Tue Jan 25, 2005 12:48 am
- Forum: Volume 5 (500-599)
- Topic: 532 - Dungeon Master
- Replies: 39
- Views: 14525
Re: 532 WA ('ve tried some in/output...T^T)
I don't understand your algorithm. It looks something like floodfill , but you can't use floodfill here because you're looking for shortest time not just for connected components so you should use Breadth First Search . Could you explain your algorithm please ?